@qaecy/cue-ui 0.0.66 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/3786.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3786],{9465(te){"use strict";const{AbortController:ne,AbortSignal:u}=typeof self<"u"?self:typeof window<"u"?window:void 0;te.exports=ne,te.exports.AbortSignal=u,te.exports.default=ne},13981(te,ne){"use strict";ne.byteLength=function c(L){var $=S(L),q=$[1];return 3*($[0]+q)/4-q},ne.toByteArray=function z(L){var $,E,K=S(L),q=K[0],I=K[1],h=new C(function B(L,$,K){return 3*($+K)/4-K}(0,q,I)),d=0,p=I>0?q-4:q;for(E=0;E<p;E+=4)$=g[L.charCodeAt(E)]<<18|g[L.charCodeAt(E+1)]<<12|g[L.charCodeAt(E+2)]<<6|g[L.charCodeAt(E+3)],h[d++]=$>>16&255,h[d++]=$>>8&255,h[d++]=255&$;return 2===I&&($=g[L.charCodeAt(E)]<<2|g[L.charCodeAt(E+1)]>>4,h[d++]=255&$),1===I&&($=g[L.charCodeAt(E)]<<10|g[L.charCodeAt(E+1)]<<4|g[L.charCodeAt(E+2)]>>2,h[d++]=$>>8&255,h[d++]=255&$),h},ne.fromByteArray=function V(L){for(var $,K=L.length,q=K%3,I=[],h=16383,d=0,p=K-q;d<p;d+=h)I.push(j(L,d,d+h>p?p:d+h));return 1===q?I.push(u[($=L[K-1])>>2]+u[$<<4&63]+"=="):2===q&&I.push(u[($=(L[K-2]<<8)+L[K-1])>>10]+u[$>>4&63]+u[$<<2&63]+"="),I.join("")};for(var u=[],g=[],C=typeof Uint8Array<"u"?Uint8Array:Array,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=0;N<64;++N)u[N]=P[N],g[P.charCodeAt(N)]=N;function S(L){var $=L.length;if($%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var K=L.indexOf("=");return-1===K&&(K=$),[K,K===$?0:4-K%4]}function U(L){return u[L>>18&63]+u[L>>12&63]+u[L>>6&63]+u[63&L]}function j(L,$,K){for(var I=[],h=$;h<K;h+=3)I.push(U((L[h]<<16&16711680)+(L[h+1]<<8&65280)+(255&L[h+2])));return I.join("")}g[45]=62,g[95]=63},83838(te,ne,u){"use strict";const g=u(13981),C=u(22020),P="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;ne.Buffer=c,ne.SlowBuffer=function h(o){return+o!=o&&(o=0),c.alloc(+o)},ne.INSPECT_MAX_BYTES=50;const N=2147483647;function S(o){if(o>N)throw new RangeError('The value "'+o+'" is invalid for option "size"');const t=new Uint8Array(o);return Object.setPrototypeOf(t,c.prototype),t}function c(o,t,n){if("number"==typeof o){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return j(o)}return B(o,t,n)}function B(o,t,n){if("string"==typeof o)return function V(o,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|d(o,t);let a=S(n);const _=a.write(o,t);return _!==n&&(a=a.slice(0,_)),a}(o,t);if(ArrayBuffer.isView(o))return function $(o){if(F(o,Uint8Array)){const t=new Uint8Array(o);return K(t.buffer,t.byteOffset,t.byteLength)}return L(o)}(o);if(null==o)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(F(o,ArrayBuffer)||o&&F(o.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(F(o,SharedArrayBuffer)||o&&F(o.buffer,SharedArrayBuffer)))return K(o,t,n);if("number"==typeof o)throw new TypeError('The "value" argument must not be of type number. Received type number');const a=o.valueOf&&o.valueOf();if(null!=a&&a!==o)return c.from(a,t,n);const _=function q(o){if(c.isBuffer(o)){const t=0|I(o.length),n=S(t);return 0===n.length||o.copy(n,0,0,t),n}return void 0!==o.length?"number"!=typeof o.length||Z(o.length)?S(0):L(o):"Buffer"===o.type&&Array.isArray(o.data)?L(o.data):void 0}(o);if(_)return _;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof o[Symbol.toPrimitive])return c.from(o[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}function z(o){if("number"!=typeof o)throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function j(o){return z(o),S(o<0?0:0|I(o))}function L(o){const t=o.length<0?0:0|I(o.length),n=S(t);for(let a=0;a<t;a+=1)n[a]=255&o[a];return n}function K(o,t,n){if(t<0||o.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(o.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let a;return a=void 0===t&&void 0===n?new Uint8Array(o):void 0===n?new Uint8Array(o,t):new Uint8Array(o,t,n),Object.setPrototypeOf(a,c.prototype),a}function I(o){if(o>=N)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+N.toString(16)+" bytes");return 0|o}function d(o,t){if(c.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||F(o,ArrayBuffer))return o.byteLength;if("string"!=typeof o)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);const n=o.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;let _=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return ie(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return f(o).length;default:if(_)return a?-1:ie(o).length;t=(""+t).toLowerCase(),_=!0}}function p(o,t,n){let a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(o||(o="utf8");;)switch(o){case"hex":return Q(this,t,n);case"utf8":case"utf-8":return le(this,t,n);case"ascii":return G(this,t,n);case"latin1":case"binary":return Ae(this,t,n);case"base64":return J(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,t,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),a=!0}}function E(o,t,n){const a=o[t];o[t]=o[n],o[n]=a}function v(o,t,n,a,_){if(0===o.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=_?0:o.length-1),n<0&&(n=o.length+n),n>=o.length){if(_)return-1;n=o.length-1}else if(n<0){if(!_)return-1;n=0}if("string"==typeof t&&(t=c.from(t,a)),c.isBuffer(t))return 0===t.length?-1:Y(o,t,n,a,_);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?_?Uint8Array.prototype.indexOf.call(o,t,n):Uint8Array.prototype.lastIndexOf.call(o,t,n):Y(o,[t],n,a,_);throw new TypeError("val must be string, number or Buffer")}function Y(o,t,n,a,_){let Fe,x=1,O=o.length,be=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(o.length<2||t.length<2)return-1;x=2,O/=2,be/=2,n/=2}function je(Ne,ve){return 1===x?Ne[ve]:Ne.readUInt16BE(ve*x)}if(_){let Ne=-1;for(Fe=n;Fe<O;Fe++)if(je(o,Fe)===je(t,-1===Ne?0:Fe-Ne)){if(-1===Ne&&(Ne=Fe),Fe-Ne+1===be)return Ne*x}else-1!==Ne&&(Fe-=Fe-Ne),Ne=-1}else for(n+be>O&&(n=O-be),Fe=n;Fe>=0;Fe--){let Ne=!0;for(let ve=0;ve<be;ve++)if(je(o,Fe+ve)!==je(t,ve)){Ne=!1;break}if(Ne)return Fe}return-1}function de(o,t,n,a){n=Number(n)||0;const _=o.length-n;a?(a=Number(a))>_&&(a=_):a=_;const x=t.length;let O;for(a>x/2&&(a=x/2),O=0;O<a;++O){const be=parseInt(t.substr(2*O,2),16);if(Z(be))return O;o[n+O]=be}return O}function ee(o,t,n,a){return A(ie(t,o.length-n),o,n,a)}function me(o,t,n,a){return A(function oe(o){const t=[];for(let n=0;n<o.length;++n)t.push(255&o.charCodeAt(n));return t}(t),o,n,a)}function k(o,t,n,a){return A(f(t),o,n,a)}function re(o,t,n,a){return A(function Ie(o,t){let n,a,_;const x=[];for(let O=0;O<o.length&&!((t-=2)<0);++O)n=o.charCodeAt(O),a=n>>8,_=n%256,x.push(_),x.push(a);return x}(t,o.length-n),o,n,a)}function J(o,t,n){return g.fromByteArray(0===t&&n===o.length?o:o.slice(t,n))}function le(o,t,n){n=Math.min(o.length,n);const a=[];let _=t;for(;_<n;){const x=o[_];let O=null,be=x>239?4:x>223?3:x>191?2:1;if(_+be<=n){let je,Fe,Ne,ve;switch(be){case 1:x<128&&(O=x);break;case 2:je=o[_+1],128==(192&je)&&(ve=(31&x)<<6|63&je,ve>127&&(O=ve));break;case 3:je=o[_+1],Fe=o[_+2],128==(192&je)&&128==(192&Fe)&&(ve=(15&x)<<12|(63&je)<<6|63&Fe,ve>2047&&(ve<55296||ve>57343)&&(O=ve));break;case 4:je=o[_+1],Fe=o[_+2],Ne=o[_+3],128==(192&je)&&128==(192&Fe)&&128==(192&Ne)&&(ve=(15&x)<<18|(63&je)<<12|(63&Fe)<<6|63&Ne,ve>65535&&ve<1114112&&(O=ve))}}null===O?(O=65533,be=1):O>65535&&(O-=65536,a.push(O>>>10&1023|55296),O=56320|1023&O),a.push(O),_+=be}return function fe(o){const t=o.length;if(t<=4096)return String.fromCharCode.apply(String,o);let n="",a=0;for(;a<t;)n+=String.fromCharCode.apply(String,o.slice(a,a+=4096));return n}(a)}function G(o,t,n){let a="";n=Math.min(o.length,n);for(let _=t;_<n;++_)a+=String.fromCharCode(127&o[_]);return a}function Ae(o,t,n){let a="";n=Math.min(o.length,n);for(let _=t;_<n;++_)a+=String.fromCharCode(o[_]);return a}function Q(o,t,n){const a=o.length;(!t||t<0)&&(t=0),(!n||n<0||n>a)&&(n=a);let _="";for(let x=t;x<n;++x)_+=ae[o[x]];return _}function ce(o,t,n){const a=o.slice(t,n);let _="";for(let x=0;x<a.length-1;x+=2)_+=String.fromCharCode(a[x]+256*a[x+1]);return _}function y(o,t,n){if(o%1!=0||o<0)throw new RangeError("offset is not uint");if(o+t>n)throw new RangeError("Trying to access beyond buffer length")}function W(o,t,n,a,_,x){if(!c.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>_||t<x)throw new RangeError('"value" argument is out of bounds');if(n+a>o.length)throw new RangeError("Index out of range")}function se(o,t,n,a,_){ge(t,a,_,o,n,7);let x=Number(t&BigInt(4294967295));o[n++]=x,x>>=8,o[n++]=x,x>>=8,o[n++]=x,x>>=8,o[n++]=x;let O=Number(t>>BigInt(32)&BigInt(4294967295));return o[n++]=O,O>>=8,o[n++]=O,O>>=8,o[n++]=O,O>>=8,o[n++]=O,n}function ye(o,t,n,a,_){ge(t,a,_,o,n,7);let x=Number(t&BigInt(4294967295));o[n+7]=x,x>>=8,o[n+6]=x,x>>=8,o[n+5]=x,x>>=8,o[n+4]=x;let O=Number(t>>BigInt(32)&BigInt(4294967295));return o[n+3]=O,O>>=8,o[n+2]=O,O>>=8,o[n+1]=O,O>>=8,o[n]=O,n+8}function Ee(o,t,n,a,_,x){if(n+a>o.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Be(o,t,n,a,_){return t=+t,n>>>=0,_||Ee(o,0,n,4),C.write(o,t,n,a,23,4),n+4}function he(o,t,n,a,_){return t=+t,n>>>=0,_||Ee(o,0,n,8),C.write(o,t,n,a,52,8),n+8}ne.kMaxLength=N,!(c.TYPED_ARRAY_SUPPORT=function M(){try{const o=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(o,t),42===o.foo()}catch{return!1}}())&&typeof console<"u"&&"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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(o,t,n){return B(o,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(o,t,n){return function U(o,t,n){return z(o),o<=0?S(o):void 0!==t?"string"==typeof n?S(o).fill(t,n):S(o).fill(t):S(o)}(o,t,n)},c.allocUnsafe=function(o){return j(o)},c.allocUnsafeSlow=function(o){return j(o)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,n){if(F(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),F(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),!c.isBuffer(t)||!c.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;let a=t.length,_=n.length;for(let x=0,O=Math.min(a,_);x<O;++x)if(t[x]!==n[x]){a=t[x],_=n[x];break}return a<_?-1:_<a?1:0},c.isEncoding=function(t){switch(String(t).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}},c.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let a;if(void 0===n)for(n=0,a=0;a<t.length;++a)n+=t[a].length;const _=c.allocUnsafe(n);let x=0;for(a=0;a<t.length;++a){let O=t[a];if(F(O,Uint8Array))x+O.length>_.length?(c.isBuffer(O)||(O=c.from(O)),O.copy(_,x)):Uint8Array.prototype.set.call(_,O,x);else{if(!c.isBuffer(O))throw new TypeError('"list" argument must be an Array of Buffers');O.copy(_,x)}x+=O.length}return _},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<t;n+=2)E(this,n,n+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<t;n+=4)E(this,n,n+3),E(this,n+1,n+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<t;n+=8)E(this,n,n+7),E(this,n+1,n+6),E(this,n+2,n+5),E(this,n+3,n+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?le(this,0,t):p.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const n=ne.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},P&&(c.prototype[P]=c.prototype.inspect),c.prototype.compare=function(t,n,a,_,x){if(F(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=0),void 0===a&&(a=t?t.length:0),void 0===_&&(_=0),void 0===x&&(x=this.length),n<0||a>t.length||_<0||x>this.length)throw new RangeError("out of range index");if(_>=x&&n>=a)return 0;if(_>=x)return-1;if(n>=a)return 1;if(this===t)return 0;let O=(x>>>=0)-(_>>>=0),be=(a>>>=0)-(n>>>=0);const je=Math.min(O,be),Fe=this.slice(_,x),Ne=t.slice(n,a);for(let ve=0;ve<je;++ve)if(Fe[ve]!==Ne[ve]){O=Fe[ve],be=Ne[ve];break}return O<be?-1:be<O?1:0},c.prototype.includes=function(t,n,a){return-1!==this.indexOf(t,n,a)},c.prototype.indexOf=function(t,n,a){return v(this,t,n,a,!0)},c.prototype.lastIndexOf=function(t,n,a){return v(this,t,n,a,!1)},c.prototype.write=function(t,n,a,_){if(void 0===n)_="utf8",a=this.length,n=0;else if(void 0===a&&"string"==typeof n)_=n,a=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n>>>=0,isFinite(a)?(a>>>=0,void 0===_&&(_="utf8")):(_=a,a=void 0)}const x=this.length-n;if((void 0===a||a>x)&&(a=x),t.length>0&&(a<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");_||(_="utf8");let O=!1;for(;;)switch(_){case"hex":return de(this,t,n,a);case"utf8":case"utf-8":return ee(this,t,n,a);case"ascii":case"latin1":case"binary":return me(this,t,n,a);case"base64":return k(this,t,n,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,t,n,a);default:if(O)throw new TypeError("Unknown encoding: "+_);_=(""+_).toLowerCase(),O=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,n){const a=this.length;(t=~~t)<0?(t+=a)<0&&(t=0):t>a&&(t=a),(n=void 0===n?a:~~n)<0?(n+=a)<0&&(n=0):n>a&&(n=a),n<t&&(n=t);const _=this.subarray(t,n);return Object.setPrototypeOf(_,c.prototype),_},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let _=this[t],x=1,O=0;for(;++O<n&&(x*=256);)_+=this[t+O]*x;return _},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let _=this[t+--n],x=1;for(;n>0&&(x*=256);)_+=this[t+--n]*x;return _},c.prototype.readUint8=c.prototype.readUInt8=function(t,n){return t>>>=0,n||y(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,n){return t>>>=0,n||y(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,n){return t>>>=0,n||y(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,n){return t>>>=0,n||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,n){return t>>>=0,n||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=X(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];(void 0===n||void 0===a)&&m(t,this.length-8);const _=n+256*this[++t]+65536*this[++t]+this[++t]*2**24,x=this[++t]+256*this[++t]+65536*this[++t]+a*2**24;return BigInt(_)+(BigInt(x)<<BigInt(32))}),c.prototype.readBigUInt64BE=X(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];(void 0===n||void 0===a)&&m(t,this.length-8);const _=n*2**24+65536*this[++t]+256*this[++t]+this[++t],x=this[++t]*2**24+65536*this[++t]+256*this[++t]+a;return(BigInt(_)<<BigInt(32))+BigInt(x)}),c.prototype.readIntLE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let _=this[t],x=1,O=0;for(;++O<n&&(x*=256);)_+=this[t+O]*x;return x*=128,_>=x&&(_-=Math.pow(2,8*n)),_},c.prototype.readIntBE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let _=n,x=1,O=this[t+--_];for(;_>0&&(x*=256);)O+=this[t+--_]*x;return x*=128,O>=x&&(O-=Math.pow(2,8*n)),O},c.prototype.readInt8=function(t,n){return t>>>=0,n||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,n){t>>>=0,n||y(t,2,this.length);const a=this[t]|this[t+1]<<8;return 32768&a?4294901760|a:a},c.prototype.readInt16BE=function(t,n){t>>>=0,n||y(t,2,this.length);const a=this[t+1]|this[t]<<8;return 32768&a?4294901760|a:a},c.prototype.readInt32LE=function(t,n){return t>>>=0,n||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,n){return t>>>=0,n||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=X(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];return(void 0===n||void 0===a)&&m(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(a<<24))<<BigInt(32))+BigInt(n+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),c.prototype.readBigInt64BE=X(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];(void 0===n||void 0===a)&&m(t,this.length-8);const _=(n<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(_)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+a)}),c.prototype.readFloatLE=function(t,n){return t>>>=0,n||y(t,4,this.length),C.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,n){return t>>>=0,n||y(t,4,this.length),C.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,n){return t>>>=0,n||y(t,8,this.length),C.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,n){return t>>>=0,n||y(t,8,this.length),C.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,n,a,_){t=+t,n>>>=0,a>>>=0,_||W(this,t,n,a,Math.pow(2,8*a)-1,0);let x=1,O=0;for(this[n]=255&t;++O<a&&(x*=256);)this[n+O]=t/x&255;return n+a},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,n,a,_){t=+t,n>>>=0,a>>>=0,_||W(this,t,n,a,Math.pow(2,8*a)-1,0);let x=a-1,O=1;for(this[n+x]=255&t;--x>=0&&(O*=256);)this[n+x]=t/O&255;return n+a},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,1,255,0),this[n]=255&t,n+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,65535,0),this[n]=255&t,this[n+1]=t>>>8,n+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=255&t,n+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t,n+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t,n+4},c.prototype.writeBigUInt64LE=X(function(t,n=0){return se(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=X(function(t,n=0){return ye(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(t,n,a,_){if(t=+t,n>>>=0,!_){const je=Math.pow(2,8*a-1);W(this,t,n,a,je-1,-je)}let x=0,O=1,be=0;for(this[n]=255&t;++x<a&&(O*=256);)t<0&&0===be&&0!==this[n+x-1]&&(be=1),this[n+x]=(t/O|0)-be&255;return n+a},c.prototype.writeIntBE=function(t,n,a,_){if(t=+t,n>>>=0,!_){const je=Math.pow(2,8*a-1);W(this,t,n,a,je-1,-je)}let x=a-1,O=1,be=0;for(this[n+x]=255&t;--x>=0&&(O*=256);)t<0&&0===be&&0!==this[n+x+1]&&(be=1),this[n+x]=(t/O|0)-be&255;return n+a},c.prototype.writeInt8=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=255&t,n+1},c.prototype.writeInt16LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,32767,-32768),this[n]=255&t,this[n+1]=t>>>8,n+2},c.prototype.writeInt16BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=255&t,n+2},c.prototype.writeInt32LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,2147483647,-2147483648),this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4},c.prototype.writeInt32BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t,n+4},c.prototype.writeBigInt64LE=X(function(t,n=0){return se(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=X(function(t,n=0){return ye(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(t,n,a){return Be(this,t,n,!0,a)},c.prototype.writeFloatBE=function(t,n,a){return Be(this,t,n,!1,a)},c.prototype.writeDoubleLE=function(t,n,a){return he(this,t,n,!0,a)},c.prototype.writeDoubleBE=function(t,n,a){return he(this,t,n,!1,a)},c.prototype.copy=function(t,n,a,_){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(a||(a=0),!_&&0!==_&&(_=this.length),n>=t.length&&(n=t.length),n||(n=0),_>0&&_<a&&(_=a),_===a||0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("sourceEnd out of bounds");_>this.length&&(_=this.length),t.length-n<_-a&&(_=t.length-n+a);const x=_-a;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(n,a,_):Uint8Array.prototype.set.call(t,this.subarray(a,_),n),x},c.prototype.fill=function(t,n,a,_){if("string"==typeof t){if("string"==typeof n?(_=n,n=0,a=this.length):"string"==typeof a&&(_=a,a=this.length),void 0!==_&&"string"!=typeof _)throw new TypeError("encoding must be a string");if("string"==typeof _&&!c.isEncoding(_))throw new TypeError("Unknown encoding: "+_);if(1===t.length){const O=t.charCodeAt(0);("utf8"===_&&O<128||"latin1"===_)&&(t=O)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(n<0||this.length<n||this.length<a)throw new RangeError("Out of range index");if(a<=n)return this;let x;if(n>>>=0,a=void 0===a?this.length:a>>>0,t||(t=0),"number"==typeof t)for(x=n;x<a;++x)this[x]=t;else{const O=c.isBuffer(t)?t:c.from(t,_),be=O.length;if(0===be)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(x=0;x<a-n;++x)this[x+n]=O[x%be]}return this};const Pe={};function Ce(o,t,n){Pe[o]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${o}]`,delete this.name}get code(){return o}set code(_){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_,writable:!0})}toString(){return`${this.name} [${o}]: ${this.message}`}}}function De(o){let t="",n=o.length;const a="-"===o[0]?1:0;for(;n>=a+4;n-=3)t=`_${o.slice(n-3,n)}${t}`;return`${o.slice(0,n)}${t}`}function ge(o,t,n,a,_,x){if(o>n||o<t){const O="bigint"==typeof t?"n":"";let be;throw be=x>3?0===t||t===BigInt(0)?`>= 0${O} and < 2${O} ** ${8*(x+1)}${O}`:`>= -(2${O} ** ${8*(x+1)-1}${O}) and < 2 ** ${8*(x+1)-1}${O}`:`>= ${t}${O} and <= ${n}${O}`,new Pe.ERR_OUT_OF_RANGE("value",be,o)}!function $e(o,t,n){Te(t,"offset"),(void 0===o[t]||void 0===o[t+n])&&m(t,o.length-(n+1))}(a,_,x)}function Te(o,t){if("number"!=typeof o)throw new Pe.ERR_INVALID_ARG_TYPE(t,"number",o)}function m(o,t,n){throw Math.floor(o)!==o?(Te(o,n),new Pe.ERR_OUT_OF_RANGE(n||"offset","an integer",o)):t<0?new Pe.ERR_BUFFER_OUT_OF_BOUNDS:new Pe.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,o)}Ce("ERR_BUFFER_OUT_OF_BOUNDS",function(o){return o?`${o} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ce("ERR_INVALID_ARG_TYPE",function(o,t){return`The "${o}" argument must be of type number. Received type ${typeof t}`},TypeError),Ce("ERR_OUT_OF_RANGE",function(o,t,n){let a=`The value of "${o}" is out of range.`,_=n;return Number.isInteger(n)&&Math.abs(n)>2**32?_=De(String(n)):"bigint"==typeof n&&(_=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(_=De(_)),_+="n"),a+=` It must be ${t}. Received ${_}`,a},RangeError);const R=/[^+/0-9A-Za-z-_]/g;function ie(o,t){let n;t=t||1/0;const a=o.length;let _=null;const x=[];for(let O=0;O<a;++O){if(n=o.charCodeAt(O),n>55295&&n<57344){if(!_){if(n>56319){(t-=3)>-1&&x.push(239,191,189);continue}if(O+1===a){(t-=3)>-1&&x.push(239,191,189);continue}_=n;continue}if(n<56320){(t-=3)>-1&&x.push(239,191,189),_=n;continue}n=65536+(_-55296<<10|n-56320)}else _&&(t-=3)>-1&&x.push(239,191,189);if(_=null,n<128){if((t-=1)<0)break;x.push(n)}else if(n<2048){if((t-=2)<0)break;x.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;x.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;x.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return x}function f(o){return g.toByteArray(function D(o){if((o=(o=o.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;o.length%4!=0;)o+="=";return o}(o))}function A(o,t,n,a){let _;for(_=0;_<a&&!(_+n>=t.length||_>=o.length);++_)t[_+n]=o[_];return _}function F(o,t){return o instanceof t||null!=o&&null!=o.constructor&&null!=o.constructor.name&&o.constructor.name===t.name}function Z(o){return o!=o}const ae=function(){const o="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const a=16*n;for(let _=0;_<16;++_)t[a+_]=o[n]+o[_]}return t}();function X(o){return typeof BigInt>"u"?Se:o}function Se(){throw new Error("BigInt not supported")}},44356(te){"use strict";var g,ne="object"==typeof Reflect?Reflect:null,u=ne&&"function"==typeof ne.apply?ne.apply:function(p,E,v){return Function.prototype.apply.call(p,E,v)};g=ne&&"function"==typeof ne.ownKeys?ne.ownKeys:Object.getOwnPropertySymbols?function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:function(p){return Object.getOwnPropertyNames(p)};var P=Number.isNaN||function(p){return p!=p};function N(){N.init.call(this)}te.exports=N,te.exports.once=function q(d,p){return new Promise(function(E,v){function Y(ee){d.removeListener(p,de),v(ee)}function de(){"function"==typeof d.removeListener&&d.removeListener("error",Y),E([].slice.call(arguments))}h(d,p,de,{once:!0}),"error"!==p&&function I(d,p,E){"function"==typeof d.on&&h(d,"error",p,E)}(d,Y,{once:!0})})},N.EventEmitter=N,N.prototype._events=void 0,N.prototype._eventsCount=0,N.prototype._maxListeners=void 0;var M=10;function S(d){if("function"!=typeof d)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof d)}function c(d){return void 0===d._maxListeners?N.defaultMaxListeners:d._maxListeners}function B(d,p,E,v){var Y,de,ee;if(S(E),void 0===(de=d._events)?(de=d._events=Object.create(null),d._eventsCount=0):(void 0!==de.newListener&&(d.emit("newListener",p,E.listener?E.listener:E),de=d._events),ee=de[p]),void 0===ee)ee=de[p]=E,++d._eventsCount;else if("function"==typeof ee?ee=de[p]=v?[E,ee]:[ee,E]:v?ee.unshift(E):ee.push(E),(Y=c(d))>0&&ee.length>Y&&!ee.warned){ee.warned=!0;var me=new Error("Possible EventEmitter memory leak detected. "+ee.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");me.name="MaxListenersExceededWarning",me.emitter=d,me.type=p,me.count=ee.length,function C(d){console&&console.warn&&console.warn(d)}(me)}return d}function z(){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 U(d,p,E){var v={fired:!1,wrapFn:void 0,target:d,type:p,listener:E},Y=z.bind(v);return Y.listener=E,v.wrapFn=Y,Y}function j(d,p,E){var v=d._events;if(void 0===v)return[];var Y=v[p];return void 0===Y?[]:"function"==typeof Y?E?[Y.listener||Y]:[Y]:E?function K(d){for(var p=new Array(d.length),E=0;E<p.length;++E)p[E]=d[E].listener||d[E];return p}(Y):L(Y,Y.length)}function V(d){var p=this._events;if(void 0!==p){var E=p[d];if("function"==typeof E)return 1;if(void 0!==E)return E.length}return 0}function L(d,p){for(var E=new Array(p),v=0;v<p;++v)E[v]=d[v];return E}function h(d,p,E,v){if("function"==typeof d.on)v.once?d.once(p,E):d.on(p,E);else{if("function"!=typeof d.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof d);d.addEventListener(p,function Y(de){v.once&&d.removeEventListener(p,Y),E(de)})}}Object.defineProperty(N,"defaultMaxListeners",{enumerable:!0,get:function(){return M},set:function(d){if("number"!=typeof d||d<0||P(d))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+d+".");M=d}}),N.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},N.prototype.setMaxListeners=function(p){if("number"!=typeof p||p<0||P(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this},N.prototype.getMaxListeners=function(){return c(this)},N.prototype.emit=function(p){for(var E=[],v=1;v<arguments.length;v++)E.push(arguments[v]);var Y="error"===p,de=this._events;if(void 0!==de)Y=Y&&void 0===de.error;else if(!Y)return!1;if(Y){var ee;if(E.length>0&&(ee=E[0]),ee instanceof Error)throw ee;var me=new Error("Unhandled error."+(ee?" ("+ee.message+")":""));throw me.context=ee,me}var k=de[p];if(void 0===k)return!1;if("function"==typeof k)u(k,this,E);else{var re=k.length,J=L(k,re);for(v=0;v<re;++v)u(J[v],this,E)}return!0},N.prototype.on=N.prototype.addListener=function(p,E){return B(this,p,E,!1)},N.prototype.prependListener=function(p,E){return B(this,p,E,!0)},N.prototype.once=function(p,E){return S(E),this.on(p,U(this,p,E)),this},N.prototype.prependOnceListener=function(p,E){return S(E),this.prependListener(p,U(this,p,E)),this},N.prototype.off=N.prototype.removeListener=function(p,E){var v,Y,de,ee,me;if(S(E),void 0===(Y=this._events))return this;if(void 0===(v=Y[p]))return this;if(v===E||v.listener===E)0===--this._eventsCount?this._events=Object.create(null):(delete Y[p],Y.removeListener&&this.emit("removeListener",p,v.listener||E));else if("function"!=typeof v){for(de=-1,ee=v.length-1;ee>=0;ee--)if(v[ee]===E||v[ee].listener===E){me=v[ee].listener,de=ee;break}if(de<0)return this;0===de?v.shift():function $(d,p){for(;p+1<d.length;p++)d[p]=d[p+1];d.pop()}(v,de),1===v.length&&(Y[p]=v[0]),void 0!==Y.removeListener&&this.emit("removeListener",p,me||E)}return this},N.prototype.removeAllListeners=function(p){var E,v,Y;if(void 0===(v=this._events))return this;if(void 0===v.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==v[p]&&(0===--this._eventsCount?this._events=Object.create(null):delete v[p]),this;if(0===arguments.length){var ee,de=Object.keys(v);for(Y=0;Y<de.length;++Y)"removeListener"!==(ee=de[Y])&&this.removeAllListeners(ee);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(E=v[p]))this.removeListener(p,E);else if(void 0!==E)for(Y=E.length-1;Y>=0;Y--)this.removeListener(p,E[Y]);return this},N.prototype.listeners=function(p){return j(this,p,!0)},N.prototype.rawListeners=function(p){return j(this,p,!1)},N.listenerCount=function(d,p){return"function"==typeof d.listenerCount?d.listenerCount(p):V.call(d,p)},N.prototype.listenerCount=V,N.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]}},22020(te,ne){ne.read=function(u,g,C,P,N){var M,S,c=8*N-P-1,B=(1<<c)-1,z=B>>1,U=-7,j=C?N-1:0,V=C?-1:1,L=u[g+j];for(j+=V,M=L&(1<<-U)-1,L>>=-U,U+=c;U>0;M=256*M+u[g+j],j+=V,U-=8);for(S=M&(1<<-U)-1,M>>=-U,U+=P;U>0;S=256*S+u[g+j],j+=V,U-=8);if(0===M)M=1-z;else{if(M===B)return S?NaN:1/0*(L?-1:1);S+=Math.pow(2,P),M-=z}return(L?-1:1)*S*Math.pow(2,M-P)},ne.write=function(u,g,C,P,N,M){var S,c,B,z=8*M-N-1,U=(1<<z)-1,j=U>>1,V=23===N?Math.pow(2,-24)-Math.pow(2,-77):0,L=P?0:M-1,$=P?1:-1,K=g<0||0===g&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(c=isNaN(g)?1:0,S=U):(S=Math.floor(Math.log(g)/Math.LN2),g*(B=Math.pow(2,-S))<1&&(S--,B*=2),(g+=S+j>=1?V/B:V*Math.pow(2,1-j))*B>=2&&(S++,B/=2),S+j>=U?(c=0,S=U):S+j>=1?(c=(g*B-1)*Math.pow(2,N),S+=j):(c=g*Math.pow(2,j-1)*Math.pow(2,N),S=0));N>=8;u[C+L]=255&c,L+=$,c/=256,N-=8);for(S=S<<N|c,z+=N;z>0;u[C+L]=255&S,L+=$,S/=256,z-=8);u[C+L-$]|=128*K}},14129(te,ne,u){"use strict";const{SymbolDispose:g}=u(35280),{AbortError:C,codes:P}=u(90485),{isNodeStream:N,isWebStream:M,kControllerErrorFunction:S}=u(96545),c=u(47404),{ERR_INVALID_ARG_TYPE:B}=P;let z;te.exports.addAbortSignal=function(V,L){if((j=>{if("object"!=typeof j||!("aborted"in j))throw new B("signal","AbortSignal",j)})(V),!N(L)&&!M(L))throw new B("stream",["ReadableStream","WritableStream","Stream"],L);return te.exports.addAbortSignalNoValidate(V,L)},te.exports.addAbortSignalNoValidate=function(j,V){if("object"!=typeof j||!("aborted"in j))return V;const L=N(V)?()=>{V.destroy(new C(void 0,{cause:j.reason}))}:()=>{V[S](new C(void 0,{cause:j.reason}))};if(j.aborted)L();else{z=z||u(54326).addAbortListener;const $=z(j,L);c(V,$[g])}return V}},79187(te,ne,u){"use strict";const{StringPrototypeSlice:g,SymbolIterator:C,TypedArrayPrototypeSet:P,Uint8Array:N}=u(35280),{Buffer:M}=u(83838),{inspect:S}=u(54326);te.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(B){const z={data:B,next:null};this.length>0?this.tail.next=z:this.head=z,this.tail=z,++this.length}unshift(B){const z={data:B,next:this.head};0===this.length&&(this.tail=z),this.head=z,++this.length}shift(){if(0===this.length)return;const B=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,B}clear(){this.head=this.tail=null,this.length=0}join(B){if(0===this.length)return"";let z=this.head,U=""+z.data;for(;null!==(z=z.next);)U+=B+z.data;return U}concat(B){if(0===this.length)return M.alloc(0);const z=M.allocUnsafe(B>>>0);let U=this.head,j=0;for(;U;)P(z,U.data,j),j+=U.data.length,U=U.next;return z}consume(B,z){const U=this.head.data;if(B<U.length){const j=U.slice(0,B);return this.head.data=U.slice(B),j}return B===U.length?this.shift():z?this._getString(B):this._getBuffer(B)}first(){return this.head.data}*[C](){for(let B=this.head;B;B=B.next)yield B.data}_getString(B){let z="",U=this.head,j=0;do{const V=U.data;if(!(B>V.length)){B===V.length?(z+=V,++j,this.head=U.next?U.next:this.tail=null):(z+=g(V,0,B),this.head=U,U.data=g(V,B));break}z+=V,B-=V.length,++j}while(null!==(U=U.next));return this.length-=j,z}_getBuffer(B){const z=M.allocUnsafe(B),U=B;let j=this.head,V=0;do{const L=j.data;if(!(B>L.length)){B===L.length?(P(z,L,U-B),++V,this.head=j.next?j.next:this.tail=null):(P(z,new N(L.buffer,L.byteOffset,B),U-B),this.head=j,j.data=L.slice(B));break}P(z,L,U-B),B-=L.length,++V}while(null!==(j=j.next));return this.length-=V,z}[Symbol.for("nodejs.util.inspect.custom")](B,z){return S(this,{...z,depth:0,customInspect:!1})}}},80984(te,ne,u){"use strict";var g=u(29293).default;const{pipeline:C}=u(96208),P=u(44088),{destroyer:N}=u(53014),{isNodeStream:M,isReadable:S,isWritable:c,isWebStream:B,isTransformStream:z,isWritableStream:U,isReadableStream:j}=u(96545),{AbortError:V,codes:{ERR_INVALID_ARG_VALUE:L,ERR_MISSING_ARGS:$}}=u(90485),K=u(47404);te.exports=function(...I){if(0===I.length)throw new $("streams");if(1===I.length)return P.from(I[0]);const h=[...I];if("function"==typeof I[0]&&(I[0]=P.from(I[0])),"function"==typeof I[I.length-1]){const J=I.length-1;I[J]=P.from(I[J])}for(let J=0;J<I.length;++J)if(M(I[J])||B(I[J])){if(J<I.length-1&&!(S(I[J])||j(I[J])||z(I[J])))throw new L(`streams[${J}]`,h[J],"must be readable");if(J>0&&!(c(I[J])||U(I[J])||z(I[J])))throw new L(`streams[${J}]`,h[J],"must be writable")}let d,p,E,v,Y;const ee=I[0],me=C(I,function de(J){const le=v;v=null,le?le(J):J?Y.destroy(J):!re&&!k&&Y.destroy()}),k=!!(c(ee)||U(ee)||z(ee)),re=!!(S(me)||j(me)||z(me));if(Y=new P({writableObjectMode:!(null==ee||!ee.writableObjectMode),readableObjectMode:!(null==me||!me.readableObjectMode),writable:k,readable:re}),k){if(M(ee))Y._write=function(le,xe,fe){ee.write(le,xe)?fe():d=fe},Y._final=function(le){ee.end(),p=le},ee.on("drain",function(){if(d){const le=d;d=null,le()}});else if(B(ee)){const xe=(z(ee)?ee.writable:ee).getWriter();Y._write=function(){var fe=g(function*(G,Ae,Q){try{yield xe.ready,xe.write(G).catch(()=>{}),Q()}catch(ce){Q(ce)}});return function(G,Ae,Q){return fe.apply(this,arguments)}}(),Y._final=function(){var fe=g(function*(G){try{yield xe.ready,xe.close().catch(()=>{}),p=G}catch(Ae){G(Ae)}});return function(G){return fe.apply(this,arguments)}}()}const J=z(me)?me.readable:me;K(J,()=>{if(p){const le=p;p=null,le()}})}if(re)if(M(me))me.on("readable",function(){if(E){const J=E;E=null,J()}}),me.on("end",function(){Y.push(null)}),Y._read=function(){for(;;){const J=me.read();if(null===J)return void(E=Y._read);if(!Y.push(J))return}};else if(B(me)){const le=(z(me)?me.readable:me).getReader();Y._read=g(function*(){for(;;)try{const{value:xe,done:fe}=yield le.read();if(!Y.push(xe))return;if(fe)return void Y.push(null)}catch{return}})}return Y._destroy=function(J,le){!J&&null!==v&&(J=new V),E=null,d=null,p=null,null===v?le(J):(v=le,M(me)&&N(me,J))},Y}},53014(te,ne,u){"use strict";const g=u(40573),{aggregateTwoErrors:C,codes:{ERR_MULTIPLE_CALLBACK:P},AbortError:N}=u(90485),{Symbol:M}=u(35280),{kIsDestroyed:S,isDestroyed:c,isFinished:B,isServerRequest:z}=u(96545),U=M("kDestroy"),j=M("kConstruct");function V(k,re,J){k&&(re&&!re.errored&&(re.errored=k),J&&!J.errored&&(J.errored=k))}function $(k,re,J){let le=!1;function xe(fe){if(le)return;le=!0;const G=k._readableState,Ae=k._writableState;V(fe,Ae,G),Ae&&(Ae.closed=!0),G&&(G.closed=!0),"function"==typeof J&&J(fe),fe?g.nextTick(K,k,fe):g.nextTick(q,k)}try{k._destroy(re||null,xe)}catch(fe){xe(fe)}}function K(k,re){I(k,re),q(k)}function q(k){const re=k._readableState,J=k._writableState;J&&(J.closeEmitted=!0),re&&(re.closeEmitted=!0),(null!=J&&J.emitClose||null!=re&&re.emitClose)&&k.emit("close")}function I(k,re){const J=k._readableState,le=k._writableState;null!=le&&le.errorEmitted||null!=J&&J.errorEmitted||(le&&(le.errorEmitted=!0),J&&(J.errorEmitted=!0),k.emit("error",re))}function d(k,re,J){const le=k._readableState,xe=k._writableState;if(null!=xe&&xe.destroyed||null!=le&&le.destroyed)return this;null!=le&&le.autoDestroy||null!=xe&&xe.autoDestroy?k.destroy(re):re&&(xe&&!xe.errored&&(xe.errored=re),le&&!le.errored&&(le.errored=re),J?g.nextTick(I,k,re):I(k,re))}function E(k){let re=!1;function J(le){if(re)return void d(k,le??new P);re=!0;const xe=k._readableState,fe=k._writableState,G=fe||xe;xe&&(xe.constructed=!0),fe&&(fe.constructed=!0),G.destroyed?k.emit(U,le):le?d(k,le,!0):g.nextTick(v,k)}try{k._construct(le=>{g.nextTick(J,le)})}catch(le){g.nextTick(J,le)}}function v(k){k.emit(j)}function Y(k){return k?.setHeader&&"function"==typeof k.abort}function de(k){k.emit("close")}function ee(k,re){k.emit("error",re),g.nextTick(de,k)}te.exports={construct:function p(k,re){if("function"!=typeof k._construct)return;const J=k._readableState,le=k._writableState;J&&(J.constructed=!1),le&&(le.constructed=!1),k.once(j,re),!(k.listenerCount(j)>1)&&g.nextTick(E,k)},destroyer:function me(k,re){!k||c(k)||(!re&&!B(k)&&(re=new N),z(k)?(k.socket=null,k.destroy(re)):Y(k)?k.abort():Y(k.req)?k.req.abort():"function"==typeof k.destroy?k.destroy(re):"function"==typeof k.close?k.close():re?g.nextTick(ee,k,re):g.nextTick(de,k),k.destroyed||(k[S]=!0))},destroy:function L(k,re){const J=this._readableState,le=this._writableState,xe=le||J;return null!=le&&le.destroyed||null!=J&&J.destroyed?("function"==typeof re&&re(),this):(V(k,le,J),le&&(le.destroyed=!0),J&&(J.destroyed=!0),xe.constructed?$(this,k,re):this.once(U,function(fe){$(this,C(fe,k),re)}),this)},undestroy:function h(){const k=this._readableState,re=this._writableState;k&&(k.constructed=!0,k.closed=!1,k.closeEmitted=!1,k.destroyed=!1,k.errored=null,k.errorEmitted=!1,k.reading=!1,k.ended=!1===k.readable,k.endEmitted=!1===k.readable),re&&(re.constructed=!0,re.destroyed=!1,re.closed=!1,re.closeEmitted=!1,re.errored=null,re.errorEmitted=!1,re.finalCalled=!1,re.prefinished=!1,re.ended=!1===re.writable,re.ending=!1===re.writable,re.finished=!1===re.writable)},errorOrDestroy:d}},44088(te,ne,u){"use strict";const{ObjectDefineProperties:g,ObjectGetOwnPropertyDescriptor:C,ObjectKeys:P,ObjectSetPrototypeOf:N}=u(35280);te.exports=c;const M=u(33774),S=u(74850);N(c.prototype,M.prototype),N(c,M);{const j=P(S.prototype);for(let V=0;V<j.length;V++){const L=j[V];c.prototype[L]||(c.prototype[L]=S.prototype[L])}}function c(j){if(!(this instanceof c))return new c(j);M.call(this,j),S.call(this,j),j?(this.allowHalfOpen=!1!==j.allowHalfOpen,!1===j.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===j.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let B,U;function z(){return void 0===B&&(B={}),B}g(c.prototype,{writable:{__proto__:null,...C(S.prototype,"writable")},writableHighWaterMark:{__proto__:null,...C(S.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...C(S.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...C(S.prototype,"writableBuffer")},writableLength:{__proto__:null,...C(S.prototype,"writableLength")},writableFinished:{__proto__:null,...C(S.prototype,"writableFinished")},writableCorked:{__proto__:null,...C(S.prototype,"writableCorked")},writableEnded:{__proto__:null,...C(S.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...C(S.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(j){this._readableState&&this._writableState&&(this._readableState.destroyed=j,this._writableState.destroyed=j)}}}),c.fromWeb=function(j,V){return z().newStreamDuplexFromReadableWritablePair(j,V)},c.toWeb=function(j){return z().newReadableWritablePairFromDuplex(j)},c.from=function(j){return U||(U=u(98888)),U(j,"body")}},98888(te,ne,u){var g=u(29293).default,C=u(53344).default,P=u(42958).default;const N=u(40573),M=u(83838),{isReadable:S,isWritable:c,isIterable:B,isNodeStream:z,isReadableNodeStream:U,isWritableNodeStream:j,isDuplexNodeStream:V,isReadableStream:L,isWritableStream:$}=u(96545),K=u(47404),{AbortError:q,codes:{ERR_INVALID_ARG_TYPE:I,ERR_INVALID_RETURN_VALUE:h}}=u(90485),{destroyer:d}=u(53014),p=u(44088),E=u(33774),v=u(74850),{createDeferredPromise:Y}=u(54326),de=u(29814),ee=globalThis.Blob||M.Blob,me=typeof ee<"u"?function(G){return G instanceof ee}:function(G){return!1},k=globalThis.AbortController||u(9465).AbortController,{FunctionPrototypeCall:re}=u(35280);class J extends p{constructor(G){super(G),!1===G?.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===G?.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function xe(fe){const G=fe.readable&&"function"!=typeof fe.readable.read?E.wrap(fe.readable):fe.readable,Ae=fe.writable;let y,W,se,ye,Ee,Q=!!S(G),ce=!!c(Ae);function Be(he){const Pe=ye;ye=null,Pe?Pe(he):he&&Ee.destroy(he)}return Ee=new J({readableObjectMode:!(null==G||!G.readableObjectMode),writableObjectMode:!(null==Ae||!Ae.writableObjectMode),readable:Q,writable:ce}),ce&&(K(Ae,he=>{ce=!1,he&&d(G,he),Be(he)}),Ee._write=function(he,Pe,Ce){Ae.write(he,Pe)?Ce():y=Ce},Ee._final=function(he){Ae.end(),W=he},Ae.on("drain",function(){if(y){const he=y;y=null,he()}}),Ae.on("finish",function(){if(W){const he=W;W=null,he()}})),Q&&(K(G,he=>{Q=!1,he&&d(G,he),Be(he)}),G.on("readable",function(){if(se){const he=se;se=null,he()}}),G.on("end",function(){Ee.push(null)}),Ee._read=function(){for(;;){const he=G.read();if(null===he)return void(se=Ee._read);if(!Ee.push(he))return}}),Ee._destroy=function(he,Pe){!he&&null!==ye&&(he=new q),se=null,y=null,W=null,null===ye?Pe(he):(ye=Pe,d(Ae,he),d(G,he))},Ee}te.exports=function fe(G,Ae){if(V(G))return G;if(U(G))return xe({readable:G});if(j(G))return xe({writable:G});if(z(G))return xe({writable:!1,readable:!1});if(L(G))return xe({readable:E.fromWeb(G)});if($(G))return xe({writable:v.fromWeb(G)});if("function"==typeof G){const{value:ce,write:y,final:W,destroy:se}=function le(fe){let{promise:G,resolve:Ae}=Y();const Q=new k,ce=Q.signal;return{value:fe(P(function*(){for(;;){const W=G;G=null;const{chunk:se,done:ye,cb:Ee}=yield C(W);if(N.nextTick(Ee),ye)return;if(ce.aborted)throw new q(void 0,{cause:ce.reason});({promise:G,resolve:Ae}=Y()),yield se}})(),{signal:ce}),write(W,se,ye){const Ee=Ae;Ae=null,Ee({chunk:W,done:!1,cb:ye})},final(W){const se=Ae;Ae=null,se({done:!0,cb:W})},destroy(W,se){Q.abort(),se(W)}}}(G);if(B(ce))return de(J,ce,{objectMode:!0,write:y,final:W,destroy:se});const ye=ce?.then;if("function"==typeof ye){let Ee;const Be=re(ye,ce,he=>{if(null!=he)throw new h("nully","body",he)},he=>{d(Ee,he)});return Ee=new J({objectMode:!0,readable:!1,write:y,final(he){W(g(function*(){try{yield Be,N.nextTick(he,null)}catch(Pe){N.nextTick(he,Pe)}}))},destroy:se})}throw new h("Iterable, AsyncIterable or AsyncFunction",Ae,ce)}if(me(G))return fe(G.arrayBuffer());if(B(G))return de(J,G,{objectMode:!0,writable:!1});if(L(G?.readable)&&$(G?.writable))return J.fromWeb(G);if("object"==typeof G?.writable||"object"==typeof G?.readable)return xe({readable:null!=G&&G.readable?U(G?.readable)?G?.readable:fe(G.readable):void 0,writable:null!=G&&G.writable?j(G?.writable)?G?.writable:fe(G.writable):void 0});const Q=G?.then;if("function"==typeof Q){let ce;return re(Q,G,y=>{null!=y&&ce.push(y),ce.push(null)},y=>{d(ce,y)}),ce=new J({objectMode:!0,writable:!1,read(){}})}throw new I(Ae,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],G)}},47404(te,ne,u){"use strict";const g=u(40573),{AbortError:C,codes:P}=u(90485),{ERR_INVALID_ARG_TYPE:N,ERR_STREAM_PREMATURE_CLOSE:M}=P,{kEmptyObject:S,once:c}=u(54326),{validateAbortSignal:B,validateFunction:z,validateObject:U,validateBoolean:j}=u(66563),{Promise:V,PromisePrototypeThen:L,SymbolDispose:$}=u(35280),{isClosed:K,isReadable:q,isReadableNodeStream:I,isReadableStream:h,isReadableFinished:d,isReadableErrored:p,isWritable:E,isWritableNodeStream:v,isWritableStream:Y,isWritableFinished:de,isWritableErrored:ee,isNodeStream:me,willEmitClose:k,kIsClosedPromise:re}=u(96545);let J;const xe=()=>{};function fe(Q,ce,y){var W,se;if(2===arguments.length?(y=ce,ce=S):null==ce?ce=S:U(ce,"options"),z(y,"callback"),B(ce.signal,"options.signal"),y=c(y),h(Q)||Y(Q))return function G(Q,ce,y){let W=!1,se=xe;if(ce.signal)if(se=()=>{W=!0,y.call(Q,new C(void 0,{cause:ce.signal.reason}))},ce.signal.aborted)g.nextTick(se);else{J=J||u(54326).addAbortListener;const Ee=J(ce.signal,se),Be=y;y=c((...he)=>{Ee[$](),Be.apply(Q,he)})}const ye=(...Ee)=>{W||g.nextTick(()=>y.apply(Q,Ee))};return L(Q[re].promise,ye,ye),xe}(Q,ce,y);if(!me(Q))throw new N("stream",["ReadableStream","WritableStream","Stream"],Q);const ye=null!==(W=ce.readable)&&void 0!==W?W:I(Q),Ee=null!==(se=ce.writable)&&void 0!==se?se:v(Q),Be=Q._writableState,he=Q._readableState,Pe=()=>{Q.writable||$e()};let Ce=k(Q)&&I(Q)===ye&&v(Q)===Ee,De=de(Q,!1);const $e=()=>{De=!0,Q.destroyed&&(Ce=!1),(!Ce||Q.readable&&!ye)&&(!ye||ge)&&y.call(Q)};let ge=d(Q,!1);const Te=()=>{ge=!0,Q.destroyed&&(Ce=!1),(!Ce||Q.writable&&!Ee)&&(!Ee||De)&&y.call(Q)},m=f=>{y.call(Q,f)};let R=K(Q);const D=()=>{R=!0;const f=ee(Q)||p(Q);return f&&"boolean"!=typeof f?y.call(Q,f):ye&&!ge&&I(Q,!0)&&!d(Q,!1)?y.call(Q,new M):!Ee||De||de(Q,!1)?void y.call(Q):y.call(Q,new M)},ie=()=>{R=!0;const f=ee(Q)||p(Q);if(f&&"boolean"!=typeof f)return y.call(Q,f);y.call(Q)},oe=()=>{Q.req.on("finish",$e)};!function le(Q){return Q.setHeader&&"function"==typeof Q.abort}(Q)?Ee&&!Be&&(Q.on("end",Pe),Q.on("close",Pe)):(Q.on("complete",$e),Ce||Q.on("abort",D),Q.req?oe():Q.on("request",oe)),!Ce&&"boolean"==typeof Q.aborted&&Q.on("aborted",D),Q.on("end",Te),Q.on("finish",$e),!1!==ce.error&&Q.on("error",m),Q.on("close",D),R?g.nextTick(D):null!=Be&&Be.errorEmitted||null!=he&&he.errorEmitted?Ce||g.nextTick(ie):(!ye&&(!Ce||q(Q))&&(De||!1===E(Q))||!Ee&&(!Ce||E(Q))&&(ge||!1===q(Q))||he&&Q.req&&Q.aborted)&&g.nextTick(ie);const Ie=()=>{y=xe,Q.removeListener("aborted",D),Q.removeListener("complete",$e),Q.removeListener("abort",D),Q.removeListener("request",oe),Q.req&&Q.req.removeListener("finish",$e),Q.removeListener("end",Pe),Q.removeListener("close",Pe),Q.removeListener("finish",$e),Q.removeListener("end",Te),Q.removeListener("error",m),Q.removeListener("close",D)};if(ce.signal&&!R){const f=()=>{const A=y;Ie(),A.call(Q,new C(void 0,{cause:ce.signal.reason}))};if(ce.signal.aborted)g.nextTick(f);else{J=J||u(54326).addAbortListener;const A=J(ce.signal,f),F=y;y=c((...Z)=>{A[$](),F.apply(Q,Z)})}}return Ie}te.exports=fe,te.exports.finished=function Ae(Q,ce){var y;let W=!1;return null===ce&&(ce=S),null!==(y=ce)&&void 0!==y&&y.cleanup&&(j(ce.cleanup,"cleanup"),W=ce.cleanup),new V((se,ye)=>{const Ee=fe(Q,ce,Be=>{W&&Ee(),Be?ye(Be):se()})})}},29814(te,ne,u){"use strict";var g=u(29293).default;const C=u(40573),{PromisePrototypeThen:P,SymbolAsyncIterator:N,SymbolIterator:M}=u(35280),{Buffer:S}=u(83838),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:B}=u(90485).codes;te.exports=function z(U,j,V){let L,$;if("string"==typeof j||j instanceof S)return new U({objectMode:!0,...V,read(){this.push(j),this.push(null)}});if(j&&j[N])$=!0,L=j[N]();else{if(!j||!j[M])throw new c("iterable",["Iterable"],j);$=!1,L=j[M]()}const K=new U({objectMode:!0,highWaterMark:1,...V});let q=!1;function h(){return(h=g(function*(E){if(null!=E&&"function"==typeof L.throw){const{value:de,done:ee}=yield L.throw(E);if(yield de,ee)return}if("function"==typeof L.return){const{value:de}=yield L.return();yield de}})).apply(this,arguments)}function p(){return(p=g(function*(){for(;;){try{const{value:E,done:v}=$?yield L.next():L.next();if(v)K.push(null);else{const Y=E&&"function"==typeof E.then?yield E:E;if(null===Y)throw q=!1,new B;if(K.push(Y))continue;q=!1}}catch(E){K.destroy(E)}break}})).apply(this,arguments)}return K._read=function(){q||(q=!0,function d(){p.apply(this,arguments)}())},K._destroy=function(E,v){P(function I(E){return h.apply(this,arguments)}(E),()=>C.nextTick(v,E),Y=>C.nextTick(v,Y||E))},K}},82521(te,ne,u){"use strict";const{ArrayIsArray:g,ObjectSetPrototypeOf:C}=u(35280),{EventEmitter:P}=u(44356);function N(S){P.call(this,S)}function M(S,c,B){if("function"==typeof S.prependListener)return S.prependListener(c,B);S._events&&S._events[c]?g(S._events[c])?S._events[c].unshift(B):S._events[c]=[B,S._events[c]]:S.on(c,B)}C(N.prototype,P.prototype),C(N,P),N.prototype.pipe=function(S,c){const B=this;function z(q){S.writable&&!1===S.write(q)&&B.pause&&B.pause()}function U(){B.readable&&B.resume&&B.resume()}B.on("data",z),S.on("drain",U),!S._isStdio&&(!c||!1!==c.end)&&(B.on("end",V),B.on("close",L));let j=!1;function V(){j||(j=!0,S.end())}function L(){j||(j=!0,"function"==typeof S.destroy&&S.destroy())}function $(q){K(),0===P.listenerCount(this,"error")&&this.emit("error",q)}function K(){B.removeListener("data",z),S.removeListener("drain",U),B.removeListener("end",V),B.removeListener("close",L),B.removeListener("error",$),S.removeListener("error",$),B.removeListener("end",K),B.removeListener("close",K),S.removeListener("close",K)}return M(B,"error",$),M(S,"error",$),B.on("end",K),B.on("close",K),S.on("close",K),S.emit("pipe",B),S},te.exports={Stream:N,prependListener:M}},59597(te,ne,u){"use strict";var g=u(29293).default,C=u(93513).default,P=u(82881).default,N=u(53344).default,M=u(42958).default;const S=globalThis.AbortController||u(9465).AbortController,{codes:{ERR_INVALID_ARG_VALUE:c,ERR_INVALID_ARG_TYPE:B,ERR_MISSING_ARGS:z,ERR_OUT_OF_RANGE:U},AbortError:j}=u(90485),{validateAbortSignal:V,validateInteger:L,validateObject:$}=u(66563),K=u(35280).Symbol("kWeak"),q=u(35280).Symbol("kResistStopPropagation"),{finished:I}=u(47404),h=u(80984),{addAbortSignalNoValidate:d}=u(14129),{isWritable:p,isNodeStream:E}=u(96545),{deprecate:v}=u(54326),{ArrayPrototypePush:Y,Boolean:de,MathFloor:ee,Number:me,NumberIsNaN:k,Promise:re,PromiseReject:J,PromiseResolve:le,PromisePrototypeThen:xe,Symbol:fe}=u(35280),G=fe("kEmpty"),Ae=fe("kEof");function ce(f,A){if("function"!=typeof f)throw new B("fn",["Function","AsyncFunction"],f);null!=A&&$(A,"options"),null!=A?.signal&&V(A.signal,"options.signal");let F=1;null!=A?.concurrency&&(F=ee(A.concurrency));let Z=F-1;return null!=A?.highWaterMark&&(Z=ee(A.highWaterMark)),L(F,"options.concurrency",1),L(Z,"options.highWaterMark",0),Z+=F,(ae=M(function*(){const Se=u(54326).AbortSignalAny([A?.signal].filter(de)),o=this,t=[],n={signal:Se};let a,_,x=!1,O=0;function be(){x=!0,je()}function je(){O-=1,Fe()}function Fe(){_&&!x&&O<F&&t.length<Z&&(_(),_=null)}function ve(){return(ve=g(function*(){try{var Ue,We=!1,ke=!1;try{for(var Ke,ze=P(o);We=!(Ke=yield ze.next()).done;We=!1){let Ge=Ke.value;if(x)return;if(Se.aborted)throw new j;try{if(Ge=f(Ge,n),Ge===G)continue;Ge=le(Ge)}catch(Ve){Ge=J(Ve)}O+=1,xe(Ge,je,be),t.push(Ge),a&&(a(),a=null),!x&&(t.length>=Z||O>=F)&&(yield new re(Ve=>{_=Ve}))}}catch(Ge){ke=!0,Ue=Ge}finally{try{We&&null!=ze.return&&(yield ze.return())}finally{if(ke)throw Ue}}t.push(Ae)}catch(Ge){const Ve=J(Ge);xe(Ve,je,be),t.push(Ve)}finally{x=!0,a&&(a(),a=null)}})).apply(this,arguments)}!function Ne(){ve.apply(this,arguments)}();try{for(;;){for(;t.length>0;){const We=yield N(t[0]);if(We===Ae)return;if(Se.aborted)throw new j;We!==G&&(yield We),t.shift(),Fe()}yield N(new re(We=>{a=We}))}}finally{x=!0,_&&(_(),_=null)}}),function X(){return ae.apply(this,arguments)}).call(this);var ae}function W(f){return se.apply(this,arguments)}function se(){return(se=g(function*(f,A=void 0){var ae,F=!1,Z=!1;try{for(var X=P(De.call(this,f,A));F=!(yield X.next()).done;F=!1)return!0}catch(o){Z=!0,ae=o}finally{try{F&&null!=X.return&&(yield X.return())}finally{if(Z)throw ae}}return!1})).apply(this,arguments)}function Ee(){return(Ee=g(function*(f,A=void 0){if("function"!=typeof f)throw new B("fn",["Function","AsyncFunction"],f);return!(yield W.call(this,g(function*(...F){return!(yield f(...F))}),A))})).apply(this,arguments)}function he(){return(he=g(function*(f,A){var ae,F=!1,Z=!1;try{for(var Se,X=P(De.call(this,f,A));F=!(Se=yield X.next()).done;F=!1)return Se.value}catch(o){Z=!0,ae=o}finally{try{F&&null!=X.return&&(yield X.return())}finally{if(Z)throw ae}}})).apply(this,arguments)}function Ce(){return Ce=g(function*(f,A){if("function"!=typeof f)throw new B("fn",["Function","AsyncFunction"],f);function Z(){return(Z=g(function*(n,a){return yield f(n,a),G})).apply(this,arguments)}var Se,ae=!1,X=!1;try{for(var o=P(ce.call(this,function F(n,a){return Z.apply(this,arguments)},A));ae=!(yield o.next()).done;ae=!1);}catch(n){X=!0,Se=n}finally{try{ae&&null!=o.return&&(yield o.return())}finally{if(X)throw Se}}}),Ce.apply(this,arguments)}function De(f,A){if("function"!=typeof f)throw new B("fn",["Function","AsyncFunction"],f);function Z(){return(Z=g(function*(ae,X){return(yield f(ae,X))?ae:G})).apply(this,arguments)}return ce.call(this,function F(ae,X){return Z.apply(this,arguments)},A)}class $e extends z{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function Te(){return Te=g(function*(f,A,F){var Z;if("function"!=typeof f)throw new B("reducer",["Function","AsyncFunction"],f);null!=F&&$(F,"options"),null!=F?.signal&&V(F.signal,"options.signal");let ae=arguments.length>1;if(null!=F&&null!==(Z=F.signal)&&void 0!==Z&&Z.aborted){const be=new j(void 0,{cause:F.signal.reason});throw this.once("error",()=>{}),yield I(this.destroy(be)),be}const X=new S,Se=X.signal;null!=F&&F.signal&&F.signal.addEventListener("abort",()=>X.abort(),{once:!0,[K]:this,[q]:!0});let o=!1;try{var a,t=!1,n=!1;try{for(var x,_=P(this);t=!(x=yield _.next()).done;t=!1){const be=x.value;var O;if(o=!0,null!=F&&null!==(O=F.signal)&&void 0!==O&&O.aborted)throw new j;ae?A=yield f(A,be,{signal:Se}):(A=be,ae=!0)}}catch(be){n=!0,a=be}finally{try{t&&null!=_.return&&(yield _.return())}finally{if(n)throw a}}if(!o&&!ae)throw new $e}finally{X.abort()}return A}),Te.apply(this,arguments)}function R(){return(R=g(function*(f){null!=f&&$(f,"options"),null!=f?.signal&&V(f.signal,"options.signal");const A=[];var ae,F=!1,Z=!1;try{for(var Se,X=P(this);F=!(Se=yield X.next()).done;F=!1){const t=Se.value;var o;if(null!=f&&null!==(o=f.signal)&&void 0!==o&&o.aborted)throw new j(void 0,{cause:f.signal.reason});Y(A,t)}}catch(t){Z=!0,ae=t}finally{try{F&&null!=X.return&&(yield X.return())}finally{if(Z)throw ae}}return A})).apply(this,arguments)}function ie(f){if(f=me(f),k(f))return 0;if(f<0)throw new U("number",">= 0",f);return f}te.exports.streamReturningOperators={asIndexedPairs:v(function y(f=void 0){return null!=f&&$(f,"options"),null!=f?.signal&&V(f.signal,"options.signal"),(A=M(function*(){let Z=0;var Se,ae=!1,X=!1;try{for(var t,o=P(this);ae=!(t=yield N(o.next())).done;ae=!1){const a=t.value;var n;if(null!=f&&null!==(n=f.signal)&&void 0!==n&&n.aborted)throw new j({cause:f.signal.reason});yield[Z++,a]}}catch(a){X=!0,Se=a}finally{try{ae&&null!=o.return&&(yield N(o.return()))}finally{if(X)throw Se}}}),function F(){return A.apply(this,arguments)}).call(this);var A},"readable.asIndexedPairs will be removed in a future version."),drop:function oe(f,A=void 0){return null!=A&&$(A,"options"),null!=A?.signal&&V(A.signal,"options.signal"),f=ie(f),(F=M(function*(){var ae;if(null!=A&&null!==(ae=A.signal)&&void 0!==ae&&ae.aborted)throw new j;var o,X=!1,Se=!1;try{for(var n,t=P(this);X=!(n=yield N(t.next())).done;X=!1){const _=n.value;var a;if(null!=A&&null!==(a=A.signal)&&void 0!==a&&a.aborted)throw new j;f--<=0&&(yield _)}}catch(_){Se=!0,o=_}finally{try{X&&null!=t.return&&(yield N(t.return()))}finally{if(Se)throw o}}}),function Z(){return F.apply(this,arguments)}).call(this);var F},filter:De,flatMap:function D(f,A){const F=ce.call(this,f,A);return(Z=M(function*(){var o,X=!1,Se=!1;try{for(var n,t=P(F);X=!(n=yield N(t.next())).done;X=!1){const a=n.value;yield*C(P(a),N)}}catch(a){Se=!0,o=a}finally{try{X&&null!=t.return&&(yield N(t.return()))}finally{if(Se)throw o}}}),function ae(){return Z.apply(this,arguments)}).call(this);var Z},map:ce,take:function Ie(f,A=void 0){return null!=A&&$(A,"options"),null!=A?.signal&&V(A.signal,"options.signal"),f=ie(f),(F=M(function*(){var ae;if(null!=A&&null!==(ae=A.signal)&&void 0!==ae&&ae.aborted)throw new j;var o,X=!1,Se=!1;try{for(var n,t=P(this);X=!(n=yield N(t.next())).done;X=!1){const _=n.value;var a;if(null!=A&&null!==(a=A.signal)&&void 0!==a&&a.aborted)throw new j;if(f-- >0&&(yield _),f<=0)return}}catch(_){Se=!0,o=_}finally{try{X&&null!=t.return&&(yield N(t.return()))}finally{if(Se)throw o}}}),function Z(){return F.apply(this,arguments)}).call(this);var F},compose:function Q(f,A){if(null!=A&&$(A,"options"),null!=A?.signal&&V(A.signal,"options.signal"),E(f)&&!p(f))throw new c("stream",f,"must be writable");const F=h(this,f);return null!=A&&A.signal&&d(A.signal,F),F}},te.exports.promiseReturningOperators={every:function ye(f){return Ee.apply(this,arguments)},forEach:function Pe(f,A){return Ce.apply(this,arguments)},reduce:function ge(f,A,F){return Te.apply(this,arguments)},toArray:function m(f){return R.apply(this,arguments)},some:W,find:function Be(f,A){return he.apply(this,arguments)}}},27322(te,ne,u){"use strict";const{ObjectSetPrototypeOf:g}=u(35280);te.exports=P;const C=u(95112);function P(N){if(!(this instanceof P))return new P(N);C.call(this,N)}g(P.prototype,C.prototype),g(P,C),P.prototype._transform=function(N,M,S){S(null,N)}},96208(te,ne,u){var g=u(29293).default,C=u(42958).default,P=u(53344).default,N=u(93513).default,M=u(82881).default;const S=u(40573),{ArrayIsArray:c,Promise:B,SymbolAsyncIterator:z,SymbolDispose:U}=u(35280),j=u(47404),{once:V}=u(54326),L=u(53014),$=u(44088),{aggregateTwoErrors:K,codes:{ERR_INVALID_ARG_TYPE:q,ERR_INVALID_RETURN_VALUE:I,ERR_MISSING_ARGS:h,ERR_STREAM_DESTROYED:d,ERR_STREAM_PREMATURE_CLOSE:p},AbortError:E}=u(90485),{validateFunction:v,validateAbortSignal:Y}=u(66563),{isIterable:de,isReadable:ee,isReadableNodeStream:me,isNodeStream:k,isTransformStream:re,isWebStream:J,isReadableStream:le,isReadableFinished:xe}=u(96545),fe=globalThis.AbortController||u(9465).AbortController;let G,Ae,Q;function ce(ge,Te,m){let R=!1;return ge.on("close",()=>{R=!0}),{destroy:ie=>{R||(R=!0,L.destroyer(ge,ie||new d("pipe")))},cleanup:j(ge,{readable:Te,writable:m},ie=>{R=!ie})}}function W(ge){if(de(ge))return ge;if(me(ge))return function se(ge){return ye.apply(this,arguments)}(ge);throw new q("val",["Readable","Iterable","AsyncIterable"],ge)}function ye(){return(ye=C(function*(ge){Ae||(Ae=u(33774)),yield*N(M(Ae.prototype[z].call(ge)),P)})).apply(this,arguments)}function Ee(ge,Te,m,R){return Be.apply(this,arguments)}function Be(){return(Be=g(function*(ge,Te,m,{end:R}){let D,ie=null;const oe=Se=>{if(Se&&(D=Se),ie){const o=ie;ie=null,o()}},Ie=()=>new B((Se,o)=>{D?o(D):ie=()=>{D?o(D):Se()}});Te.on("drain",oe);const f=j(Te,{readable:!1},oe);try{Te.writableNeedDrain&&(yield Ie());var Z,A=!1,F=!1;try{for(var X,ae=M(ge);A=!(X=yield ae.next()).done;A=!1)Te.write(X.value)||(yield Ie())}catch(Se){F=!0,Z=Se}finally{try{A&&null!=ae.return&&(yield ae.return())}finally{if(F)throw Z}}R&&(Te.end(),yield Ie()),m()}catch(Se){m(D!==Se?K(D,Se):Se)}finally{f(),Te.off("drain",oe)}})).apply(this,arguments)}function he(ge,Te,m,R){return Pe.apply(this,arguments)}function Pe(){return(Pe=g(function*(ge,Te,m,{end:R}){re(Te)&&(Te=Te.writable);const D=Te.getWriter();try{var Ie,ie=!1,oe=!1;try{for(var A,f=M(ge);ie=!(A=yield f.next()).done;ie=!1){const F=A.value;yield D.ready,D.write(F).catch(()=>{})}}catch(F){oe=!0,Ie=F}finally{try{ie&&null!=f.return&&(yield f.return())}finally{if(oe)throw Ie}}yield D.ready,R&&(yield D.close()),m()}catch(F){try{yield D.abort(F),m(F)}catch(Z){m(Z)}}})).apply(this,arguments)}function De(ge,Te,m){if(1===ge.length&&c(ge[0])&&(ge=ge[0]),ge.length<2)throw new h("streams");const R=new fe,D=R.signal,ie=m?.signal,oe=[];function Ie(){Se(new E)}let f,A,F;Y(ie,"options.signal"),Q=Q||u(54326).addAbortListener,ie&&(f=Q(ie,Ie));const Z=[];let o,ae=0;function X(_){Se(_,0===--ae)}function Se(_,x){var O;if(_&&(!A||"ERR_STREAM_PREMATURE_CLOSE"===A.code)&&(A=_),A||x){for(;Z.length;)Z.shift()(A);null===(O=f)||void 0===O||O[U](),R.abort(),x&&(A||oe.forEach(be=>be()),S.nextTick(Te,A,F))}}for(let _=0;_<ge.length;_++){const x=ge[_],O=_<ge.length-1,be=_>0,je=O||!1!==m?.end,Fe=_===ge.length-1;if(k(x)){let Ne=function(ve){ve&&"AbortError"!==ve.name&&"ERR_STREAM_PREMATURE_CLOSE"!==ve.code&&X(ve)};if(je){const{destroy:ve,cleanup:We}=ce(x,O,be);Z.push(ve),ee(x)&&Fe&&oe.push(We)}x.on("error",Ne),ee(x)&&Fe&&oe.push(()=>{x.removeListener("error",Ne)})}if(0===_)if("function"==typeof x){if(o=x({signal:D}),!de(o))throw new I("Iterable, AsyncIterable or Stream","source",o)}else o=de(x)||me(x)||re(x)?x:$.from(x);else if("function"==typeof x){var t;if(o=re(o)?W(null===(t=o)||void 0===t?void 0:t.readable):W(o),o=x(o,{signal:D}),O){if(!de(o,!0))throw new I("AsyncIterable",`transform[${_-1}]`,o)}else{var n;G||(G=u(27322));const Ne=new G({objectMode:!0}),ve=null===(n=o)||void 0===n?void 0:n.then;if("function"==typeof ve)ae++,ve.call(o,Ue=>{F=Ue,null!=Ue&&Ne.write(Ue),je&&Ne.end(),S.nextTick(X)},Ue=>{Ne.destroy(Ue),S.nextTick(X,Ue)});else if(de(o,!0))ae++,Ee(o,Ne,X,{end:je});else{if(!le(o)&&!re(o))throw new I("AsyncIterable or Promise","destination",o);ae++,Ee(o.readable||o,Ne,X,{end:je})}o=Ne;const{destroy:We,cleanup:ke}=ce(o,!1,!0);Z.push(We),Fe&&oe.push(ke)}}else if(k(x)){if(me(o)){ae+=2;const Ne=$e(o,x,X,{end:je});ee(x)&&Fe&&oe.push(Ne)}else if(re(o)||le(o))ae++,Ee(o.readable||o,x,X,{end:je});else{if(!de(o))throw new q("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],o);ae++,Ee(o,x,X,{end:je})}o=x}else if(J(x)){if(me(o))ae++,he(W(o),x,X,{end:je});else if(le(o)||de(o))ae++,he(o,x,X,{end:je});else{if(!re(o))throw new q("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],o);ae++,he(o.readable,x,X,{end:je})}o=x}else o=$.from(x)}return(null!=D&&D.aborted||null!=ie&&ie.aborted)&&S.nextTick(Ie),o}function $e(ge,Te,m,{end:R}){let D=!1;if(Te.on("close",()=>{D||m(new p)}),ge.pipe(Te,{end:!1}),R){let oe=function(){D=!0,Te.end()};xe(ge)?S.nextTick(oe):ge.once("end",oe)}else m();return j(ge,{readable:!0,writable:!1},oe=>{const Ie=ge._readableState;oe&&"ERR_STREAM_PREMATURE_CLOSE"===oe.code&&Ie&&Ie.ended&&!Ie.errored&&!Ie.errorEmitted?ge.once("end",m).once("error",m):m(oe)}),j(Te,{readable:!1,writable:!0},m)}te.exports={pipelineImpl:De,pipeline:function Ce(...ge){return De(ge,V(function y(ge){return v(ge[ge.length-1],"streams[stream.length - 1]"),ge.pop()}(ge)))}}},33774(te,ne,u){"use strict";var g=u(53344).default,C=u(42958).default;const P=u(40573),{ArrayPrototypeIndexOf:N,NumberIsInteger:M,NumberIsNaN:S,NumberParseInt:c,ObjectDefineProperties:B,ObjectKeys:z,ObjectSetPrototypeOf:U,Promise:j,SafeSet:V,SymbolAsyncDispose:L,SymbolAsyncIterator:$,Symbol:K}=u(35280);te.exports=X,X.ReadableState=ae;const{EventEmitter:q}=u(44356),{Stream:I,prependListener:h}=u(82521),{Buffer:d}=u(83838),{addAbortSignal:p}=u(14129),E=u(47404);let v=u(54326).debuglog("stream",s=>{v=s});const Y=u(79187),de=u(53014),{getHighWaterMark:ee,getDefaultHighWaterMark:me}=u(78153),{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:re,ERR_METHOD_NOT_IMPLEMENTED:J,ERR_OUT_OF_RANGE:le,ERR_STREAM_PUSH_AFTER_EOF:xe,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:fe},AbortError:G}=u(90485),{validateObject:Ae}=u(66563),Q=K("kPaused"),{StringDecoder:ce}=u(43387),y=u(29814);U(X.prototype,I.prototype),U(X,I);const W=()=>{},{errorOrDestroy:se}=de;function Z(s){return{enumerable:!1,get(){return 0!==(this.state&s)},set(e){e?this.state|=s:this.state&=~s}}}function ae(s,e,r){"boolean"!=typeof r&&(r=e instanceof u(44088)),this.state=6192,s&&s.objectMode&&(this.state|=1),r&&s&&s.readableObjectMode&&(this.state|=1),this.highWaterMark=s?ee(this,s,"readableHighWaterMark",r):me(!1),this.buffer=new Y,this.length=0,this.pipes=[],this.flowing=null,this[Q]=null,s&&!1===s.emitClose&&(this.state&=-2049),s&&!1===s.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=s&&s.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,s&&s.encoding&&(this.decoder=new ce(s.encoding),this.encoding=s.encoding)}function X(s){if(!(this instanceof X))return new X(s);const e=this instanceof u(44088);this._readableState=new ae(s,this,e),s&&("function"==typeof s.read&&(this._read=s.read),"function"==typeof s.destroy&&(this._destroy=s.destroy),"function"==typeof s.construct&&(this._construct=s.construct),s.signal&&!e&&p(s.signal,this)),I.call(this,s),de.construct(this,()=>{this._readableState.needReadable&&be(this,this._readableState)})}function Se(s,e,r,i){v("readableAddChunk",e);const l=s._readableState;let b;if(!(1&l.state)&&("string"==typeof e?l.encoding!==(r=r||l.defaultEncoding)&&(i&&l.encoding?e=d.from(e,r).toString(l.encoding):(e=d.from(e,r),r="")):e instanceof d?r="":I._isUint8Array(e)?(e=I._uint8ArrayToBuffer(e),r=""):null!=e&&(b=new re("chunk",["string","Buffer","Uint8Array"],e))),b)se(s,b);else if(null===e)l.state&=-9,function _(s,e){if(v("onEofChunk"),!e.ended){if(e.decoder){const r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?x(s):(e.needReadable=!1,e.emittedReadable=!0,O(s))}}(s,l);else if(1&l.state||e&&e.length>0)if(i)if(4&l.state)se(s,new fe);else{if(l.destroyed||l.errored)return!1;o(s,l,e,!0)}else if(l.ended)se(s,new xe);else{if(l.destroyed||l.errored)return!1;l.state&=-9,l.decoder&&!r?(e=l.decoder.write(e),l.objectMode||0!==e.length?o(s,l,e,!1):be(s,l)):o(s,l,e,!1)}else i||(l.state&=-9,be(s,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function o(s,e,r,i){e.flowing&&0===e.length&&!e.sync&&s.listenerCount("data")>0?(65536&e.state?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,s.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),!!(64&e.state)&&x(s)),be(s,e)}function a(s,e){return s<=0||0===e.length&&e.ended?0:1&e.state?1:S(s)?e.flowing&&e.length?e.buffer.first().length:e.length:s<=e.length?s:e.ended?e.length:0}function x(s){const e=s._readableState;v("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(v("emitReadable",e.flowing),e.emittedReadable=!0,P.nextTick(O,s))}function O(s){const e=s._readableState;v("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(s.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Ue(s)}function be(s,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,P.nextTick(je,s,e))}function je(s,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){const r=e.length;if(v("maybeReadMore read 0"),s.read(0),r===e.length)break}e.readingMore=!1}function Ne(s){const e=s._readableState;e.readableListening=s.listenerCount("readable")>0,e.resumeScheduled&&!1===e[Q]?e.flowing=!0:s.listenerCount("data")>0?s.resume():e.readableListening||(e.flowing=null)}function ve(s){v("readable nexttick read 0"),s.read(0)}function ke(s,e){v("resume",e.reading),e.reading||s.read(0),e.resumeScheduled=!1,s.emit("resume"),Ue(s),e.flowing&&!e.reading&&s.read(0)}function Ue(s){const e=s._readableState;for(v("flow",e.flowing);e.flowing&&null!==s.read(););}function ze(s,e){"function"!=typeof s.read&&(s=X.wrap(s,{objectMode:!0}));const r=function Ke(s,e){return Ge.apply(this,arguments)}(s,e);return r.stream=s,r}function Ge(){return(Ge=C(function*(s,e){let l,r=W;function i(w){this===s?(r(),r=W):r=w}s.on("readable",i);const b=E(s,{writable:!1},w=>{l=w?k(l,w):null,r(),r=W});try{for(;;){const w=s.destroyed?null:s.read();if(null!==w)yield w;else{if(l)throw l;if(null===l)return;yield g(new j(i))}}}catch(w){throw l=k(l,w),l}finally{!l&&!1===e?.destroyOnReturn||void 0!==l&&!s._readableState.autoDestroy?(s.off("readable",i),b()):de.destroyer(s,null)}})).apply(this,arguments)}function Ve(s,e){if(0===e.length)return null;let r;return e.objectMode?r=e.buffer.shift():!s||s>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(s,e.decoder),r}function Je(s){const e=s._readableState;v("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,P.nextTick(Ze,e,s))}function Ze(s,e){if(v("endReadableNT",s.endEmitted,s.length),!s.errored&&!s.closeEmitted&&!s.endEmitted&&0===s.length)if(s.endEmitted=!0,e.emit("end"),e.writable&&!1===e.allowHalfOpen)P.nextTick(qe,e);else if(s.autoDestroy){const r=e._writableState;(!r||r.autoDestroy&&(r.finished||!1===r.writable))&&e.destroy()}}function qe(s){s.writable&&!s.writableEnded&&!s.destroyed&&s.end()}let Xe;function et(){return void 0===Xe&&(Xe={}),Xe}B(ae.prototype,{objectMode:Z(1),ended:Z(2),endEmitted:Z(4),reading:Z(8),constructed:Z(16),sync:Z(32),needReadable:Z(64),emittedReadable:Z(128),readableListening:Z(256),resumeScheduled:Z(512),errorEmitted:Z(1024),emitClose:Z(2048),autoDestroy:Z(4096),destroyed:Z(8192),closed:Z(16384),closeEmitted:Z(32768),multiAwaitDrain:Z(65536),readingMore:Z(1<<17),dataEmitted:Z(1<<18)}),X.prototype.destroy=de.destroy,X.prototype._undestroy=de.undestroy,X.prototype._destroy=function(s,e){e(s)},X.prototype[q.captureRejectionSymbol]=function(s){this.destroy(s)},X.prototype[L]=function(){let s;return this.destroyed||(s=this.readableEnded?null:new G,this.destroy(s)),new j((e,r)=>E(this,i=>i&&i!==s?r(i):e(null)))},X.prototype.push=function(s,e){return Se(this,s,e,!1)},X.prototype.unshift=function(s,e){return Se(this,s,e,!0)},X.prototype.isPaused=function(){const s=this._readableState;return!0===s[Q]||!1===s.flowing},X.prototype.setEncoding=function(s){const e=new ce(s);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let i="";for(const l of r)i+=e.write(l);return r.clear(),""!==i&&r.push(i),this._readableState.length=i.length,this},X.prototype.read=function(s){v("read",s),void 0===s?s=NaN:M(s)||(s=c(s,10));const e=this._readableState,r=s;if(s>e.highWaterMark&&(e.highWaterMark=function n(s){if(s>1073741824)throw new le("size","<= 1GiB",s);return s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,++s}(s)),0!==s&&(e.state&=-129),0===s&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return v("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Je(this):x(this),null;if(0===(s=a(s,e))&&e.ended)return 0===e.length&&Je(this),null;let l,i=!!(64&e.state);if(v("need readable",i),(0===e.length||e.length-s<e.highWaterMark)&&(i=!0,v("length less than watermark",i)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)i=!1,v("reading, ended or constructing",i);else if(i){v("do read"),e.state|=40,0===e.length&&(e.state|=64);try{this._read(e.highWaterMark)}catch(b){se(this,b)}e.state&=-33,e.reading||(s=a(r,e))}return l=s>0?Ve(s,e):null,null===l?(e.needReadable=e.length<=e.highWaterMark,s=0):(e.length-=s,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),r!==s&&e.ended&&Je(this)),null!==l&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit("data",l)),l},X.prototype._read=function(s){throw new J("_read()")},X.prototype.pipe=function(s,e){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new V(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(s),v("pipe count=%d opts=%j",i.pipes.length,e);const b=e&&!1===e.end||s===P.stdout||s===P.stderr?Oe:T;function T(){v("onend"),s.end()}i.endEmitted?P.nextTick(b):r.once("end",b),s.on("unpipe",function w(Qe,He){v("onunpipe"),Qe===r&&He&&!1===He.hasUnpiped&&(He.hasUnpiped=!0,function pe(){v("cleanup"),s.removeListener("close",we),s.removeListener("finish",Le),H&&s.removeListener("drain",H),s.removeListener("error",Me),s.removeListener("unpipe",w),r.removeListener("end",T),r.removeListener("end",Oe),r.removeListener("data",Re),ue=!0,H&&i.awaitDrainWriters&&(!s._writableState||s._writableState.needDrain)&&H()}())});let H,ue=!1;function _e(){ue||(1===i.pipes.length&&i.pipes[0]===s?(v("false write response, pause",0),i.awaitDrainWriters=s,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(s)&&(v("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(s)),r.pause()),H||(H=function Fe(s,e){return function(){const i=s._readableState;i.awaitDrainWriters===e?(v("pipeOnDrain",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(v("pipeOnDrain",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(e)),(!i.awaitDrainWriters||0===i.awaitDrainWriters.size)&&s.listenerCount("data")&&s.resume()}}(r,s),s.on("drain",H))}function Re(Qe){v("ondata");const He=s.write(Qe);v("dest.write",He),!1===He&&_e()}function Me(Qe){if(v("onerror",Qe),Oe(),s.removeListener("error",Me),0===s.listenerCount("error")){const He=s._writableState||s._readableState;He&&!He.errorEmitted?se(s,Qe):s.emit("error",Qe)}}function we(){s.removeListener("finish",Le),Oe()}function Le(){v("onfinish"),s.removeListener("close",we),Oe()}function Oe(){v("unpipe"),r.unpipe(s)}return r.on("data",Re),h(s,"error",Me),s.once("close",we),s.once("finish",Le),s.emit("pipe",r),!0===s.writableNeedDrain?_e():i.flowing||(v("pipe resume"),r.resume()),s},X.prototype.unpipe=function(s){const e=this._readableState;if(0===e.pipes.length)return this;if(!s){const l=e.pipes;e.pipes=[],this.pause();for(let b=0;b<l.length;b++)l[b].emit("unpipe",this,{hasUnpiped:!1});return this}const i=N(e.pipes,s);return-1===i||(e.pipes.splice(i,1),0===e.pipes.length&&this.pause(),s.emit("unpipe",this,{hasUnpiped:!1})),this},X.prototype.addListener=X.prototype.on=function(s,e){const r=I.prototype.on.call(this,s,e),i=this._readableState;return"data"===s?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===s&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,v("on readable",i.length,i.reading),i.length?x(this):i.reading||P.nextTick(ve,this)),r},X.prototype.off=X.prototype.removeListener=function(s,e){const r=I.prototype.removeListener.call(this,s,e);return"readable"===s&&P.nextTick(Ne,this),r},X.prototype.removeAllListeners=function(s){const e=I.prototype.removeAllListeners.apply(this,arguments);return("readable"===s||void 0===s)&&P.nextTick(Ne,this),e},X.prototype.resume=function(){const s=this._readableState;return s.flowing||(v("resume"),s.flowing=!s.readableListening,function We(s,e){e.resumeScheduled||(e.resumeScheduled=!0,P.nextTick(ke,s,e))}(this,s)),s[Q]=!1,this},X.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Q]=!0,this},X.prototype.wrap=function(s){let e=!1;s.on("data",i=>{!this.push(i)&&s.pause&&(e=!0,s.pause())}),s.on("end",()=>{this.push(null)}),s.on("error",i=>{se(this,i)}),s.on("close",()=>{this.destroy()}),s.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&s.resume&&(e=!1,s.resume())};const r=z(s);for(let i=1;i<r.length;i++){const l=r[i];void 0===this[l]&&"function"==typeof s[l]&&(this[l]=s[l].bind(s))}return this},X.prototype[$]=function(){return ze(this)},X.prototype.iterator=function(s){return void 0!==s&&Ae(s,"options"),ze(this,s)},B(X.prototype,{readable:{__proto__:null,get(){const s=this._readableState;return!(!s||!1===s.readable||s.destroyed||s.errorEmitted||s.endEmitted)},set(s){this._readableState&&(this._readableState.readable=!!s)}},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(s){this._readableState&&(this._readableState.flowing=s)}},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(s){this._readableState&&(this._readableState.destroyed=s)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),B(ae.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[Q]},set(s){this[Q]=!!s}}}),X._fromList=Ve,X.from=function(s,e){return y(X,s,e)},X.fromWeb=function(s,e){return et().newStreamReadableFromReadableStream(s,e)},X.toWeb=function(s,e){return et().newReadableStreamFromStreamReadable(s,e)},X.wrap=function(s,e){var r,i;return new X({objectMode:null===(r=null!==(i=s.readableObjectMode)&&void 0!==i?i:s.objectMode)||void 0===r||r,...e,destroy(l,b){de.destroyer(s,l),b(l)}}).wrap(s)}},78153(te,ne,u){"use strict";const{MathFloor:g,NumberIsInteger:C}=u(35280),{validateInteger:P}=u(66563),{ERR_INVALID_ARG_VALUE:N}=u(90485).codes;let M=16384,S=16;function B(j){return j?S:M}te.exports={getHighWaterMark:function U(j,V,L,$){const K=function c(j,V,L){return null!=j.highWaterMark?j.highWaterMark:V?j[L]:null}(V,$,L);if(null!=K){if(!C(K)||K<0)throw new N($?`options.${L}`:"options.highWaterMark",K);return g(K)}return B(j.objectMode)},getDefaultHighWaterMark:B,setDefaultHighWaterMark:function z(j,V){P(V,"value",0),j?S=V:M=V}}},95112(te,ne,u){"use strict";const{ObjectSetPrototypeOf:g,Symbol:C}=u(35280);te.exports=c;const{ERR_METHOD_NOT_IMPLEMENTED:P}=u(90485).codes,N=u(44088),{getHighWaterMark:M}=u(78153);g(c.prototype,N.prototype),g(c,N);const S=C("kCallback");function c(U){if(!(this instanceof c))return new c(U);const j=U?M(this,U,"readableHighWaterMark",!0):null;0===j&&(U={...U,highWaterMark:null,readableHighWaterMark:j,writableHighWaterMark:U.writableHighWaterMark||0}),N.call(this,U),this._readableState.sync=!1,this[S]=null,U&&("function"==typeof U.transform&&(this._transform=U.transform),"function"==typeof U.flush&&(this._flush=U.flush)),this.on("prefinish",z)}function B(U){"function"!=typeof this._flush||this.destroyed?(this.push(null),U&&U()):this._flush((j,V)=>{j?U?U(j):this.destroy(j):(null!=V&&this.push(V),this.push(null),U&&U())})}function z(){this._final!==B&&B.call(this)}c.prototype._final=B,c.prototype._transform=function(U,j,V){throw new P("_transform()")},c.prototype._write=function(U,j,V){const L=this._readableState,$=this._writableState,K=L.length;this._transform(U,j,(q,I)=>{q?V(q):(null!=I&&this.push(I),$.ended||K===L.length||L.length<L.highWaterMark?V():this[S]=V)})},c.prototype._read=function(){if(this[S]){const U=this[S];this[S]=null,U()}}},96545(te,ne,u){"use strict";const{SymbolAsyncIterator:g,SymbolIterator:C,SymbolFor:P}=u(35280),N=P("nodejs.stream.destroyed"),M=P("nodejs.stream.errored"),S=P("nodejs.stream.readable"),c=P("nodejs.stream.writable"),B=P("nodejs.stream.disturbed"),z=P("nodejs.webstream.isClosedPromise"),U=P("nodejs.webstream.controllerErrorFunction");function j(y,W=!1){var se;return!(!y||"function"!=typeof y.pipe||"function"!=typeof y.on||W&&("function"!=typeof y.pause||"function"!=typeof y.resume)||y._writableState&&!1===(null===(se=y._readableState)||void 0===se?void 0:se.readable)||y._writableState&&!y._readableState)}function V(y){var W;return!(!y||"function"!=typeof y.write||"function"!=typeof y.on||y._readableState&&!1===(null===(W=y._writableState)||void 0===W?void 0:W.writable))}function $(y){return y&&(y._readableState||y._writableState||"function"==typeof y.write&&"function"==typeof y.on||"function"==typeof y.pipe&&"function"==typeof y.on)}function K(y){return!(!y||$(y)||"function"!=typeof y.pipeThrough||"function"!=typeof y.getReader||"function"!=typeof y.cancel)}function q(y){return!(!y||$(y)||"function"!=typeof y.getWriter||"function"!=typeof y.abort)}function I(y){return!(!y||$(y)||"object"!=typeof y.readable||"object"!=typeof y.writable)}function p(y){if(!$(y))return null;const ye=y._writableState||y._readableState;return!!(y.destroyed||y[N]||null!=ye&&ye.destroyed)}function E(y){if(!V(y))return null;if(!0===y.writableEnded)return!0;const W=y._writableState;return(null==W||!W.errored)&&("boolean"!=typeof W?.ended?null:W.ended)}function de(y,W){if(!j(y))return null;const se=y._readableState;return(null==se||!se.errored)&&("boolean"!=typeof se?.endEmitted?null:!!(se.endEmitted||!1===W&&!0===se.ended&&0===se.length))}function ee(y){return y&&null!=y[S]?y[S]:"boolean"!=typeof y?.readable?null:!p(y)&&j(y)&&y.readable&&!de(y)}function me(y){return y&&null!=y[c]?y[c]:"boolean"!=typeof y?.writable?null:!p(y)&&V(y)&&y.writable&&!E(y)}function xe(y){return"boolean"==typeof y._closed&&"boolean"==typeof y._defaultKeepAlive&&"boolean"==typeof y._removedConnection&&"boolean"==typeof y._removedContLen}function fe(y){return"boolean"==typeof y._sent100&&xe(y)}te.exports={isDestroyed:p,kIsDestroyed:N,isDisturbed:function Q(y){var W;return!(!y||!(null!==(W=y[B])&&void 0!==W?W:y.readableDidRead||y.readableAborted))},kIsDisturbed:B,isErrored:function ce(y){var W,se,ye,Ee,Be,he,Pe,Ce,De,$e;return!(!y||!(null!==(W=null!==(se=null!==(ye=null!==(Ee=null!==(Be=null!==(he=y[M])&&void 0!==he?he:y.readableErrored)&&void 0!==Be?Be:y.writableErrored)&&void 0!==Ee?Ee:null===(Pe=y._readableState)||void 0===Pe?void 0:Pe.errorEmitted)&&void 0!==ye?ye:null===(Ce=y._writableState)||void 0===Ce?void 0:Ce.errorEmitted)&&void 0!==se?se:null===(De=y._readableState)||void 0===De?void 0:De.errored)&&void 0!==W?W:null!==($e=y._writableState)&&void 0!==$e&&$e.errored))},kIsErrored:M,isReadable:ee,kIsReadable:S,kIsClosedPromise:z,kControllerErrorFunction:U,kIsWritable:c,isClosed:function le(y){if(!$(y))return null;if("boolean"==typeof y.closed)return y.closed;const W=y._writableState,se=y._readableState;return"boolean"==typeof W?.closed||"boolean"==typeof se?.closed?W?.closed||se?.closed:"boolean"==typeof y._closed&&xe(y)?y._closed:null},isDuplexNodeStream:function L(y){return!(!y||"function"!=typeof y.pipe||!y._readableState||"function"!=typeof y.on||"function"!=typeof y.write)},isFinished:function k(y,W){return $(y)?!!p(y)||!(!1!==W?.readable&&ee(y)||!1!==W?.writable&&me(y)):null},isIterable:function d(y,W){return null!=y&&(!0===W?"function"==typeof y[g]:!1===W?"function"==typeof y[C]:"function"==typeof y[g]||"function"==typeof y[C])},isReadableNodeStream:j,isReadableStream:K,isReadableEnded:function Y(y){if(!j(y))return null;if(!0===y.readableEnded)return!0;const W=y._readableState;return!(!W||W.errored)&&("boolean"!=typeof W?.ended?null:W.ended)},isReadableFinished:de,isReadableErrored:function J(y){var W,se;return $(y)?y.readableErrored?y.readableErrored:null!==(W=null===(se=y._readableState)||void 0===se?void 0:se.errored)&&void 0!==W?W:null:null},isNodeStream:$,isWebStream:function h(y){return K(y)||q(y)||I(y)},isWritable:me,isWritableNodeStream:V,isWritableStream:q,isWritableEnded:E,isWritableFinished:function v(y,W){if(!V(y))return null;if(!0===y.writableFinished)return!0;const se=y._writableState;return(null==se||!se.errored)&&("boolean"!=typeof se?.finished?null:!!(se.finished||!1===W&&!0===se.ended&&0===se.length))},isWritableErrored:function re(y){var W,se;return $(y)?y.writableErrored?y.writableErrored:null!==(W=null===(se=y._writableState)||void 0===se?void 0:se.errored)&&void 0!==W?W:null:null},isServerRequest:function G(y){var W;return"boolean"==typeof y._consuming&&"boolean"==typeof y._dumped&&void 0===(null===(W=y.req)||void 0===W?void 0:W.upgradeOrConnect)},isServerResponse:fe,willEmitClose:function Ae(y){if(!$(y))return null;const ye=y._writableState||y._readableState;return!ye&&fe(y)||!!(ye&&ye.autoDestroy&&ye.emitClose&&!1===ye.closed)},isTransformStream:I}},74850(te,ne,u){"use strict";const g=u(40573),{ArrayPrototypeSlice:C,Error:P,FunctionPrototypeSymbolHasInstance:N,ObjectDefineProperty:M,ObjectDefineProperties:S,ObjectSetPrototypeOf:c,StringPrototypeToLowerCase:B,Symbol:z,SymbolHasInstance:U}=u(35280);te.exports=fe,fe.WritableState=le;const{EventEmitter:j}=u(44356),V=u(82521).Stream,{Buffer:L}=u(83838),$=u(53014),{addAbortSignal:K}=u(14129),{getHighWaterMark:q,getDefaultHighWaterMark:I}=u(78153),{ERR_INVALID_ARG_TYPE:h,ERR_METHOD_NOT_IMPLEMENTED:d,ERR_MULTIPLE_CALLBACK:p,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:v,ERR_STREAM_ALREADY_FINISHED:Y,ERR_STREAM_NULL_VALUES:de,ERR_STREAM_WRITE_AFTER_END:ee,ERR_UNKNOWN_ENCODING:me}=u(90485).codes,{errorOrDestroy:k}=$;function re(){}c(fe.prototype,V.prototype),c(fe,V);const J=z("kOnFinished");function le(m,R,D){"boolean"!=typeof D&&(D=R instanceof u(44088)),this.objectMode=!(!m||!m.objectMode),D&&(this.objectMode=this.objectMode||!(!m||!m.writableObjectMode)),this.highWaterMark=m?q(this,m,"writableHighWaterMark",D):I(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(m&&!1===m.decodeStrings),this.defaultEncoding=m&&m.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=y.bind(void 0,R),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,xe(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!m||!1!==m.emitClose,this.autoDestroy=!m||!1!==m.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[J]=[]}function xe(m){m.buffered=[],m.bufferedIndex=0,m.allBuffers=!0,m.allNoop=!0}function fe(m){const R=this instanceof u(44088);if(!R&&!N(fe,this))return new fe(m);this._writableState=new le(m,this,R),m&&("function"==typeof m.write&&(this._write=m.write),"function"==typeof m.writev&&(this._writev=m.writev),"function"==typeof m.destroy&&(this._destroy=m.destroy),"function"==typeof m.final&&(this._final=m.final),"function"==typeof m.construct&&(this._construct=m.construct),m.signal&&K(m.signal,this)),V.call(this,m),$.construct(this,()=>{const D=this._writableState;D.writing||Ee(this,D),Ce(this,D)})}function G(m,R,D,ie){const oe=m._writableState;if("function"==typeof D)ie=D,D=oe.defaultEncoding;else{if(D){if("buffer"!==D&&!L.isEncoding(D))throw new me(D)}else D=oe.defaultEncoding;"function"!=typeof ie&&(ie=re)}if(null===R)throw new de;if(!oe.objectMode)if("string"==typeof R)!1!==oe.decodeStrings&&(R=L.from(R,D),D="buffer");else if(R instanceof L)D="buffer";else{if(!V._isUint8Array(R))throw new h("chunk",["string","Buffer","Uint8Array"],R);R=V._uint8ArrayToBuffer(R),D="buffer"}let Ie;return oe.ending?Ie=new ee:oe.destroyed&&(Ie=new v("write")),Ie?(g.nextTick(ie,Ie),k(m,Ie,!0),Ie):(oe.pendingcb++,function Ae(m,R,D,ie,oe){const Ie=R.objectMode?1:D.length;R.length+=Ie;const f=R.length<R.highWaterMark;return f||(R.needDrain=!0),R.writing||R.corked||R.errored||!R.constructed?(R.buffered.push({chunk:D,encoding:ie,callback:oe}),R.allBuffers&&"buffer"!==ie&&(R.allBuffers=!1),R.allNoop&&oe!==re&&(R.allNoop=!1)):(R.writelen=Ie,R.writecb=oe,R.writing=!0,R.sync=!0,m._write(D,ie,R.onwrite),R.sync=!1),f&&!R.errored&&!R.destroyed}(m,oe,R,D,ie))}function Q(m,R,D,ie,oe,Ie,f){R.writelen=ie,R.writecb=f,R.writing=!0,R.sync=!0,R.destroyed?R.onwrite(new v("write")):D?m._writev(oe,R.onwrite):m._write(oe,Ie,R.onwrite),R.sync=!1}function ce(m,R,D,ie){--R.pendingcb,ie(D),ye(R),k(m,D)}function y(m,R){const D=m._writableState,ie=D.sync,oe=D.writecb;"function"==typeof oe?(D.writing=!1,D.writecb=null,D.length-=D.writelen,D.writelen=0,R?(D.errored||(D.errored=R),m._readableState&&!m._readableState.errored&&(m._readableState.errored=R),ie?g.nextTick(ce,m,D,R,oe):ce(m,D,R,oe)):(D.buffered.length>D.bufferedIndex&&Ee(m,D),ie?null!==D.afterWriteTickInfo&&D.afterWriteTickInfo.cb===oe?D.afterWriteTickInfo.count++:(D.afterWriteTickInfo={count:1,cb:oe,stream:m,state:D},g.nextTick(W,D.afterWriteTickInfo)):se(m,D,1,oe))):k(m,new p)}function W({stream:m,state:R,count:D,cb:ie}){return R.afterWriteTickInfo=null,se(m,R,D,ie)}function se(m,R,D,ie){for(!R.ending&&!m.destroyed&&0===R.length&&R.needDrain&&(R.needDrain=!1,m.emit("drain"));D-- >0;)R.pendingcb--,ie();R.destroyed&&ye(R),Ce(m,R)}function ye(m){if(m.writing)return;for(let oe=m.bufferedIndex;oe<m.buffered.length;++oe){var R;const{chunk:Ie,callback:f}=m.buffered[oe];m.length-=m.objectMode?1:Ie.length,f(null!==(R=m.errored)&&void 0!==R?R:new v("write"))}const D=m[J].splice(0);for(let oe=0;oe<D.length;oe++){var ie;D[oe](null!==(ie=m.errored)&&void 0!==ie?ie:new v("end"))}xe(m)}function Ee(m,R){if(R.corked||R.bufferProcessing||R.destroyed||!R.constructed)return;const{buffered:D,bufferedIndex:ie,objectMode:oe}=R,Ie=D.length-ie;if(!Ie)return;let f=ie;if(R.bufferProcessing=!0,Ie>1&&m._writev){R.pendingcb-=Ie-1;const A=R.allNoop?re:Z=>{for(let ae=f;ae<D.length;++ae)D[ae].callback(Z)},F=R.allNoop&&0===f?D:C(D,f);F.allBuffers=R.allBuffers,Q(m,R,!0,R.length,F,"",A),xe(R)}else{do{const{chunk:A,encoding:F,callback:Z}=D[f];D[f++]=null,Q(m,R,!1,oe?1:A.length,A,F,Z)}while(f<D.length&&!R.writing);f===D.length?xe(R):f>256?(D.splice(0,f),R.bufferedIndex=0):R.bufferedIndex=f}R.bufferProcessing=!1}function Be(m){return m.ending&&!m.destroyed&&m.constructed&&0===m.length&&!m.errored&&0===m.buffered.length&&!m.finished&&!m.writing&&!m.errorEmitted&&!m.closeEmitted}function Ce(m,R,D){Be(R)&&(function Pe(m,R){!R.prefinished&&!R.finalCalled&&("function"!=typeof m._final||R.destroyed?(R.prefinished=!0,m.emit("prefinish")):(R.finalCalled=!0,function he(m,R){let D=!1;function ie(oe){if(D)k(m,oe??p());else if(D=!0,R.pendingcb--,oe){const Ie=R[J].splice(0);for(let f=0;f<Ie.length;f++)Ie[f](oe);k(m,oe,R.sync)}else Be(R)&&(R.prefinished=!0,m.emit("prefinish"),R.pendingcb++,g.nextTick(De,m,R))}R.sync=!0,R.pendingcb++;try{m._final(ie)}catch(oe){ie(oe)}R.sync=!1}(m,R)))}(m,R),0===R.pendingcb&&(D?(R.pendingcb++,g.nextTick((ie,oe)=>{Be(oe)?De(ie,oe):oe.pendingcb--},m,R)):Be(R)&&(R.pendingcb++,De(m,R))))}function De(m,R){R.pendingcb--,R.finished=!0;const D=R[J].splice(0);for(let ie=0;ie<D.length;ie++)D[ie]();if(m.emit("finish"),R.autoDestroy){const ie=m._readableState;(!ie||ie.autoDestroy&&(ie.endEmitted||!1===ie.readable))&&m.destroy()}}le.prototype.getBuffer=function(){return C(this.buffered,this.bufferedIndex)},M(le.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),M(fe,U,{__proto__:null,value:function(m){return!!N(this,m)||this===fe&&m&&m._writableState instanceof le}}),fe.prototype.pipe=function(){k(this,new E)},fe.prototype.write=function(m,R,D){return!0===G(this,m,R,D)},fe.prototype.cork=function(){this._writableState.corked++},fe.prototype.uncork=function(){const m=this._writableState;m.corked&&(m.corked--,m.writing||Ee(this,m))},fe.prototype.setDefaultEncoding=function(R){if("string"==typeof R&&(R=B(R)),!L.isEncoding(R))throw new me(R);return this._writableState.defaultEncoding=R,this},fe.prototype._write=function(m,R,D){if(!this._writev)throw new d("_write()");this._writev([{chunk:m,encoding:R}],D)},fe.prototype._writev=null,fe.prototype.end=function(m,R,D){const ie=this._writableState;let oe;if("function"==typeof m?(D=m,m=null,R=null):"function"==typeof R&&(D=R,R=null),null!=m){const Ie=G(this,m,R);Ie instanceof P&&(oe=Ie)}return ie.corked&&(ie.corked=1,this.uncork()),oe||(ie.errored||ie.ending?ie.finished?oe=new Y("end"):ie.destroyed&&(oe=new v("end")):(ie.ending=!0,Ce(this,ie,!0),ie.ended=!0)),"function"==typeof D&&(oe||ie.finished?g.nextTick(D,oe):ie[J].push(D)),this},S(fe.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(m){this._writableState&&(this._writableState.destroyed=m)}},writable:{__proto__:null,get(){const m=this._writableState;return!(!m||!1===m.writable||m.destroyed||m.errored||m.ending||m.ended)},set(m){this._writableState&&(this._writableState.writable=!!m)}},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 m=this._writableState;return!!m&&!m.destroyed&&!m.ending&&m.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 $e=$.destroy;let ge;function Te(){return void 0===ge&&(ge={}),ge}fe.prototype.destroy=function(m,R){const D=this._writableState;return!D.destroyed&&(D.bufferedIndex<D.buffered.length||D[J].length)&&g.nextTick(ye,D),$e.call(this,m,R),this},fe.prototype._undestroy=$.undestroy,fe.prototype._destroy=function(m,R){R(m)},fe.prototype[j.captureRejectionSymbol]=function(m){this.destroy(m)},fe.fromWeb=function(m,R){return Te().newStreamWritableFromWritableStream(m,R)},fe.toWeb=function(m){return Te().newWritableStreamFromStreamWritable(m)}},66563(te,ne,u){"use strict";const{ArrayIsArray:g,ArrayPrototypeIncludes:C,ArrayPrototypeJoin:P,ArrayPrototypeMap:N,NumberIsInteger:M,NumberIsNaN:S,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:B,NumberParseInt:z,ObjectPrototypeHasOwnProperty:U,RegExpPrototypeExec:j,String:V,StringPrototypeToUpperCase:L,StringPrototypeTrim:$}=u(35280),{hideStackFrames:K,codes:{ERR_SOCKET_BAD_PORT:q,ERR_INVALID_ARG_TYPE:I,ERR_INVALID_ARG_VALUE:h,ERR_OUT_OF_RANGE:d,ERR_UNKNOWN_SIGNAL:p}}=u(90485),{normalizeEncoding:E}=u(54326),{isAsyncFunction:v,isArrayBufferView:Y}=u(54326).types,de={},k=/^[0-7]+$/,le=K((f,A,F=B,Z=c)=>{if("number"!=typeof f)throw new I(A,"number",f);if(!M(f))throw new d(A,"an integer",f);if(f<F||f>Z)throw new d(A,`>= ${F} && <= ${Z}`,f)}),xe=K((f,A,F=-2147483648,Z=2147483647)=>{if("number"!=typeof f)throw new I(A,"number",f);if(!M(f))throw new d(A,"an integer",f);if(f<F||f>Z)throw new d(A,`>= ${F} && <= ${Z}`,f)}),fe=K((f,A,F=!1)=>{if("number"!=typeof f)throw new I(A,"number",f);if(!M(f))throw new d(A,"an integer",f);const Z=F?1:0,ae=4294967295;if(f<Z||f>ae)throw new d(A,`>= ${Z} && <= ${ae}`,f)});function G(f,A){if("string"!=typeof f)throw new I(A,"string",f)}const Q=K((f,A,F)=>{if(!C(F,f)){const ae="must be one of: "+P(N(F,X=>"string"==typeof X?`'${X}'`:V(X)),", ");throw new h(A,f,ae)}});function ce(f,A){if("boolean"!=typeof f)throw new I(A,"boolean",f)}function y(f,A,F){return null!=f&&U(f,A)?f[A]:F}const W=K((f,A,F=null)=>{const Z=y(F,"allowArray",!1),ae=y(F,"allowFunction",!1);if(!y(F,"nullable",!1)&&null===f||!Z&&g(f)||"object"!=typeof f&&(!ae||"function"!=typeof f))throw new I(A,"Object",f)}),se=K((f,A)=>{if(null!=f&&"object"!=typeof f&&"function"!=typeof f)throw new I(A,"a dictionary",f)}),ye=K((f,A,F=0)=>{if(!g(f))throw new I(A,"Array",f);if(f.length<F)throw new h(A,f,`must be longer than ${F}`)}),Ce=K((f,A="buffer")=>{if(!Y(f))throw new I(A,["Buffer","TypedArray","DataView"],f)}),ge=K((f,A)=>{if(void 0!==f&&(null===f||"object"!=typeof f||!("aborted"in f)))throw new I(A,"AbortSignal",f)}),Te=K((f,A)=>{if("function"!=typeof f)throw new I(A,"Function",f)}),m=K((f,A)=>{if("function"!=typeof f||v(f))throw new I(A,"Function",f)}),R=K((f,A)=>{if(void 0!==f)throw new I(A,"undefined",f)}),ie=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function oe(f,A){if(typeof f>"u"||!j(ie,f))throw new h(A,f,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}te.exports={isInt32:function ee(f){return f===(0|f)},isUint32:function me(f){return f===f>>>0},parseFileMode:function J(f,A,F){if(typeof f>"u"&&(f=F),"string"==typeof f){if(null===j(k,f))throw new h(A,f,"must be a 32-bit unsigned integer or an octal string");f=z(f,8)}return fe(f,A),f},validateArray:ye,validateStringArray:function Ee(f,A){ye(f,A);for(let F=0;F<f.length;F++)G(f[F],`${A}[${F}]`)},validateBooleanArray:function Be(f,A){ye(f,A);for(let F=0;F<f.length;F++)ce(f[F],`${A}[${F}]`)},validateAbortSignalArray:function he(f,A){ye(f,A);for(let F=0;F<f.length;F++){const Z=f[F],ae=`${A}[${F}]`;if(null==Z)throw new I(ae,"AbortSignal",Z);ge(Z,ae)}},validateBoolean:ce,validateBuffer:Ce,validateDictionary:se,validateEncoding:function De(f,A){const F=E(A),Z=f.length;if("hex"===F&&Z%2!=0)throw new h("encoding",A,`is invalid for data of length ${Z}`)},validateFunction:Te,validateInt32:xe,validateInteger:le,validateNumber:function Ae(f,A,F=void 0,Z){if("number"!=typeof f)throw new I(A,"number",f);if(null!=F&&f<F||null!=Z&&f>Z||(null!=F||null!=Z)&&S(f))throw new d(A,`${null!=F?`>= ${F}`:""}${null!=F&&null!=Z?" && ":""}${null!=Z?`<= ${Z}`:""}`,f)},validateObject:W,validateOneOf:Q,validatePlainFunction:m,validatePort:function $e(f,A="Port",F=!0){if("number"!=typeof f&&"string"!=typeof f||"string"==typeof f&&0===$(f).length||+f!==+f>>>0||f>65535||0===f&&!F)throw new q(A,f,F);return 0|f},validateSignalName:function Pe(f,A="signal"){if(G(f,A),void 0===de[f])throw void 0!==de[L(f)]?new p(f+" (signals must use all capital letters)"):new p(f)},validateString:G,validateUint32:fe,validateUndefined:R,validateUnion:function D(f,A,F){if(!C(F,f))throw new I(A,`('${P(F,"|")}')`,f)},validateAbortSignal:ge,validateLinkHeaderValue:function Ie(f){if("string"==typeof f)return oe(f,"hints"),f;if(g(f)){const A=f.length;let F="";if(0===A)return F;for(let Z=0;Z<A;Z++){const ae=f[Z];oe(ae,"hints"),F+=ae,Z!==A-1&&(F+=", ")}return F}throw new h("hints",f,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},58208(te,ne,u){"use strict";const g=u(81132),C=u(46305),P=g.Readable.destroy;te.exports=g.Readable,te.exports._uint8ArrayToBuffer=g._uint8ArrayToBuffer,te.exports._isUint8Array=g._isUint8Array,te.exports.isDisturbed=g.isDisturbed,te.exports.isErrored=g.isErrored,te.exports.isReadable=g.isReadable,te.exports.Readable=g.Readable,te.exports.Writable=g.Writable,te.exports.Duplex=g.Duplex,te.exports.Transform=g.Transform,te.exports.PassThrough=g.PassThrough,te.exports.addAbortSignal=g.addAbortSignal,te.exports.finished=g.finished,te.exports.destroy=g.destroy,te.exports.destroy=P,te.exports.pipeline=g.pipeline,te.exports.compose=g.compose,Object.defineProperty(g,"promises",{configurable:!0,enumerable:!0,get:()=>C}),te.exports.Stream=g.Stream,te.exports.default=te.exports},90485(te,ne,u){"use strict";const{format:g,inspect:C}=u(29621),{AggregateError:P}=u(35280),N=globalThis.AggregateError||P,M=Symbol("kIsNodeError"),S=["string","function","number","object","Function","Object","boolean","bigint","symbol"],c=/^([A-Z][a-z0-9]*)+$/,z={};function U(I,h){if(!I)throw new z.ERR_INTERNAL_ASSERTION(h)}function j(I){let h="",d=I.length;const p="-"===I[0]?1:0;for(;d>=p+4;d-=3)h=`_${I.slice(d-3,d)}${h}`;return`${I.slice(0,d)}${h}`}function L(I,h,d){d||(d=Error);class p extends d{constructor(...v){super(function V(I,h,d){if("function"==typeof h)return U(h.length<=d.length,`Code: ${I}; The provided arguments length (${d.length}) does not match the required ones (${h.length}).`),h(...d);const p=(h.match(/%[dfijoOs]/g)||[]).length;return U(p===d.length,`Code: ${I}; The provided arguments length (${d.length}) does not match the required ones (${p}).`),0===d.length?h:g(h,...d)}(I,h,v))}toString(){return`${this.name} [${I}]: ${this.message}`}}Object.defineProperties(p.prototype,{name:{value:d.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${I}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),p.prototype.code=I,p.prototype[M]=!0,z[I]=p}function $(I){return Object.defineProperty(I,"name",{value:"__node_internal_"+I.name}),I}class q extends Error{constructor(h="The operation was aborted",d=void 0){if(void 0!==d&&"object"!=typeof d)throw new z.ERR_INVALID_ARG_TYPE("options","Object",d);super(h,d),this.code="ABORT_ERR",this.name="AbortError"}}L("ERR_ASSERTION","%s",Error),L("ERR_INVALID_ARG_TYPE",(I,h,d)=>{U("string"==typeof I,"'name' must be a string"),Array.isArray(h)||(h=[h]);let p="The ";I.endsWith(" argument")?p+=`${I} `:p+=`"${I}" ${I.includes(".")?"property":"argument"} `,p+="must be ";const E=[],v=[],Y=[];for(const ee of h)U("string"==typeof ee,"All expected entries have to be of type string"),S.includes(ee)?E.push(ee.toLowerCase()):c.test(ee)?v.push(ee):(U("object"!==ee,'The value "object" should be written as "Object"'),Y.push(ee));if(v.length>0){const ee=E.indexOf("object");-1!==ee&&(E.splice(E,ee,1),v.push("Object"))}if(E.length>0){switch(E.length){case 1:p+=`of type ${E[0]}`;break;case 2:p+=`one of type ${E[0]} or ${E[1]}`;break;default:{const ee=E.pop();p+=`one of type ${E.join(", ")}, or ${ee}`}}(v.length>0||Y.length>0)&&(p+=" or ")}if(v.length>0){switch(v.length){case 1:p+=`an instance of ${v[0]}`;break;case 2:p+=`an instance of ${v[0]} or ${v[1]}`;break;default:{const ee=v.pop();p+=`an instance of ${v.join(", ")}, or ${ee}`}}Y.length>0&&(p+=" or ")}switch(Y.length){case 0:break;case 1:Y[0].toLowerCase()!==Y[0]&&(p+="an "),p+=`${Y[0]}`;break;case 2:p+=`one of ${Y[0]} or ${Y[1]}`;break;default:{const ee=Y.pop();p+=`one of ${Y.join(", ")}, or ${ee}`}}if(null==d)p+=`. Received ${d}`;else if("function"==typeof d&&d.name)p+=`. Received function ${d.name}`;else if("object"==typeof d){var de;null!==(de=d.constructor)&&void 0!==de&&de.name?p+=`. Received an instance of ${d.constructor.name}`:p+=`. Received ${C(d,{depth:-1})}`}else{let ee=C(d,{colors:!1});ee.length>25&&(ee=`${ee.slice(0,25)}...`),p+=`. Received type ${typeof d} (${ee})`}return p},TypeError),L("ERR_INVALID_ARG_VALUE",(I,h,d="is invalid")=>{let p=C(h);return p.length>128&&(p=p.slice(0,128)+"..."),`The ${I.includes(".")?"property":"argument"} '${I}' ${d}. Received ${p}`},TypeError),L("ERR_INVALID_RETURN_VALUE",(I,h,d)=>{var p;return`Expected ${I} to be returned from the "${h}" function but got ${null!=d&&null!==(p=d.constructor)&&void 0!==p&&p.name?`instance of ${d.constructor.name}`:"type "+typeof d}.`},TypeError),L("ERR_MISSING_ARGS",(...I)=>{let h;U(I.length>0,"At least one arg needs to be specified");const d=I.length;switch(I=(Array.isArray(I)?I:[I]).map(p=>`"${p}"`).join(" or "),d){case 1:h+=`The ${I[0]} argument`;break;case 2:h+=`The ${I[0]} and ${I[1]} arguments`;break;default:{const p=I.pop();h+=`The ${I.join(", ")}, and ${p} arguments`}}return`${h} must be specified`},TypeError),L("ERR_OUT_OF_RANGE",(I,h,d)=>{let p;if(U(h,'Missing "range" argument'),Number.isInteger(d)&&Math.abs(d)>2**32)p=j(String(d));else if("bigint"==typeof d){p=String(d);const E=BigInt(2)**BigInt(32);(d>E||d<-E)&&(p=j(p)),p+="n"}else p=C(d);return`The value of "${I}" is out of range. It must be ${h}. Received ${p}`},RangeError),L("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),L("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),L("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),L("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),L("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),L("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),L("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),L("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),L("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),L("ERR_STREAM_WRITE_AFTER_END","write after end",Error),L("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),te.exports={AbortError:q,aggregateTwoErrors:$(function K(I,h){if(I&&h&&I!==h){if(Array.isArray(h.errors))return h.errors.push(I),h;const d=new N([h,I],h.message);return d.code=h.code,d}return I||h}),hideStackFrames:$,codes:z}},35280(te){"use strict";class ne extends Error{constructor(g){if(!Array.isArray(g))throw new TypeError("Expected input to be an Array, got "+typeof g);let C="";for(let P=0;P<g.length;P++)C+=` ${g[P].stack}\n`;super(C),this.name="AggregateError",this.errors=g}}te.exports={AggregateError:ne,ArrayIsArray:u=>Array.isArray(u),ArrayPrototypeIncludes:(u,g)=>u.includes(g),ArrayPrototypeIndexOf:(u,g)=>u.indexOf(g),ArrayPrototypeJoin:(u,g)=>u.join(g),ArrayPrototypeMap:(u,g)=>u.map(g),ArrayPrototypePop:(u,g)=>u.pop(g),ArrayPrototypePush:(u,g)=>u.push(g),ArrayPrototypeSlice:(u,g,C)=>u.slice(g,C),Error,FunctionPrototypeCall:(u,g,...C)=>u.call(g,...C),FunctionPrototypeSymbolHasInstance:(u,g)=>Function.prototype[Symbol.hasInstance].call(u,g),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:(u,g)=>Object.defineProperties(u,g),ObjectDefineProperty:(u,g,C)=>Object.defineProperty(u,g,C),ObjectGetOwnPropertyDescriptor:(u,g)=>Object.getOwnPropertyDescriptor(u,g),ObjectKeys:u=>Object.keys(u),ObjectSetPrototypeOf:(u,g)=>Object.setPrototypeOf(u,g),Promise,PromisePrototypeCatch:(u,g)=>u.catch(g),PromisePrototypeThen:(u,g,C)=>u.then(g,C),PromiseReject:u=>Promise.reject(u),PromiseResolve:u=>Promise.resolve(u),ReflectApply:Reflect.apply,RegExpPrototypeTest:(u,g)=>u.test(g),SafeSet:Set,String,StringPrototypeSlice:(u,g,C)=>u.slice(g,C),StringPrototypeToLowerCase:u=>u.toLowerCase(),StringPrototypeToUpperCase:u=>u.toUpperCase(),StringPrototypeTrim:u=>u.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:(u,g,C)=>u.set(g,C),Boolean,Uint8Array}},54326(te,ne,u){"use strict";var g=u(29293).default;const C=u(83838),{format:P,inspect:N}=u(29621),{codes:{ERR_INVALID_ARG_TYPE:M}}=u(90485),{kResistStopPropagation:S,AggregateError:c,SymbolDispose:B}=u(35280),z=globalThis.AbortSignal||u(9465).AbortSignal,U=globalThis.AbortController||u(9465).AbortController,j=Object.getPrototypeOf(g(function*(){})).constructor,V=globalThis.Blob||C.Blob,L=typeof V<"u"?function(I){return I instanceof V}:function(I){return!1},$=(q,I)=>{if(void 0!==q&&(null===q||"object"!=typeof q||!("aborted"in q)))throw new M(I,"AbortSignal",q)};te.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(q){let I=!1;return function(...h){I||(I=!0,q.apply(this,h))}},createDeferredPromise:function(){let q,I;return{promise:new Promise((d,p)=>{q=d,I=p}),resolve:q,reject:I}},promisify:q=>new Promise((I,h)=>{q((d,...p)=>d?h(d):I(...p))}),debuglog:()=>function(){},format:P,inspect:N,types:{isAsyncFunction:q=>q instanceof j,isArrayBufferView:q=>ArrayBuffer.isView(q)},isBlob:L,deprecate:(q,I)=>q,addAbortListener:u(44356).addAbortListener||function(I,h){if(void 0===I)throw new M("signal","AbortSignal",I);let d;return $(I,"signal"),(q=>{if("function"!=typeof q)throw new M("listener","Function",q)})(h),I.aborted?queueMicrotask(()=>h()):(I.addEventListener("abort",h,{__proto__:null,once:!0,[S]:!0}),d=()=>{I.removeEventListener("abort",h)}),{__proto__:null,[B](){var p;null===(p=d)||void 0===p||p()}}},AbortSignalAny:z.any||function(I){if(1===I.length)return I[0];const h=new U,d=()=>h.abort();return I.forEach(p=>{$(p,"signals"),p.addEventListener("abort",d,{once:!0})}),h.signal.addEventListener("abort",()=>{I.forEach(p=>p.removeEventListener("abort",d))},{once:!0}),h.signal}},te.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},29621(te){"use strict";te.exports={format:(ne,...u)=>ne.replace(/%([sdifj])/g,function(...[g,C]){const P=u.shift();return"f"===C?P.toFixed(6):"j"===C?JSON.stringify(P):"s"===C&&"object"==typeof P?`${P.constructor!==Object?P.constructor.name:""} {}`.trim():P.toString()}),inspect(ne){switch(typeof ne){case"string":if(ne.includes("'")){if(!ne.includes('"'))return`"${ne}"`;if(!ne.includes("`")&&!ne.includes("${"))return`\`${ne}\``}return`'${ne}'`;case"number":return isNaN(ne)?"NaN":Object.is(ne,-0)?String(ne):ne;case"bigint":return`${String(ne)}n`;case"boolean":case"undefined":return String(ne);case"object":return"{}"}}}},81132(te,ne,u){"use strict";const{Buffer:g}=u(83838),{ObjectDefineProperty:C,ObjectKeys:P,ReflectApply:N}=u(35280),{promisify:{custom:M}}=u(54326),{streamReturningOperators:S,promiseReturningOperators:c}=u(59597),{codes:{ERR_ILLEGAL_CONSTRUCTOR:B}}=u(90485),z=u(80984),{setDefaultHighWaterMark:U,getDefaultHighWaterMark:j}=u(78153),{pipeline:V}=u(96208),{destroyer:L}=u(53014),$=u(47404),q=u(46305),I=u(96545),h=te.exports=u(82521).Stream;h.isDestroyed=I.isDestroyed,h.isDisturbed=I.isDisturbed,h.isErrored=I.isErrored,h.isReadable=I.isReadable,h.isWritable=I.isWritable,h.Readable=u(33774);for(const p of P(S)){let v=function(...Y){if(new.target)throw B();return h.Readable.from(N(E,this,Y))};const E=S[p];C(v,"name",{__proto__:null,value:E.name}),C(v,"length",{__proto__:null,value:E.length}),C(h.Readable.prototype,p,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(const p of P(c)){let v=function(...Y){if(new.target)throw B();return N(E,this,Y)};const E=c[p];C(v,"name",{__proto__:null,value:E.name}),C(v,"length",{__proto__:null,value:E.length}),C(h.Readable.prototype,p,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}h.Writable=u(74850),h.Duplex=u(44088),h.Transform=u(95112),h.PassThrough=u(27322),h.pipeline=V;const{addAbortSignal:d}=u(14129);h.addAbortSignal=d,h.finished=$,h.destroy=L,h.compose=z,h.setDefaultHighWaterMark=U,h.getDefaultHighWaterMark=j,C(h,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>q}),C(V,M,{__proto__:null,enumerable:!0,get:()=>q.pipeline}),C($,M,{__proto__:null,enumerable:!0,get:()=>q.finished}),h.Stream=h,h._isUint8Array=function(E){return E instanceof Uint8Array},h._uint8ArrayToBuffer=function(E){return g.from(E.buffer,E.byteOffset,E.byteLength)}},46305(te,ne,u){"use strict";const{ArrayPrototypePop:g,Promise:C}=u(35280),{isIterable:P,isNodeStream:N,isWebStream:M}=u(96545),{pipelineImpl:S}=u(96208),{finished:c}=u(47404);u(81132),te.exports={finished:c,pipeline:function B(...z){return new C((U,j)=>{let V,L;const $=z[z.length-1];if($&&"object"==typeof $&&!N($)&&!P($)&&!M($)){const K=g(z);V=K.signal,L=K.end}S(z,(K,q)=>{K?j(K):U(q)},{signal:V,end:L})})}}},5407(te,ne,u){var g=u(83838),C=g.Buffer;function P(M,S){for(var c in M)S[c]=M[c]}function N(M,S,c){return C(M,S,c)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?te.exports=g:(P(g,ne),ne.Buffer=N),N.prototype=Object.create(C.prototype),P(C,N),N.from=function(M,S,c){if("number"==typeof M)throw new TypeError("Argument must not be a number");return C(M,S,c)},N.alloc=function(M,S,c){if("number"!=typeof M)throw new TypeError("Argument must be a number");var B=C(M);return void 0!==S?"string"==typeof c?B.fill(S,c):B.fill(S):B.fill(0),B},N.allocUnsafe=function(M){if("number"!=typeof M)throw new TypeError("Argument must be a number");return C(M)},N.allocUnsafeSlow=function(M){if("number"!=typeof M)throw new TypeError("Argument must be a number");return g.SlowBuffer(M)}},43387(te,ne,u){"use strict";var g=u(5407).Buffer,C=g.isEncoding||function(h){switch((h=""+h)&&h.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 M(h){var d;switch(this.encoding=function N(h){var d=function P(h){if(!h)return"utf8";for(var d;;)switch(h){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 h;default:if(d)return;h=(""+h).toLowerCase(),d=!0}}(h);if("string"!=typeof d&&(g.isEncoding===C||!C(h)))throw new Error("Unknown encoding: "+h);return d||h}(h),this.encoding){case"utf16le":this.text=V,this.end=L,d=4;break;case"utf8":this.fillLast=z,d=4;break;case"base64":this.text=$,this.end=K,d=3;break;default:return this.write=q,void(this.end=I)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(d)}function S(h){return h<=127?0:h>>5==6?2:h>>4==14?3:h>>3==30?4:h>>6==2?-1:-2}function z(h){var d=this.lastTotal-this.lastNeed,p=function B(h,d){if(128!=(192&d[0]))return h.lastNeed=0,"\ufffd";if(h.lastNeed>1&&d.length>1){if(128!=(192&d[1]))return h.lastNeed=1,"\ufffd";if(h.lastNeed>2&&d.length>2&&128!=(192&d[2]))return h.lastNeed=2,"\ufffd"}}(this,h);return void 0!==p?p:this.lastNeed<=h.length?(h.copy(this.lastChar,d,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(h.copy(this.lastChar,d,0,h.length),void(this.lastNeed-=h.length))}function V(h,d){if((h.length-d)%2==0){var p=h.toString("utf16le",d);if(p){var E=p.charCodeAt(p.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],p.slice(0,-1)}return p}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",d,h.length-1)}function L(h){var d=h&&h.length?this.write(h):"";return this.lastNeed?d+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):d}function $(h,d){var p=(h.length-d)%3;return 0===p?h.toString("base64",d):(this.lastNeed=3-p,this.lastTotal=3,1===p?this.lastChar[0]=h[h.length-1]:(this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1]),h.toString("base64",d,h.length-p))}function K(h){var d=h&&h.length?this.write(h):"";return this.lastNeed?d+this.lastChar.toString("base64",0,3-this.lastNeed):d}function q(h){return h.toString(this.encoding)}function I(h){return h&&h.length?this.write(h):""}ne.StringDecoder=M,M.prototype.write=function(h){if(0===h.length)return"";var d,p;if(this.lastNeed){if(void 0===(d=this.fillLast(h)))return"";p=this.lastNeed,this.lastNeed=0}else p=0;return p<h.length?d?d+this.text(h,p):this.text(h,p):d||""},M.prototype.end=function j(h){var d=h&&h.length?this.write(h):"";return this.lastNeed?d+"\ufffd":d},M.prototype.text=function U(h,d){var p=function c(h,d,p){var E=d.length-1;if(E<p)return 0;var v=S(d[E]);return v>=0?(v>0&&(h.lastNeed=v-1),v):--E<p||-2===v?0:(v=S(d[E]))>=0?(v>0&&(h.lastNeed=v-2),v):--E<p||-2===v?0:(v=S(d[E]))>=0?(v>0&&(2===v?v=0:h.lastNeed=v-3),v):0}(this,h,d);if(!this.lastNeed)return h.toString("utf8",d);this.lastTotal=p;var E=h.length-(p-this.lastNeed);return h.copy(this.lastChar,0,E),h.toString("utf8",d,E)},M.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length}},53786(te,ne,u){"use strict";u.r(ne),u.d(ne,{BaseIRI:()=>ae,BlankNode:()=>de,DataFactory:()=>p,DefaultGraph:()=>me,EntityIndex:()=>We,Lexer:()=>L,Literal:()=>Y,NamedNode:()=>v,Parser:()=>Ee,Quad:()=>J,Reasoner:()=>Ve,Store:()=>ke,StoreFactory:()=>Ke,StreamParser:()=>qe,StreamWriter:()=>Xe,Term:()=>E,Triple:()=>J,Util:()=>g,Variable:()=>ee,Writer:()=>x,default:()=>et,getRulesFromDataset:()=>Ge,termFromId:()=>k,termToId:()=>re});var g={};u.r(g),u.d(g,{inDefaultGraph:()=>m,isBlankNode:()=>Ce,isDefaultGraph:()=>Te,isLiteral:()=>De,isNamedNode:()=>Pe,isQuad:()=>ge,isVariable:()=>$e,prefix:()=>R,prefixes:()=>D});var C=u(83838);const P="http://www.w3.org/1999/02/22-rdf-syntax-ns#",N="http://www.w3.org/2001/XMLSchema#",M="http://www.w3.org/2000/10/swap/",S={xsd:{decimal:`${N}decimal`,boolean:`${N}boolean`,double:`${N}double`,integer:`${N}integer`,string:`${N}string`},rdf:{type:`${P}type`,nil:`${P}nil`,first:`${P}first`,rest:`${P}rest`,langString:`${P}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${M}reify#forSome`,forAll:`${M}reify#forAll`},log:{implies:`${M}log#implies`,isImpliedBy:`${M}log#isImpliedBy`}},{xsd:c}=S,B=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,z={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},U=/[\x00-\x20<>\\"\{\}\|\^\`]/,j={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},V=/$0^/;class L{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,this._isImpliedBy=(e=e||{}).isImpliedBy,this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const r in this)!(r in j)&&this[r]instanceof RegExp&&(this[r]=V)}else this._n3Mode=!1!==e.n3;this.comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,r){let i=this._input,l=i.length;for(;;){let T,H;for(;T=this._newline.exec(i);)this.comments&&(H=this._comment.exec(T[0]))&&b("comment",H[1],"",this._line,T[0].length),i=i.substr(T[0].length,i.length),l=i.length,this._line++;if(!T&&(T=this._whitespace.exec(i))&&(i=i.substr(T[0].length,i.length)),this._endOfFile.test(i))return r&&(this.comments&&(H=this._comment.exec(i))&&b("comment",H[1],"",this._line,i.length),i=null,b("eof","","",this._line,0)),this._input=i;const ue=this._line,pe=i[0];let _e="",Re="",Me="",we=null,Le=0,Oe=!1;switch(pe){case"^":if(i.length<3)break;if("^"!==i[1]){this._n3Mode&&(Le=1,_e="^");break}if(this._previousMarker="^^",i=i.substr(2),"<"!==i[0]){Oe=!0;break}case"<":if(we=this._unescapedIri.exec(i))_e="IRI",Re=we[1];else if(we=this._iri.exec(i)){if(Re=this._unescape(we[1]),null===Re||U.test(Re))return w(this);_e="IRI"}else i.length>1&&"<"===i[1]?(_e="<<",Le=2):this._n3Mode&&i.length>1&&"="===i[1]&&(Le=2,this._isImpliedBy?(_e="abbreviation",Re="<"):(_e="inverse",Re=">"));break;case">":i.length>1&&">"===i[1]&&(_e=">>",Le=2);break;case"_":((we=this._blank.exec(i))||r&&(we=this._blank.exec(`${i} `)))&&(_e="blank",Me="_",Re=we[1]);break;case'"':if(we=this._simpleQuotedString.exec(i))Re=we[1];else if(({value:Re,matchLength:Le}=this._parseLiteral(i)),null===Re)return w(this);(null!==we||0!==Le)&&(_e="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(we=this._simpleApostropheString.exec(i))Re=we[1];else if(({value:Re,matchLength:Le}=this._parseLiteral(i)),null===Re)return w(this);(null!==we||0!==Le)&&(_e="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(we=this._variable.exec(i))&&(_e="var",Re=we[0]);break;case"@":"literal"===this._previousMarker&&(we=this._langcode.exec(i))?(_e="langcode",Re=we[1]):(we=this._keyword.exec(i))&&(_e=we[0]);break;case".":if(1===i.length?r:i[1]<"0"||i[1]>"9"){_e=".",Le=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(we=this._number.exec(i)||r&&(we=this._number.exec(`${i} `)))&&(_e="literal",Re=we[0],Me="string"==typeof we[1]?c.double:"string"==typeof we[2]?c.decimal:c.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(we=this._sparqlKeyword.exec(i))?_e=we[0].toUpperCase():Oe=!0;break;case"f":case"t":(we=this._boolean.exec(i))?(_e="literal",Re=we[0],Me=c.boolean):Oe=!0;break;case"a":(we=this._shortPredicates.exec(i))?(_e="abbreviation",Re="a"):Oe=!0;break;case"=":this._n3Mode&&i.length>1&&(_e="abbreviation",">"!==i[1]?(Le=1,Re="="):(Le=2,Re=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(Le=1,_e=pe);break;case"{":!this._lineMode&&i.length>=2&&("|"===i[1]?(_e="{|",Le=2):(_e=pe,Le=1));break;case"|":i.length>=2&&"}"===i[1]&&(_e="|}",Le=2);break;default:Oe=!0}if(Oe&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(we=this._prefix.exec(i))?((we=this._prefixed.exec(i))||r&&(we=this._prefixed.exec(`${i} `)))&&(_e="prefixed",Me=we[1]||"",Re=this._unescape(we[2])):(_e="prefix",Re=we[1]||"")),"^^"===this._previousMarker)switch(_e){case"prefixed":_e="type";break;case"IRI":_e="typeIRI";break;default:_e=""}if(!_e)return r||!/^'''|^"""/.test(i)&&/\n|\r/.test(i)?w(this):this._input=i;const Qe=Le||we[0].length,He=b(_e,Re,Me,ue,Qe);this.previousToken=He,this._previousMarker=_e,i=i.substr(Qe,i.length)}function b(T,H,ue,pe,_e){const Re=i?l-i.length:l,we={type:T,value:H,prefix:ue,line:pe,start:Re,end:Re+_e};return e(null,we),we}function w(T){e(T._syntaxError(/^\S*/.exec(i)[0]))}}_unescape(e){let r=!1;const i=e.replace(B,(l,b,w,T)=>{if("string"==typeof b)return String.fromCharCode(Number.parseInt(b,16));if("string"==typeof w){let H=Number.parseInt(w,16);return H<=65535?String.fromCharCode(Number.parseInt(w,16)):String.fromCharCode(55296+((H-=65536)>>10),56320+(1023&H))}return T in z?z[T]:(r=!0,"")});return r?null:i}_parseLiteral(e){if(e.length>=3){const r=e.match(/^(?:"""|"|'''|'|)/)[0],i=r.length;let l=Math.max(this._literalClosingPos,i);for(;(l=e.indexOf(r,l))>0;){let b=0;for(;"\\"===e[l-b-1];)b++;if(b%2==0){const w=e.substring(i,l),T=w.split(/\r\n|\r|\n/).length-1,H=l+i;if(1===i&&0!==T||3===i&&this._lineMode)break;return this._line+=T,{value:this._unescape(w),matchLength:H}}l++}this._literalClosingPos=e.length-i+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const r=new Error(`Unexpected "${e}" on line ${this._line}.`);return r.context={token:void 0,line:this._line,previousToken:this.previousToken},r}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,r){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof r){const i=[];let l;if(this._tokenizeToEnd((b,w)=>b?l=b:i.push(w),!0),l)throw l;return i}queueMicrotask(()=>this._tokenizeToEnd(r,!0))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",i=>{null!==this._input&&0!==i.length&&(this._pendingBuffer&&(i=C.Buffer.concat([this._pendingBuffer,i]),this._pendingBuffer=null),128&i[i.length-1]?this._pendingBuffer=i:(typeof this._input>"u"?this._input=this._readStartingBom("string"==typeof i?i:i.toString()):this._input+=i,this._tokenizeToEnd(r,!1)))}),e.on("end",()=>{"string"==typeof this._input&&this._tokenizeToEnd(r,!0)}),e.on("error",r)}}const{rdf:$,xsd:K}=S;let q,I=0;const d={namedNode:fe,blankNode:G,variable:Q,literal:Ae,defaultGraph:function ce(){return q},quad:y,triple:y,fromTerm:W,fromQuad:se},p=d;class E{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof E?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class v extends E{get termType(){return"NamedNode"}}class Y extends E{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let r=e.lastIndexOf('"')+1;return r<e.length&&"@"===e[r++]?e.substr(r).toLowerCase():""}get datatype(){return new v(this.datatypeString)}get datatypeString(){const e=this.id,r=e.lastIndexOf('"')+1,i=r<e.length?e[r]:"";return"^"===i?e.substr(r+2):"@"!==i?K.string:$.langString}equals(e){return e instanceof Y?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class de extends E{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class ee extends E{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class me extends E{constructor(){return super(""),q||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}}function k(s,e,r){if(e=e||d,!s)return e.defaultGraph();switch(s[0]){case"?":return e.variable(s.substr(1));case"_":return e.blankNode(s.substr(2));case'"':if(e===d)return new Y(s);if('"'===s[s.length-1])return e.literal(s.substr(1,s.length-2));const i=s.lastIndexOf('"',s.length-1);return e.literal(s.substr(1,i-1),"@"===s[i+1]?s.substr(i+2):e.namedNode(s.substr(i+3)));case"[":s=JSON.parse(s);break;default:if(!r||!Array.isArray(s))return e.namedNode(s)}return e.quad(k(s[0],e,!0),k(s[1],e,!0),k(s[2],e,!0),s[3]&&k(s[3],e,!0))}function re(s,e){if("string"==typeof s)return s;if(s instanceof E&&"Quad"!==s.termType)return s.id;if(!s)return q.id;switch(s.termType){case"NamedNode":return s.value;case"BlankNode":return`_:${s.value}`;case"Variable":return`?${s.value}`;case"DefaultGraph":return"";case"Literal":return`"${s.value}"${s.language?`@${s.language}`:s.datatype&&s.datatype.value!==K.string?`^^${s.datatype.value}`:""}`;case"Quad":const r=[re(s.subject,!0),re(s.predicate,!0),re(s.object,!0)];return s.graph&&"DefaultGraph"!==s.graph.termType&&r.push(re(s.graph,!0)),e?r:JSON.stringify(r);default:throw new Error(`Unexpected termType: ${s.termType}`)}}q=new me;class J extends E{constructor(e,r,i,l){super(""),this._subject=e,this._predicate=r,this._object=i,this._graph=l||q}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function fe(s){return new v(s)}function G(s){return new de(s||"n3-"+I++)}function Ae(s,e){if("string"==typeof e)return new Y(`"${s}"@${e.toLowerCase()}`);let r=e?e.value:"";return""===r&&("boolean"==typeof s?r=K.boolean:"number"==typeof s&&(Number.isFinite(s)?r=Number.isInteger(s)?K.integer:K.double:(r=K.double,Number.isNaN(s)||(s=s>0?"INF":"-INF")))),new Y(""===r||r===K.string?`"${s}"`:`"${s}"^^${r}`)}function Q(s){return new ee(s)}function y(s,e,r,i){return new J(s,e,r,i)}function W(s){if(s instanceof E)return s;switch(s.termType){case"NamedNode":return fe(s.value);case"BlankNode":return G(s.value);case"Variable":return Q(s.value);case"DefaultGraph":return q;case"Literal":return Ae(s.value,s.language||s.datatype);case"Quad":return se(s);default:throw new Error(`Unexpected termType: ${s.termType}`)}}function se(s){if(s instanceof J)return s;if("Quad"!==s.termType)throw new Error(`Unexpected termType: ${s.termType}`);return y(W(s.subject),W(s.predicate),W(s.object),W(s.graph))}let ye=0;class Ee{constructor(e){this._contextStack=[],this._graph=null,this._setBase((e=e||{}).baseIRI),e.factory&&he(this,e.factory);const r="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",i=/turtle/.test(r),l=/trig/.test(r),b=/triple/.test(r),w=/quad/.test(r),T=this._n3Mode=/n3/.test(r),H=b||w;(this._supportsNamedGraphs=!(i||T))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(i||l||b||T),this._isImpliedBy=e.isImpliedBy,this._supportsRDFStar=""===r||/star|\*$/.test(r),H&&(this._resolveRelativeIRI=ue=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new L({lineMode:H,n3:T,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){ye=0}_setBase(e){if(e){const r=e.indexOf("#");r>=0&&(e=e.substr(0,r)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,r,i,l,b){const w=this._n3Mode;this._contextStack.push({type:e,subject:i,predicate:l,object:b,graph:r,inverse:!!w&&this._inversePredicate,blankPrefix:w?this._prefixes._:"",quantified:w?this._quantified:null}),w&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,r){const i=this._contextStack.pop();if(!i||i.type!==e)return this._error(`Unexpected ${r.type}`,r);this._subject=i.subject,this._predicate=i.predicate,this._object=i.object,this._graph=i.graph,this._n3Mode&&(this._inversePredicate=i.inverse,this._prefixes._=i.blankPrefix,this._quantified=i.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,r){let i;switch(e.type){case"IRI":case"typeIRI":const l=this._resolveIRI(e.value);if(null===l)return this._error("Invalid IRI",e);i=this._factory.namedNode(l);break;case"type":case"prefixed":const b=this._prefixes[e.prefix];if(void 0===b)return this._error(`Undefined prefix "${e.prefix}:"`,e);i=this._factory.namedNode(b+e.value);break;case"blank":i=this._factory.blankNode(this._prefixes[e.prefix]+e.value);break;case"var":i=this._factory.variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!r&&this._n3Mode&&i.id in this._quantified&&(i=this._quantified[i.id]),i}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._factory.blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._factory.blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="variable",this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-star syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const r=e.type;switch(r){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${r}`,e):(this._subject=null,"]"===r?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._factory.blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-star syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const r=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:r?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let r=null,i=null,l=this._readListItem;const b=this._subject,w=this._contextStack,T=w[w.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,i=this._factory.blankNode(),this.RDF_FIRST,this._subject=r=this._factory.blankNode()),l=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,i=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==w.length&&"list"===w[w.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(l=this._readPredicate,this._subject===this.RDF_NIL)return l}else if(l=this._getContextEndReader(),this._object===this.RDF_NIL)return l;i=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,l=this._readListItemDataTypeOrLang):(r=this._factory.literal(e.value,this._factory.namedNode(e.prefix)),l=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(r=this._readEntity(e)))return}if(null===i&&(this._subject=i=this._factory.blankNode()),null===b?null===T.predicate?T.subject=i:T.object=i:this._emit(b,this.RDF_REST,i,this._graph),null!==r){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,i,this.RDF_FIRST,r),this._subject=r,this._predicate=null,this._getPathReader(this._readListItem);this._emit(i,this.RDF_FIRST,r,this._graph)}return l}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let r=this._factory.literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const i=this._readEntity(e);if(void 0===i)return;r=this._factory.literal(this._literalValue,i),e=null;break;case"langcode":r=this._factory.literal(this._literalValue,e.value),e=null}return{token:e,literal:r}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,r){const i=this._completeLiteral(e);if(i)return this._object=i.literal,r&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===i.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(i.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let r,i=this._graph;const l=this._subject,b=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,r=this._contextStack.length?this._readSubject:this._readInTopContext,b&&(this._inversePredicate=!1);break;case";":r=this._readPredicate;break;case",":r=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF-star syntax",e);this._subject=this._factory.quad(l,this._predicate,this._object,this.DEFAULTGRAPH),r=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,r=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(i=this._readEntity(e))){r=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==l){const w=this._predicate,T=this._object;b?this._emit(T,w,l,i):this._emit(l,w,T,i)}return r}_readBlankNodePunctuation(e){let r;switch(e.type){case";":r=this._readPredicate;break;case",":r=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),r}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const r=this._readEntity(e);return this._prefixes[this._prefix]=r.value,this._prefixCallback(this._prefix,r),this._readDeclarationPunctuation}_readBaseIRI(e){const r="IRI"===e.type&&this._resolveIRI(e.value);return r?(this._setBase(r),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._factory.blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let r;switch(e.type){case"IRI":case"prefixed":if(void 0!==(r=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,r,this.QUANTIFIERS_GRAPH)):this._quantified[r.id]=this._factory[this._quantifier](this._factory.blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const r=this._contextStack,i=r.length&&r[r.length-1];if(i&&"item"===i.type){const l=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,l,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let r,i;const l=this._factory.blankNode();if(void 0!==(i=this._readEntity(e)))return null===this._predicate?(r=this._subject,this._subject=l):(r=this._object,this._object=l),this._emit(r,i,l,this._graph),this._readPath}_readBackwardPath(e){const r=this._factory.blankNode();let i,l;if(void 0!==(i=this._readEntity(e)))return null===this._predicate?(l=this._subject,this._subject=r):(l=this._object,this._object=r),this._emit(r,i,l,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const r=this._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=r,this._readPredicate):(this._object=r,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,r,i,l){this._callback(null,this._factory.quad(e,r,i,l||this.DEFAULTGRAPH))}_error(e,r){const i=new Error(`${e} on line ${r.line}.`);i.context={token:r,line:r.line,previousToken:this._lexer.previousToken},this._callback(i),this._callback=Be}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const r=e.length;let i="",l=-1,b=-1,w=0,T="/";for(;l<r;){switch(T){case":":if(b<0&&"/"===e[++l]&&"/"===e[++l])for(;(b=l+1)<r&&"/"!==e[b];)l=b;break;case"?":case"#":l=r;break;case"/":if("."===e[l+1])switch(T=e[1+ ++l],T){case"/":i+=e.substring(w,l-1),w=l+1;break;case void 0:case"?":case"#":return i+e.substring(w,l)+e.substr(l+1);case".":if(T=e[1+ ++l],void 0===T||"/"===T||"?"===T||"#"===T){if(i+=e.substring(w,l-2),(w=i.lastIndexOf("/"))>=b&&(i=i.substr(0,w)),"/"!==T)return`${i}/${e.substr(l+1)}`;w=l+1}}}T=e[++l]}return i+e.substring(w)}parse(e,r,i){let l,b,w;if(r&&(r.onQuad||r.onPrefix||r.onComment)?(l=r.onQuad,b=r.onPrefix,w=r.onComment):(l=r,b=i),this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${ye++}_`,this._prefixCallback=b||Be,this._inversePredicate=!1,this._quantified=Object.create(null),!l){const H=[];let ue;if(this._callback=(pe,_e)=>{pe?ue=pe:_e&&H.push(_e)},this._lexer.tokenize(e).every(pe=>this._readCallback=this._readCallback(pe)),ue)throw ue;return H}let T=(H,ue)=>{null!==H?(this._callback(H),this._callback=Be):this._readCallback&&(this._readCallback=this._readCallback(ue))};w&&(this._lexer.comments=!0,T=(H,ue)=>{null!==H?(this._callback(H),this._callback=Be):this._readCallback&&("comment"===ue.type?w(ue.value):this._readCallback=this._readCallback(ue))}),this._callback=l,this._lexer.tokenize(e,T)}}function Be(){}function he(s,e){s._factory=e,s.DEFAULTGRAPH=e.defaultGraph(),s.RDF_FIRST=e.namedNode(S.rdf.first),s.RDF_REST=e.namedNode(S.rdf.rest),s.RDF_NIL=e.namedNode(S.rdf.nil),s.N3_FORALL=e.namedNode(S.r.forAll),s.N3_FORSOME=e.namedNode(S.r.forSome),s.ABBREVIATIONS={a:e.namedNode(S.rdf.type),"=":e.namedNode(S.owl.sameAs),">":e.namedNode(S.log.implies),"<":e.namedNode(S.log.isImpliedBy)},s.QUANTIFIERS_GRAPH=e.namedNode("urn:n3:quantifiers")}function Pe(s){return!!s&&"NamedNode"===s.termType}function Ce(s){return!!s&&"BlankNode"===s.termType}function De(s){return!!s&&"Literal"===s.termType}function $e(s){return!!s&&"Variable"===s.termType}function ge(s){return!!s&&"Quad"===s.termType}function Te(s){return!!s&&"DefaultGraph"===s.termType}function m(s){return Te(s.graph)}function R(s,e){return D({"":s.value||s},e)("")}function D(s,e){const r=Object.create(null);for(const l in s)i(l,s[l]);function i(l,b){if("string"==typeof b){const w=Object.create(null);r[l]=T=>w[T]||(w[T]=e.namedNode(b+T))}else if(!(l in r))throw new Error(`Unknown prefix: ${l}`);return r[l]}return e=e||p,i}function ie(s){return s.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}he(Ee.prototype,p);const oe=/^:?[^:?#]*(?:[?#]|$)|^file:|^[^:]*:\/*[^?#]+?\/(?:\.\.?(?:\/|$)|\/)/i,Ie=/^(?:(?:[^/?#]{3,}|\.?[^/?#.]\.?)(?:\/[^/?#]{3,}|\.?[^/?#.]\.?)*\/?)?(?:[?#]|$)/;class ae{constructor(e){this.base=e,this._baseLength=0,this._baseMatcher=null,this._pathReplacements=new Array(e.length+1)}static supports(e){return!oe.test(e)}_getBaseMatcher(){if(this._baseMatcher)return this._baseMatcher;if(!ae.supports(this.base))return this._baseMatcher=/.^/;const e=/^[^:]*:\/*/.exec(this.base)[0],r=["^",ie(e)],i=[],l=[],b=/[^/?#]*([/?#])/y;let w,T=0,H=0,ue=b.lastIndex=e.length;for(;!T&&!H&&(w=b.exec(this.base));)"#"===w[1]?H=b.lastIndex-1:(r.push(ie(w[0]),"(?:"),i.push(")?"),"?"!==w[1]?l.push(ue=b.lastIndex):(T=ue=b.lastIndex,H=this.base.indexOf("#",T),this._pathReplacements[T]="?"));for(let pe=0;pe<l.length;pe++)this._pathReplacements[l[pe]]="../".repeat(l.length-pe-1);return this._pathReplacements[l[l.length-1]]="./",this._baseLength=H>0?H:this.base.length,r.push(ie(this.base.substring(ue,this._baseLength)),T?"(?:#|$)":"(?:[?#]|$)"),this._baseMatcher=new RegExp([...r,...i].join(""))}toRelative(e){const r=this._getBaseMatcher().exec(e);if(!r)return e;const i=r[0].length;if(i===this._baseLength&&i===e.length)return"";const l=this._pathReplacements[i];if(l){const b=e.substring(i);return"?"===l||Ie.test(b)?"./"===l&&/^[^?#]/.test(b)?b:l+b:e}return e.substring(i-1)}}const X=p.defaultGraph(),{rdf:Se,xsd:o}=S,t=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,n=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,a={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class _ extends E{equals(e){return e===this}}class x{constructor(e,r){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(r=e,e=null),this._lists=(r=r||{}).lists,e)this._outputStream=e,this._endStream=void 0===r.end||!!r.end;else{let i="";this._outputStream={write(l,b,w){i+=l,w&&w()},end:l=>{l&&l(null,i)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(r.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=X,this._prefixIRIs=Object.create(null),r.prefixes&&this.addPrefixes(r.prefixes),r.baseIRI&&(this._baseIri=new ae(r.baseIRI)))}get _inDefaultGraph(){return X.equals(this._graph)}_write(e,r){this._outputStream.write(e,"utf8",r)}_writeQuad(e,r,i,l,b){try{l.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(X.equals(l)?"":`${this._encodeIriOrBlank(l)} {\n`)),this._graph=l,this._subject=null),e.equals(this._subject)?r.equals(this._predicate)?this._write(`, ${this._encodeObject(i)}`,b):this._write(`;\n ${this._encodePredicate(this._predicate=r)} ${this._encodeObject(i)}`,b):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=r)} ${this._encodeObject(i)}`,b)}catch(w){b&&b(w)}}_writeQuadLine(e,r,i,l,b){delete this._prefixMatch,this._write(this.quadToString(e,r,i,l),b)}quadToString(e,r,i,l){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(r)} ${this._encodeObject(i)}${l&&l.value?` ${this._encodeIriOrBlank(l)} .\n`:" .\n"}`}quadsToString(e){let r="";for(const i of e)r+=this.quadToString(i.subject,i.predicate,i.object,i.graph);return r}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let r=e.value;this._baseIri&&(r=this._baseIri.toRelative(r)),t.test(r)&&(r=r.replace(n,O));const i=this._prefixRegex.exec(r);return i?i[1]?this._prefixIRIs[i[1]]+i[2]:r:`<${r}>`}_encodeLiteral(e){let r=e.value;if(t.test(r)&&(r=r.replace(n,O)),e.language)return`"${r}"@${e.language}`;if(this._lineMode){if(e.datatype.value===o.string)return`"${r}"`}else switch(e.datatype.value){case o.string:return`"${r}"`;case o.boolean:if("true"===r||"false"===r)return r;break;case o.integer:if(/^[+-]?\d+$/.test(r))return r;break;case o.decimal:if(/^[+-]?\d*\.\d+$/.test(r))return r;break;case o.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(r))return r}return`"${r}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===Se.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:r,object:i,graph:l}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(r)} ${this._encodeObject(i)}${Te(l)?"":` ${this._encodeIriOrBlank(l)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,r,i,l,b){void 0===i?this._writeQuad(e.subject,e.predicate,e.object,e.graph,r):"function"==typeof l?this._writeQuad(e,r,i,X,l):this._writeQuad(e,r,i,l||X,b)}addQuads(e){for(let r=0;r<e.length;r++)this.addQuad(e[r])}addPrefix(e,r,i){const l={};l[e]=r,this.addPrefixes(l,i)}addPrefixes(e,r){if(!this._prefixIRIs)return r&&r();let i=!1;for(let l in e){let b=e[l];"string"!=typeof b&&(b=b.value),i=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[b]=l+=":",this._write(`@prefix ${l} <${b}>.\n`)}if(i){let l="",b="";for(const w in this._prefixIRIs)l+=l?`|${w}`:w,b+=(b?"|":"")+this._prefixIRIs[w];l=ie(l),this._prefixRegex=new RegExp(`^(?:${b})[^/]*$|^(${l})([_a-zA-Z0-9][\\-_a-zA-Z0-9]*)$`)}this._write(i?"\n":"",r)}blank(e,r){let l,b,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:r}]:"length"in e||(i=[e]),b=i.length){case 0:return new _("[]");case 1:if(l=i[0],!(l.object instanceof _))return new _(`[ ${this._encodePredicate(l.predicate)} ${this._encodeObject(l.object)} ]`);default:let w="[";for(let T=0;T<b;T++)l=i[T],l.predicate.equals(e)?w+=`, ${this._encodeObject(l.object)}`:(w+=`${(T?";\n ":"\n ")+this._encodePredicate(l.predicate)} ${this._encodeObject(l.object)}`,e=l.predicate);return new _(`${w}\n]`)}}list(e){const r=e&&e.length||0,i=new Array(r);for(let l=0;l<r;l++)i[l]=this._encodeObject(e[l]);return new _(`(${i.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let r=e&&((i,l)=>{r=null,e(i,l)});if(this._endStream)try{return this._outputStream.end(r)}catch{}r&&r()}}function O(s){let e=a[s];return void 0===e&&(1===s.length?(e=s.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=(1024*(s.charCodeAt(0)-55296)+s.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}var be=u(58208);const je=Symbol("iter");function Fe(s,e,r=4){if(0===r)return Object.assign(s,e);for(const i in e)s[i]=Fe(s[i]||Object.create(null),e[i],r-1);return s}function Ne(s,e,r=4){let i=!1;for(const l in s)if(l in e){const b=0===r?null:Ne(s[l],e[l],r-1);if(!1!==b)i=i||Object.create(null),i[l]=b;else if(3===r)return!1}return i}function ve(s,e,r=4){let i=!1;for(const l in s)if(l in e){if(0!==r){const b=ve(s[l],e[l],r-1);if(!1!==b)i=i||Object.create(null),i[l]=b;else if(3===r)return!1}}else i=i||Object.create(null),i[l]=0===r?null:Fe({},s[l],r-1);return i}class We{constructor(e={}){this._id=1,this._ids=Object.create(null),this._ids[""]=1,this._entities=Object.create(null),this._entities[1]="",this._blankNodeIndex=0,this._factory=e.factory||p}_termFromId(e){if("."===e[0]){const r=this._entities,i=e.split(".");return this._factory.quad(this._termFromId(r[i[1]]),this._termFromId(r[i[2]]),this._termFromId(r[i[3]]),i[4]&&this._termFromId(r[i[4]]))}return k(e,this._factory)}_termToNumericId(e){if("Quad"===e.termType){const r=this._termToNumericId(e.subject),i=this._termToNumericId(e.predicate),l=this._termToNumericId(e.object);let b;return r&&i&&l&&(Te(e.graph)||(b=this._termToNumericId(e.graph)))&&this._ids[b?`.${r}.${i}.${l}.${b}`:`.${r}.${i}.${l}`]}return this._ids[re(e)]}_termToNewNumericId(e){const r=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${Te(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:re(e);return this._ids[r]||(this._ids[this._entities[++this._id]=r]=this._id)}createBlankNode(e){let r,i;if(e)for(r=e=`_:${e}`,i=1;this._ids[r];)r=e+i++;else do{r="_:b"+this._blankNodeIndex++}while(this._ids[r]);return this._ids[r]=++this._id,this._entities[this._id]=r,this._factory.blankNode(r.substr(2))}}class ke{constructor(e,r){this._size=0,this._graphs=Object.create(null),!r&&e&&!e[0]&&"function"!=typeof e.match&&(r=e,e=null),this._factory=(r=r||{}).factory||p,this._entityIndex=r.entityIndex||new We({factory:this._factory}),this._entities=this._entityIndex._entities,this._termFromId=this._entityIndex._termFromId.bind(this._entityIndex),this._termToNumericId=this._entityIndex._termToNumericId.bind(this._entityIndex),this._termToNewNumericId=this._entityIndex._termToNewNumericId.bind(this._entityIndex),e&&this.addAll(e)}get size(){let e=this._size;if(null!==e)return e;e=0;const r=this._graphs;let i,l;for(const b in r)for(const w in i=r[b].subjects)for(const T in l=i[w])e+=Object.keys(l[T]).length;return this._size=e}_addToIndex(e,r,i,l){const b=e[r]||(e[r]={}),w=b[i]||(b[i]={}),T=l in w;return T||(w[l]=null),!T}_removeFromIndex(e,r,i,l){const b=e[r],w=b[i];delete w[l];for(const T in w)return;delete b[i];for(const T in b)return;delete e[r]}*_findInIndex(e,r,i,l,b,w,T,H){let ue,pe,_e;const Re=this._entities,Me=this._termFromId(Re[H]),we={subject:null,predicate:null,object:null};r&&((ue=e,e={})[r]=ue[r]);for(const Le in e)if(pe=e[Le]){we[b]=this._termFromId(Re[Le]),i&&((ue=pe,pe={})[i]=ue[i]);for(const Oe in pe)if(_e=pe[Oe]){we[w]=this._termFromId(Re[Oe]);const Qe=l?l in _e?[l]:[]:Object.keys(_e);for(let He=0;He<Qe.length;He++)we[T]=this._termFromId(Re[Qe[He]]),yield this._factory.quad(we.subject,we.predicate,we.object,Me)}}}_loop(e,r){for(const i in e)r(i)}_loopByKey0(e,r,i){let l,b;if(l=e[r])for(b in l)i(b)}_loopByKey1(e,r,i){let l,b;for(l in e)b=e[l],b[r]&&i(l)}_loopBy2Keys(e,r,i,l){let b,w,T;if((b=e[r])&&(w=b[i]))for(T in w)l(T)}_countInIndex(e,r,i,l){let w,T,H,b=0;r&&((w=e,e={})[r]=w[r]);for(const ue in e)if(T=e[ue]){i&&((w=T,T={})[i]=w[i]);for(const pe in T)(H=T[pe])&&(l?l in H&&b++:b+=Object.keys(H).length)}return b}_getGraphs(e){return"number"!=typeof(e=""===e?1:e&&(this._termToNumericId(e)||-1))?this._graphs:{[e]:this._graphs[e]}}_uniqueEntities(e){const r=Object.create(null);return i=>{i in r||(r[i]=!0,e(this._termFromId(this._entities[i],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,r,i,l){r||(l=e.graph,i=e.object,r=e.predicate,e=e.subject),l=l?this._termToNewNumericId(l):1;let b=this._graphs[l];return b||(b=this._graphs[l]={subjects:{},predicates:{},objects:{}},Object.freeze(b)),e=this._termToNewNumericId(e),r=this._termToNewNumericId(r),i=this._termToNewNumericId(i),!!this._addToIndex(b.subjects,e,r,i)&&(this._addToIndex(b.predicates,r,i,e),this._addToIndex(b.objects,i,e,r),this._size=null,!0)}addQuads(e){for(let r=0;r<e.length;r++)this.addQuad(e[r])}delete(e){return this.removeQuad(e),this}has(e,r,i,l){return e&&e.subject&&({subject:e,predicate:r,object:i,graph:l}=e),!this.readQuads(e,r,i,l).next().done}import(e){return e.on("data",r=>{this.addQuad(r)}),e}removeQuad(e,r,i,l){r||({subject:e,predicate:r,object:i,graph:l}=e),l=l?this._termToNumericId(l):1;const b=this._graphs;let w,T,H;if(!((e=e&&this._termToNumericId(e))&&(r=r&&this._termToNumericId(r))&&(i=i&&this._termToNumericId(i))&&(w=b[l])&&(T=w.subjects[e])&&(H=T[r])&&i in H))return!1;for(e in this._removeFromIndex(w.subjects,e,r,i),this._removeFromIndex(w.predicates,r,i,e),this._removeFromIndex(w.objects,i,e,r),null!==this._size&&this._size--,w.subjects)return!0;return delete b[l],!0}removeQuads(e){for(let r=0;r<e.length;r++)this.removeQuad(e[r])}remove(e){return e.on("data",r=>{this.removeQuad(r)}),e}removeMatches(e,r,i,l){const b=new be.Readable({objectMode:!0}),w=this.readQuads(e,r,i,l);return b._read=T=>{for(;--T>=0;){const{done:H,value:ue}=w.next();if(H)return void b.push(null);b.push(ue)}},this.remove(b)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,r,i,l){return[...this.readQuads(e,r,i,l)]}*readQuads(e,r,i,l){const b=this._getGraphs(l);let w,T,H,ue;if(!(e&&!(T=this._termToNumericId(e))||r&&!(H=this._termToNumericId(r))||i&&!(ue=this._termToNumericId(i))))for(const pe in b)(w=b[pe])&&(T?ue?yield*this._findInIndex(w.objects,ue,T,H,"object","subject","predicate",pe):yield*this._findInIndex(w.subjects,T,H,null,"subject","predicate","object",pe):H?yield*this._findInIndex(w.predicates,H,ue,null,"predicate","object","subject",pe):ue?yield*this._findInIndex(w.objects,ue,null,null,"object","subject","predicate",pe):yield*this._findInIndex(w.subjects,null,null,null,"subject","predicate","object",pe))}match(e,r,i,l){return new ze(this,e,r,i,l,{entityIndex:this._entityIndex})}countQuads(e,r,i,l){const b=this._getGraphs(l);let T,H,ue,pe,w=0;if(e&&!(H=this._termToNumericId(e))||r&&!(ue=this._termToNumericId(r))||i&&!(pe=this._termToNumericId(i)))return 0;for(const _e in b)(T=b[_e])&&(w+=e?i?this._countInIndex(T.objects,pe,H,ue):this._countInIndex(T.subjects,H,ue,pe):r?this._countInIndex(T.predicates,ue,pe,H):this._countInIndex(T.objects,pe,H,ue));return w}forEach(e,r,i,l,b){this.some(w=>(e(w,this),!1),r,i,l,b)}every(e,r,i,l,b){return!this.some(w=>!e(w,this),r,i,l,b)}some(e,r,i,l,b){for(const w of this.readQuads(r,i,l,b))if(e(w,this))return!0;return!1}getSubjects(e,r,i){const l=[];return this.forSubjects(b=>{l.push(b)},e,r,i),l}forSubjects(e,r,i,l){const b=this._getGraphs(l);let w,T,H;if(e=this._uniqueEntities(e),!(r&&!(T=this._termToNumericId(r))||i&&!(H=this._termToNumericId(i))))for(l in b)(w=b[l])&&(T?H?this._loopBy2Keys(w.predicates,T,H,e):this._loopByKey1(w.subjects,T,e):H?this._loopByKey0(w.objects,H,e):this._loop(w.subjects,e))}getPredicates(e,r,i){const l=[];return this.forPredicates(b=>{l.push(b)},e,r,i),l}forPredicates(e,r,i,l){const b=this._getGraphs(l);let w,T,H;if(e=this._uniqueEntities(e),!(r&&!(T=this._termToNumericId(r))||i&&!(H=this._termToNumericId(i))))for(l in b)(w=b[l])&&(T?H?this._loopBy2Keys(w.objects,H,T,e):this._loopByKey0(w.subjects,T,e):H?this._loopByKey1(w.predicates,H,e):this._loop(w.predicates,e))}getObjects(e,r,i){const l=[];return this.forObjects(b=>{l.push(b)},e,r,i),l}forObjects(e,r,i,l){const b=this._getGraphs(l);let w,T,H;if(e=this._uniqueEntities(e),!(r&&!(T=this._termToNumericId(r))||i&&!(H=this._termToNumericId(i))))for(l in b)(w=b[l])&&(T?H?this._loopBy2Keys(w.subjects,T,H,e):this._loopByKey1(w.objects,T,e):H?this._loopByKey0(w.predicates,H,e):this._loop(w.objects,e))}getGraphs(e,r,i){const l=[];return this.forGraphs(b=>{l.push(b)},e,r,i),l}forGraphs(e,r,i,l){for(const b in this._graphs)this.some(w=>(e(w.graph),!0),r,i,l,this._termFromId(this._entities[b]))}createBlankNode(e){return this._entityIndex.createBlankNode(e)}extractLists({remove:e=!1,ignoreErrors:r=!1}={}){const i={},l=r?()=>!0:(T,H)=>{throw new Error(`${T.value} ${H}`)},b=this.getQuads(null,S.rdf.rest,S.rdf.nil,null),w=e?[...b]:[];return b.forEach(T=>{const H=[];let pe,_e,ue=!1;const Re=T.graph;let Me=T.subject;for(;Me&&!ue;){const we=this.getQuads(null,null,Me,null),Le=this.getQuads(Me,null,null,null);let Oe,Qe=null,He=null,tt=null;for(let Ye=0;Ye<Le.length&&!ue;Ye++)Oe=Le[Ye],Oe.graph.equals(Re)?pe?ue=l(Me,"has non-list arcs out"):Oe.predicate.value===S.rdf.first?Qe?ue=l(Me,"has multiple rdf:first arcs"):w.push(Qe=Oe):Oe.predicate.value===S.rdf.rest?He?ue=l(Me,"has multiple rdf:rest arcs"):w.push(He=Oe):we.length?ue=l(Me,"can't be subject and object"):(pe=Oe,_e="subject"):ue=l(Me,"not confined to single graph");for(let Ye=0;Ye<we.length&&!ue;++Ye)Oe=we[Ye],pe?ue=l(Me,"can't have coreferences"):Oe.predicate.value===S.rdf.rest?tt?ue=l(Me,"has incoming rdf:rest arcs"):tt=Oe:(pe=Oe,_e="object");Qe?H.unshift(Qe.object):ue=l(Me,"has no list head"),Me=tt&&tt.subject}ue?e=!1:pe&&(i[pe[_e].value]=H)}),e&&this.removeQuads(w),i}addAll(e){if(e instanceof ze&&(e=e.filtered),Array.isArray(e))this.addQuads(e);else if(e instanceof ke&&e._entityIndex===this._entityIndex)0!==e._size&&(this._graphs=Fe(this._graphs,e._graphs),this._size=null);else for(const r of e)this.add(r);return this}contains(e){if(e instanceof ze&&(e=e.filtered),e===this)return!0;if(!(e instanceof ke)||this._entityIndex!==e._entityIndex)return e.every(ue=>this.has(ue));const r=this._graphs,i=e._graphs;let l,b,w,T,H;for(const ue in i){if(!(l=r[ue]))return!1;l=l.subjects;for(const pe in b=i[ue].subjects){if(!(w=l[pe]))return!1;for(const _e in T=b[pe]){if(!(H=w[_e]))return!1;for(const Re in T[_e])if(!(Re in H))return!1}}}return!0}deleteMatches(e,r,i,l){for(const b of this.match(e,r,i,l))this.removeQuad(b);return this}difference(e){if(e&&e instanceof ze&&(e=e.filtered),e===this)return new ke({entityIndex:this._entityIndex});if(e instanceof ke&&e._entityIndex===this._entityIndex){const r=new ke({entityIndex:this._entityIndex}),i=ve(this._graphs,e._graphs);return i&&(r._graphs=i,r._size=null),r}return this.filter(r=>!e.has(r))}equals(e){return e instanceof ze&&(e=e.filtered),e===this||this.size===e.size&&this.contains(e)}filter(e){const r=new ke({entityIndex:this._entityIndex});for(const i of this)e(i,this)&&r.add(i);return r}intersection(e){if(e instanceof ze&&(e=e.filtered),e===this){const r=new ke({entityIndex:this._entityIndex});return r._graphs=Fe(Object.create(null),this._graphs),r._size=this._size,r}if(e instanceof ke&&this._entityIndex===e._entityIndex){const r=new ke({entityIndex:this._entityIndex}),i=Ne(e._graphs,this._graphs);return i&&(r._graphs=i,r._size=null),r}return this.filter(r=>e.has(r))}map(e){const r=new ke({entityIndex:this._entityIndex});for(const i of this)r.add(e(i,this));return r}reduce(e,r){const i=this.readQuads();let l=void 0===r?i.next().value:r;for(const b of i)l=e(l,b,this);return l}toArray(){return this.getQuads()}toCanonical(){throw new Error("not implemented")}toStream(){return this.match()}toString(){return(new x).quadsToString(this)}union(e){const r=new ke({entityIndex:this._entityIndex});return r._graphs=Fe(Object.create(null),this._graphs),r._size=this._size,r.addAll(e),r}*[Symbol.iterator](){yield*this.readQuads()}}function Ue(s,e,r=0){const i=e[r];if(i&&!(i in s))return!1;let l=!1;for(const b in i?{[i]:s[i]}:s){const w=2===r?null:Ue(s[b],e,r+1);!1!==w&&(l=l||Object.create(null),l[b]=w)}return l}class ze extends be.Readable{constructor(e,r,i,l,b,w){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:r,predicate:i,object:l,graph:b,options:w})}get filtered(){if(!this._filtered){const{n3Store:e,graph:r,object:i,predicate:l,subject:b}=this,w=this._filtered=new ke({factory:e._factory,entityIndex:this.options.entityIndex});let T,H,ue;if(b&&!(T=w._termToNumericId(b))||l&&!(H=w._termToNumericId(l))||i&&!(ue=w._termToNumericId(i)))return w;const pe=e._getGraphs(r);for(const _e in pe){let Re,Me,we,Le;(Le=pe[_e])&&(!T&&H?(Me=Ue(Le.predicates,[H,ue,T]))&&(Re=Ue(Le.subjects,[T,H,ue]),we=Ue(Le.objects,[ue,T,H])):ue?(we=Ue(Le.objects,[ue,T,H]))&&(Re=Ue(Le.subjects,[T,H,ue]),Me=Ue(Le.predicates,[H,ue,T])):(Re=Ue(Le.subjects,[T,H,ue]))&&(Me=Ue(Le.predicates,[H,ue,T]),we=Ue(Le.objects,[ue,T,H])),Re&&(w._graphs[_e]={subjects:Re,predicates:Me,objects:we}))}w._size=null}return this._filtered}get size(){return this.filtered.size}_read(e){e>0&&!this[je]&&(this[je]=this[Symbol.iterator]());const r=this[je];for(;--e>=0;){const{done:i,value:l}=r.next();if(i)return void this.push(null);this.push(l)}}addAll(e){return this.filtered.addAll(e)}contains(e){return this.filtered.contains(e)}deleteMatches(e,r,i,l){return this.filtered.deleteMatches(e,r,i,l)}difference(e){return this.filtered.difference(e)}equals(e){return this.filtered.equals(e)}every(e,r,i,l,b){return this.filtered.every(e,r,i,l,b)}filter(e){return this.filtered.filter(e)}forEach(e,r,i,l,b){return this.filtered.forEach(e,r,i,l,b)}import(e){return this.filtered.import(e)}intersection(e){return this.filtered.intersection(e)}map(e){return this.filtered.map(e)}some(e,r,i,l,b){return this.filtered.some(e,r,i,l,b)}toCanonical(){return this.filtered.toCanonical()}toStream(){return this._filtered?this._filtered.toStream():this.n3Store.match(this.subject,this.predicate,this.object,this.graph)}union(e){return this._filtered?this._filtered.union(e):this.n3Store.match(this.subject,this.predicate,this.object,this.graph).addAll(e)}toArray(){return this._filtered?this._filtered.toArray():this.n3Store.getQuads(this.subject,this.predicate,this.object,this.graph)}reduce(e,r){return this.filtered.reduce(e,r)}toString(){return(new x).quadsToString(this)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,r,i,l){return new ze(this.filtered,e,r,i,l,this.options)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}class Ke{dataset(e){return new ke(e)}}function Ge(s){const e=[];for(const{subject:r,object:i}of s.match(null,p.namedNode("http://www.w3.org/2000/10/swap/log#implies"),null,p.defaultGraph())){const l=[...s.match(null,null,null,r)],b=[...s.match(null,null,null,i)];e.push({premise:l,conclusion:b})}return e}class Ve{constructor(e){this._store=e}_add(e,r,i,l,b){this._store._addToIndex(l.subjects,e,r,i)&&(this._store._addToIndex(l.predicates,r,i,e),this._store._addToIndex(l.objects,i,e,r),b())}_evaluatePremise(e,r,i,l=0){let b,w,T,H,ue;const[pe,_e,Re]=e.premise[l].value,Me=r[e.premise[l].content],we=!(T=pe.value);for(T in we?Me:{[T]:Me[T]})if(H=Me[T]){for(T in we&&(pe.value=Number(T)),b=!(T=_e.value),b?H:{[T]:H[T]})if(ue=H[T]){for(T in b&&(_e.value=Number(T)),w=!(T=Re.value),w?ue:{[T]:ue[T]})w&&(Re.value=Number(T)),l===e.premise.length-1?e.conclusion.forEach(Le=>{this._add(Le.subject.value,Le.predicate.value,Le.object.value,r,()=>{i(Le)})}):this._evaluatePremise(e,r,i,l+1);w&&(Re.value=null)}b&&(_e.value=null)}we&&(pe.value=null)}_evaluateRules(e,r,i){for(let l=0;l<e.length;l++)this._evaluatePremise(e[l],r,i)}_reasonGraphNaive(e,r){const i=[];function l(T){T.next&&T.next.forEach(H=>{i.push([T.subject.value,T.predicate.value,T.object.value,H])})}const b=T=>{T.forEach(H=>{this._add(H.subject.value,H.predicate.value,H.object.value,r,()=>{l(H)})})};let w;for(this._evaluateRules(e,r,l);void 0!==(w=i.pop());){const[T,H,ue,pe]=w,_e=pe.basePremise.subject.value;_e||(pe.basePremise.subject.value=T);const Re=pe.basePremise.predicate.value;Re||(pe.basePremise.predicate.value=H);const Me=pe.basePremise.object.value;Me||(pe.basePremise.object.value=ue),0===pe.premise.length?b(pe.conclusion):this._evaluatePremise(pe,r,l),_e||(pe.basePremise.subject.value=null),Re||(pe.basePremise.predicate.value=null),Me||(pe.basePremise.object.value=null)}}_createRule({premise:e,conclusion:r}){const i={},l=w=>"Variable"===w.termType?i[w.value]=i[w.value]||{}:{value:this._store._termToNewNumericId(w)},b=w=>({subject:l(w.subject),predicate:l(w.predicate),object:l(w.object)});return{premise:e.map(w=>b(w)),conclusion:r.map(w=>b(w)),variables:Object.values(i)}}reason(e){Array.isArray(e)||(e=Ge(e)),e=e.map(i=>this._createRule(i));for(const i of e)for(const l of e)for(let b=0;b<l.premise.length;b++){const w=l.premise[b];for(const T of i.conclusion){if(Ze(w.subject,T.subject)&&Ze(w.predicate,T.predicate)&&Ze(w.object,T.object)){const H=new Set,ue=[];w.subject.value=w.subject.value||1,w.object.value=w.object.value||1,w.predicate.value=w.predicate.value||1;for(let pe=0;pe<l.premise.length;pe++)pe!==b&&ue.push(Je(l.premise[pe],H));(T.next=T.next||[]).push({premise:ue,conclusion:l.conclusion,basePremise:w})}l.variables.forEach(H=>{H.value=null})}}for(const i of e){const l=new Set;i.premise=i.premise.map(b=>Je(b,l))}const r=this._store._getGraphs();for(const i in r)this._reasonGraphNaive(e,r[i]);this._store._size=null}}function Je({subject:s,predicate:e,object:r},i){const l=s.value||i.has(s)||(i.add(s),!1),b=e.value||i.has(e)||(i.add(e),!1),w=r.value||i.has(r)||(i.add(r),!1);return!l&&b?{content:"predicates",value:[e,r,s]}:w?{content:"objects",value:[r,s,e]}:{content:"subjects",value:[s,e,r]}}function Ze(s,e){return null===s.value&&(s.value=e.value),s.value===e.value}class qe extends be.Transform{constructor(e){super({decodeStrings:!0}),this._readableState.objectMode=!0;const r=new Ee(e);let i,l;const b={onQuad:(w,T)=>{w&&this.emit("error",w)||T&&this.push(T)},onPrefix:(w,T)=>{this.emit("prefix",w,T)}};e&&e.comments&&(b.onComment=w=>{this.emit("comment",w)}),r.parse({on:(w,T)=>{switch(w){case"data":i=T;break;case"end":l=T}}},b),this._transform=(w,T,H)=>{i(w),H()},this._flush=w=>{l(),w()}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),this}}class Xe extends be.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const r=this._writer=new x({write:(i,l,b)=>{this.push(i),b&&b()},end:i=>{this.push(null),i&&i()}},e);this._transform=(i,l,b)=>{r.addQuad(i,b)},this._flush=i=>{r.end(i)}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),e.on("prefix",(r,i)=>{this._writer.addPrefix(r,i)}),this}}const et={Lexer:L,Parser:Ee,Writer:x,Store:ke,StoreFactory:Ke,EntityIndex:We,StreamParser:qe,StreamWriter:Xe,Util:g,Reasoner:Ve,BaseIRI:ae,DataFactory:p,Term:E,NamedNode:v,Literal:Y,BlankNode:de,Variable:ee,DefaultGraph:me,Quad:J,Triple:J,termFromId:k,termToId:re}},40573(te){var u,g,ne=te.exports={};function C(){throw new Error("setTimeout has not been defined")}function P(){throw new Error("clearTimeout has not been defined")}function N($){if(u===setTimeout)return setTimeout($,0);if((u===C||!u)&&setTimeout)return u=setTimeout,setTimeout($,0);try{return u($,0)}catch{try{return u.call(null,$,0)}catch{return u.call(this,$,0)}}}!function(){try{u="function"==typeof setTimeout?setTimeout:C}catch{u=C}try{g="function"==typeof clearTimeout?clearTimeout:P}catch{g=P}}();var B,S=[],c=!1,z=-1;function U(){!c||!B||(c=!1,B.length?S=B.concat(S):z=-1,S.length&&j())}function j(){if(!c){var $=N(U);c=!0;for(var K=S.length;K;){for(B=S,S=[];++z<K;)B&&B[z].run();z=-1,K=S.length}B=null,c=!1,function M($){if(g===clearTimeout)return clearTimeout($);if((g===P||!g)&&clearTimeout)return g=clearTimeout,clearTimeout($);try{return g($)}catch{try{return g.call(null,$)}catch{return g.call(this,$)}}}($)}}function V($,K){this.fun=$,this.array=K}function L(){}ne.nextTick=function($){var K=new Array(arguments.length-1);if(arguments.length>1)for(var q=1;q<arguments.length;q++)K[q-1]=arguments[q];S.push(new V($,K)),1===S.length&&!c&&N(j)},V.prototype.run=function(){this.fun.apply(null,this.array)},ne.title="browser",ne.browser=!0,ne.env={},ne.argv=[],ne.version="",ne.versions={},ne.on=L,ne.addListener=L,ne.once=L,ne.off=L,ne.removeListener=L,ne.removeAllListeners=L,ne.emit=L,ne.prependListener=L,ne.prependOnceListener=L,ne.listeners=function($){return[]},ne.binding=function($){throw new Error("process.binding is not supported")},ne.cwd=function(){return"/"},ne.chdir=function($){throw new Error("process.chdir is not supported")},ne.umask=function(){return 0}},93513(te,ne,u){var g=u(25172);te.exports=function C(P){var N={},M=!1;function S(c,B){return M=!0,B=new Promise(function(z){z(P[c](B))}),{done:!1,value:new g(B,1)}}return N[typeof Symbol<"u"&&Symbol.iterator||"@@iterator"]=function(){return this},N.next=function(c){return M?(M=!1,c):S("next",c)},"function"==typeof P.throw&&(N.throw=function(c){if(M)throw M=!1,c;return S("throw",c)}),"function"==typeof P.return&&(N.return=function(c){return M?(M=!1,c):S("return",c)}),N},te.exports.__esModule=!0,te.exports.default=te.exports},82881(te){function u(g){function C(P){if(Object(P)!==P)return Promise.reject(new TypeError(P+" is not an object."));var N=P.done;return Promise.resolve(P.value).then(function(M){return{value:M,done:N}})}return(u=function(N){this.s=N,this.n=N.next}).prototype={s:null,n:null,next:function(){return C(this.n.apply(this.s,arguments))},return:function(N){var M=this.s.return;return void 0===M?Promise.resolve({value:N,done:!0}):C(M.apply(this.s,arguments))},throw:function(N){var M=this.s.return;return void 0===M?Promise.reject(N):C(M.apply(this.s,arguments))}},new u(g)}te.exports=function ne(g){var C,P,N,M=2;for(typeof Symbol<"u"&&(P=Symbol.asyncIterator,N=Symbol.iterator);M--;){if(P&&null!=(C=g[P]))return C.call(g);if(N&&null!=(C=g[N]))return new u(C.call(g));P="@@asyncIterator",N="@@iterator"}throw new TypeError("Object is not async iterable")},te.exports.__esModule=!0,te.exports.default=te.exports},29293(te){function ne(g,C,P,N,M,S,c){try{var B=g[S](c),z=B.value}catch(U){return void P(U)}B.done?C(z):Promise.resolve(z).then(N,M)}te.exports=function u(g){return function(){var C=this,P=arguments;return new Promise(function(N,M){var S=g.apply(C,P);function c(z){ne(S,N,M,c,B,"next",z)}function B(z){ne(S,N,M,c,B,"throw",z)}c(void 0)})}},te.exports.__esModule=!0,te.exports.default=te.exports}}]);
1
+ (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3786],{9465(re){"use strict";const{AbortController:ne,AbortSignal:u}=typeof self<"u"?self:typeof window<"u"?window:void 0;re.exports=ne,re.exports.AbortSignal=u,re.exports.default=ne},13981(re,ne){"use strict";ne.byteLength=function c(B){var $=R(B),q=$[1];return 3*($[0]+q)/4-q},ne.toByteArray=function X(B){var $,E,V=R(B),q=V[0],S=V[1],h=new C(function L(B,$,V){return 3*($+V)/4-V}(0,q,S)),d=0,p=S>0?q-4:q;for(E=0;E<p;E+=4)$=_[B.charCodeAt(E)]<<18|_[B.charCodeAt(E+1)]<<12|_[B.charCodeAt(E+2)]<<6|_[B.charCodeAt(E+3)],h[d++]=$>>16&255,h[d++]=$>>8&255,h[d++]=255&$;return 2===S&&($=_[B.charCodeAt(E)]<<2|_[B.charCodeAt(E+1)]>>4,h[d++]=255&$),1===S&&($=_[B.charCodeAt(E)]<<10|_[B.charCodeAt(E+1)]<<4|_[B.charCodeAt(E+2)]>>2,h[d++]=$>>8&255,h[d++]=255&$),h},ne.fromByteArray=function z(B){for(var $,V=B.length,q=V%3,S=[],h=16383,d=0,p=V-q;d<p;d+=h)S.push(N(B,d,d+h>p?p:d+h));return 1===q?S.push(u[($=B[V-1])>>2]+u[$<<4&63]+"=="):2===q&&S.push(u[($=(B[V-2]<<8)+B[V-1])>>10]+u[$>>4&63]+u[$<<2&63]+"="),S.join("")};for(var u=[],_=[],C=typeof Uint8Array<"u"?Uint8Array:Array,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j=0;j<64;++j)u[j]=F[j],_[F.charCodeAt(j)]=j;function R(B){var $=B.length;if($%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var V=B.indexOf("=");return-1===V&&(V=$),[V,V===$?0:4-V%4]}function k(B){return u[B>>18&63]+u[B>>12&63]+u[B>>6&63]+u[63&B]}function N(B,$,V){for(var S=[],h=$;h<V;h+=3)S.push(k((B[h]<<16&16711680)+(B[h+1]<<8&65280)+(255&B[h+2])));return S.join("")}_[45]=62,_[95]=63},83838(re,ne,u){"use strict";const _=u(13981),C=u(22020),F="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;ne.Buffer=c,ne.SlowBuffer=function h(o){return+o!=o&&(o=0),c.alloc(+o)},ne.INSPECT_MAX_BYTES=50;const j=2147483647;function R(o){if(o>j)throw new RangeError('The value "'+o+'" is invalid for option "size"');const t=new Uint8Array(o);return Object.setPrototypeOf(t,c.prototype),t}function c(o,t,n){if("number"==typeof o){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return N(o)}return L(o,t,n)}function L(o,t,n){if("string"==typeof o)return function z(o,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|d(o,t);let a=R(n);const g=a.write(o,t);return g!==n&&(a=a.slice(0,g)),a}(o,t);if(ArrayBuffer.isView(o))return function $(o){if(P(o,Uint8Array)){const t=new Uint8Array(o);return V(t.buffer,t.byteOffset,t.byteLength)}return B(o)}(o);if(null==o)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(P(o,ArrayBuffer)||o&&P(o.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(P(o,SharedArrayBuffer)||o&&P(o.buffer,SharedArrayBuffer)))return V(o,t,n);if("number"==typeof o)throw new TypeError('The "value" argument must not be of type number. Received type number');const a=o.valueOf&&o.valueOf();if(null!=a&&a!==o)return c.from(a,t,n);const g=function q(o){if(c.isBuffer(o)){const t=0|S(o.length),n=R(t);return 0===n.length||o.copy(n,0,0,t),n}return void 0!==o.length?"number"!=typeof o.length||Z(o.length)?R(0):B(o):"Buffer"===o.type&&Array.isArray(o.data)?B(o.data):void 0}(o);if(g)return g;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof o[Symbol.toPrimitive])return c.from(o[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}function X(o){if("number"!=typeof o)throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function N(o){return X(o),R(o<0?0:0|S(o))}function B(o){const t=o.length<0?0:0|S(o.length),n=R(t);for(let a=0;a<t;a+=1)n[a]=255&o[a];return n}function V(o,t,n){if(t<0||o.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(o.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let a;return a=void 0===t&&void 0===n?new Uint8Array(o):void 0===n?new Uint8Array(o,t):new Uint8Array(o,t,n),Object.setPrototypeOf(a,c.prototype),a}function S(o){if(o>=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return 0|o}function d(o,t){if(c.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||P(o,ArrayBuffer))return o.byteLength;if("string"!=typeof o)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);const n=o.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;let g=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return ie(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return f(o).length;default:if(g)return a?-1:ie(o).length;t=(""+t).toLowerCase(),g=!0}}function p(o,t,n){let a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(o||(o="utf8");;)switch(o){case"hex":return Q(this,t,n);case"utf8":case"utf-8":return le(this,t,n);case"ascii":return G(this,t,n);case"latin1":case"binary":return Ae(this,t,n);case"base64":return Y(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,t,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),a=!0}}function E(o,t,n){const a=o[t];o[t]=o[n],o[n]=a}function v(o,t,n,a,g){if(0===o.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=g?0:o.length-1),n<0&&(n=o.length+n),n>=o.length){if(g)return-1;n=o.length-1}else if(n<0){if(!g)return-1;n=0}if("string"==typeof t&&(t=c.from(t,a)),c.isBuffer(t))return 0===t.length?-1:K(o,t,n,a,g);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?g?Uint8Array.prototype.indexOf.call(o,t,n):Uint8Array.prototype.lastIndexOf.call(o,t,n):K(o,[t],n,a,g);throw new TypeError("val must be string, number or Buffer")}function K(o,t,n,a,g){let Pe,x=1,O=o.length,be=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(o.length<2||t.length<2)return-1;x=2,O/=2,be/=2,n/=2}function je(Ne,ve){return 1===x?Ne[ve]:Ne.readUInt16BE(ve*x)}if(g){let Ne=-1;for(Pe=n;Pe<O;Pe++)if(je(o,Pe)===je(t,-1===Ne?0:Pe-Ne)){if(-1===Ne&&(Ne=Pe),Pe-Ne+1===be)return Ne*x}else-1!==Ne&&(Pe-=Pe-Ne),Ne=-1}else for(n+be>O&&(n=O-be),Pe=n;Pe>=0;Pe--){let Ne=!0;for(let ve=0;ve<be;ve++)if(je(o,Pe+ve)!==je(t,ve)){Ne=!1;break}if(Ne)return Pe}return-1}function de(o,t,n,a){n=Number(n)||0;const g=o.length-n;a?(a=Number(a))>g&&(a=g):a=g;const x=t.length;let O;for(a>x/2&&(a=x/2),O=0;O<a;++O){const be=parseInt(t.substr(2*O,2),16);if(Z(be))return O;o[n+O]=be}return O}function ee(o,t,n,a){return A(ie(t,o.length-n),o,n,a)}function me(o,t,n,a){return A(function oe(o){const t=[];for(let n=0;n<o.length;++n)t.push(255&o.charCodeAt(n));return t}(t),o,n,a)}function U(o,t,n,a){return A(f(t),o,n,a)}function te(o,t,n,a){return A(function Ie(o,t){let n,a,g;const x=[];for(let O=0;O<o.length&&!((t-=2)<0);++O)n=o.charCodeAt(O),a=n>>8,g=n%256,x.push(g),x.push(a);return x}(t,o.length-n),o,n,a)}function Y(o,t,n){return _.fromByteArray(0===t&&n===o.length?o:o.slice(t,n))}function le(o,t,n){n=Math.min(o.length,n);const a=[];let g=t;for(;g<n;){const x=o[g];let O=null,be=x>239?4:x>223?3:x>191?2:1;if(g+be<=n){let je,Pe,Ne,ve;switch(be){case 1:x<128&&(O=x);break;case 2:je=o[g+1],128==(192&je)&&(ve=(31&x)<<6|63&je,ve>127&&(O=ve));break;case 3:je=o[g+1],Pe=o[g+2],128==(192&je)&&128==(192&Pe)&&(ve=(15&x)<<12|(63&je)<<6|63&Pe,ve>2047&&(ve<55296||ve>57343)&&(O=ve));break;case 4:je=o[g+1],Pe=o[g+2],Ne=o[g+3],128==(192&je)&&128==(192&Pe)&&128==(192&Ne)&&(ve=(15&x)<<18|(63&je)<<12|(63&Pe)<<6|63&Ne,ve>65535&&ve<1114112&&(O=ve))}}null===O?(O=65533,be=1):O>65535&&(O-=65536,a.push(O>>>10&1023|55296),O=56320|1023&O),a.push(O),g+=be}return function fe(o){const t=o.length;if(t<=4096)return String.fromCharCode.apply(String,o);let n="",a=0;for(;a<t;)n+=String.fromCharCode.apply(String,o.slice(a,a+=4096));return n}(a)}function G(o,t,n){let a="";n=Math.min(o.length,n);for(let g=t;g<n;++g)a+=String.fromCharCode(127&o[g]);return a}function Ae(o,t,n){let a="";n=Math.min(o.length,n);for(let g=t;g<n;++g)a+=String.fromCharCode(o[g]);return a}function Q(o,t,n){const a=o.length;(!t||t<0)&&(t=0),(!n||n<0||n>a)&&(n=a);let g="";for(let x=t;x<n;++x)g+=ae[o[x]];return g}function ce(o,t,n){const a=o.slice(t,n);let g="";for(let x=0;x<a.length-1;x+=2)g+=String.fromCharCode(a[x]+256*a[x+1]);return g}function y(o,t,n){if(o%1!=0||o<0)throw new RangeError("offset is not uint");if(o+t>n)throw new RangeError("Trying to access beyond buffer length")}function W(o,t,n,a,g,x){if(!c.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>g||t<x)throw new RangeError('"value" argument is out of bounds');if(n+a>o.length)throw new RangeError("Index out of range")}function se(o,t,n,a,g){ge(t,a,g,o,n,7);let x=Number(t&BigInt(4294967295));o[n++]=x,x>>=8,o[n++]=x,x>>=8,o[n++]=x,x>>=8,o[n++]=x;let O=Number(t>>BigInt(32)&BigInt(4294967295));return o[n++]=O,O>>=8,o[n++]=O,O>>=8,o[n++]=O,O>>=8,o[n++]=O,n}function ye(o,t,n,a,g){ge(t,a,g,o,n,7);let x=Number(t&BigInt(4294967295));o[n+7]=x,x>>=8,o[n+6]=x,x>>=8,o[n+5]=x,x>>=8,o[n+4]=x;let O=Number(t>>BigInt(32)&BigInt(4294967295));return o[n+3]=O,O>>=8,o[n+2]=O,O>>=8,o[n+1]=O,O>>=8,o[n]=O,n+8}function Ee(o,t,n,a,g,x){if(n+a>o.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Be(o,t,n,a,g){return t=+t,n>>>=0,g||Ee(o,0,n,4),C.write(o,t,n,a,23,4),n+4}function he(o,t,n,a,g){return t=+t,n>>>=0,g||Ee(o,0,n,8),C.write(o,t,n,a,52,8),n+8}ne.kMaxLength=j,!(c.TYPED_ARRAY_SUPPORT=function D(){try{const o=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(o,t),42===o.foo()}catch{return!1}}())&&typeof console<"u"&&"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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(o,t,n){return L(o,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(o,t,n){return function k(o,t,n){return X(o),o<=0?R(o):void 0!==t?"string"==typeof n?R(o).fill(t,n):R(o).fill(t):R(o)}(o,t,n)},c.allocUnsafe=function(o){return N(o)},c.allocUnsafeSlow=function(o){return N(o)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,n){if(P(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),P(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),!c.isBuffer(t)||!c.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;let a=t.length,g=n.length;for(let x=0,O=Math.min(a,g);x<O;++x)if(t[x]!==n[x]){a=t[x],g=n[x];break}return a<g?-1:g<a?1:0},c.isEncoding=function(t){switch(String(t).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}},c.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let a;if(void 0===n)for(n=0,a=0;a<t.length;++a)n+=t[a].length;const g=c.allocUnsafe(n);let x=0;for(a=0;a<t.length;++a){let O=t[a];if(P(O,Uint8Array))x+O.length>g.length?(c.isBuffer(O)||(O=c.from(O)),O.copy(g,x)):Uint8Array.prototype.set.call(g,O,x);else{if(!c.isBuffer(O))throw new TypeError('"list" argument must be an Array of Buffers');O.copy(g,x)}x+=O.length}return g},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<t;n+=2)E(this,n,n+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<t;n+=4)E(this,n,n+3),E(this,n+1,n+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<t;n+=8)E(this,n,n+7),E(this,n+1,n+6),E(this,n+2,n+5),E(this,n+3,n+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?le(this,0,t):p.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const n=ne.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},F&&(c.prototype[F]=c.prototype.inspect),c.prototype.compare=function(t,n,a,g,x){if(P(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=0),void 0===a&&(a=t?t.length:0),void 0===g&&(g=0),void 0===x&&(x=this.length),n<0||a>t.length||g<0||x>this.length)throw new RangeError("out of range index");if(g>=x&&n>=a)return 0;if(g>=x)return-1;if(n>=a)return 1;if(this===t)return 0;let O=(x>>>=0)-(g>>>=0),be=(a>>>=0)-(n>>>=0);const je=Math.min(O,be),Pe=this.slice(g,x),Ne=t.slice(n,a);for(let ve=0;ve<je;++ve)if(Pe[ve]!==Ne[ve]){O=Pe[ve],be=Ne[ve];break}return O<be?-1:be<O?1:0},c.prototype.includes=function(t,n,a){return-1!==this.indexOf(t,n,a)},c.prototype.indexOf=function(t,n,a){return v(this,t,n,a,!0)},c.prototype.lastIndexOf=function(t,n,a){return v(this,t,n,a,!1)},c.prototype.write=function(t,n,a,g){if(void 0===n)g="utf8",a=this.length,n=0;else if(void 0===a&&"string"==typeof n)g=n,a=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n>>>=0,isFinite(a)?(a>>>=0,void 0===g&&(g="utf8")):(g=a,a=void 0)}const x=this.length-n;if((void 0===a||a>x)&&(a=x),t.length>0&&(a<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");g||(g="utf8");let O=!1;for(;;)switch(g){case"hex":return de(this,t,n,a);case"utf8":case"utf-8":return ee(this,t,n,a);case"ascii":case"latin1":case"binary":return me(this,t,n,a);case"base64":return U(this,t,n,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,t,n,a);default:if(O)throw new TypeError("Unknown encoding: "+g);g=(""+g).toLowerCase(),O=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,n){const a=this.length;(t=~~t)<0?(t+=a)<0&&(t=0):t>a&&(t=a),(n=void 0===n?a:~~n)<0?(n+=a)<0&&(n=0):n>a&&(n=a),n<t&&(n=t);const g=this.subarray(t,n);return Object.setPrototypeOf(g,c.prototype),g},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let g=this[t],x=1,O=0;for(;++O<n&&(x*=256);)g+=this[t+O]*x;return g},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let g=this[t+--n],x=1;for(;n>0&&(x*=256);)g+=this[t+--n]*x;return g},c.prototype.readUint8=c.prototype.readUInt8=function(t,n){return t>>>=0,n||y(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,n){return t>>>=0,n||y(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,n){return t>>>=0,n||y(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,n){return t>>>=0,n||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,n){return t>>>=0,n||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=J(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];(void 0===n||void 0===a)&&m(t,this.length-8);const g=n+256*this[++t]+65536*this[++t]+this[++t]*2**24,x=this[++t]+256*this[++t]+65536*this[++t]+a*2**24;return BigInt(g)+(BigInt(x)<<BigInt(32))}),c.prototype.readBigUInt64BE=J(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];(void 0===n||void 0===a)&&m(t,this.length-8);const g=n*2**24+65536*this[++t]+256*this[++t]+this[++t],x=this[++t]*2**24+65536*this[++t]+256*this[++t]+a;return(BigInt(g)<<BigInt(32))+BigInt(x)}),c.prototype.readIntLE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let g=this[t],x=1,O=0;for(;++O<n&&(x*=256);)g+=this[t+O]*x;return x*=128,g>=x&&(g-=Math.pow(2,8*n)),g},c.prototype.readIntBE=function(t,n,a){t>>>=0,n>>>=0,a||y(t,n,this.length);let g=n,x=1,O=this[t+--g];for(;g>0&&(x*=256);)O+=this[t+--g]*x;return x*=128,O>=x&&(O-=Math.pow(2,8*n)),O},c.prototype.readInt8=function(t,n){return t>>>=0,n||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,n){t>>>=0,n||y(t,2,this.length);const a=this[t]|this[t+1]<<8;return 32768&a?4294901760|a:a},c.prototype.readInt16BE=function(t,n){t>>>=0,n||y(t,2,this.length);const a=this[t+1]|this[t]<<8;return 32768&a?4294901760|a:a},c.prototype.readInt32LE=function(t,n){return t>>>=0,n||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,n){return t>>>=0,n||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=J(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];return(void 0===n||void 0===a)&&m(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(a<<24))<<BigInt(32))+BigInt(n+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),c.prototype.readBigInt64BE=J(function(t){Te(t>>>=0,"offset");const n=this[t],a=this[t+7];(void 0===n||void 0===a)&&m(t,this.length-8);const g=(n<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(g)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+a)}),c.prototype.readFloatLE=function(t,n){return t>>>=0,n||y(t,4,this.length),C.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,n){return t>>>=0,n||y(t,4,this.length),C.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,n){return t>>>=0,n||y(t,8,this.length),C.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,n){return t>>>=0,n||y(t,8,this.length),C.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,n,a,g){t=+t,n>>>=0,a>>>=0,g||W(this,t,n,a,Math.pow(2,8*a)-1,0);let x=1,O=0;for(this[n]=255&t;++O<a&&(x*=256);)this[n+O]=t/x&255;return n+a},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,n,a,g){t=+t,n>>>=0,a>>>=0,g||W(this,t,n,a,Math.pow(2,8*a)-1,0);let x=a-1,O=1;for(this[n+x]=255&t;--x>=0&&(O*=256);)this[n+x]=t/O&255;return n+a},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,1,255,0),this[n]=255&t,n+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,65535,0),this[n]=255&t,this[n+1]=t>>>8,n+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=255&t,n+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t,n+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t,n+4},c.prototype.writeBigUInt64LE=J(function(t,n=0){return se(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=J(function(t,n=0){return ye(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(t,n,a,g){if(t=+t,n>>>=0,!g){const je=Math.pow(2,8*a-1);W(this,t,n,a,je-1,-je)}let x=0,O=1,be=0;for(this[n]=255&t;++x<a&&(O*=256);)t<0&&0===be&&0!==this[n+x-1]&&(be=1),this[n+x]=(t/O|0)-be&255;return n+a},c.prototype.writeIntBE=function(t,n,a,g){if(t=+t,n>>>=0,!g){const je=Math.pow(2,8*a-1);W(this,t,n,a,je-1,-je)}let x=a-1,O=1,be=0;for(this[n+x]=255&t;--x>=0&&(O*=256);)t<0&&0===be&&0!==this[n+x+1]&&(be=1),this[n+x]=(t/O|0)-be&255;return n+a},c.prototype.writeInt8=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=255&t,n+1},c.prototype.writeInt16LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,32767,-32768),this[n]=255&t,this[n+1]=t>>>8,n+2},c.prototype.writeInt16BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=255&t,n+2},c.prototype.writeInt32LE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,2147483647,-2147483648),this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4},c.prototype.writeInt32BE=function(t,n,a){return t=+t,n>>>=0,a||W(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t,n+4},c.prototype.writeBigInt64LE=J(function(t,n=0){return se(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=J(function(t,n=0){return ye(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(t,n,a){return Be(this,t,n,!0,a)},c.prototype.writeFloatBE=function(t,n,a){return Be(this,t,n,!1,a)},c.prototype.writeDoubleLE=function(t,n,a){return he(this,t,n,!0,a)},c.prototype.writeDoubleBE=function(t,n,a){return he(this,t,n,!1,a)},c.prototype.copy=function(t,n,a,g){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(a||(a=0),!g&&0!==g&&(g=this.length),n>=t.length&&(n=t.length),n||(n=0),g>0&&g<a&&(g=a),g===a||0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("sourceEnd out of bounds");g>this.length&&(g=this.length),t.length-n<g-a&&(g=t.length-n+a);const x=g-a;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(n,a,g):Uint8Array.prototype.set.call(t,this.subarray(a,g),n),x},c.prototype.fill=function(t,n,a,g){if("string"==typeof t){if("string"==typeof n?(g=n,n=0,a=this.length):"string"==typeof a&&(g=a,a=this.length),void 0!==g&&"string"!=typeof g)throw new TypeError("encoding must be a string");if("string"==typeof g&&!c.isEncoding(g))throw new TypeError("Unknown encoding: "+g);if(1===t.length){const O=t.charCodeAt(0);("utf8"===g&&O<128||"latin1"===g)&&(t=O)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(n<0||this.length<n||this.length<a)throw new RangeError("Out of range index");if(a<=n)return this;let x;if(n>>>=0,a=void 0===a?this.length:a>>>0,t||(t=0),"number"==typeof t)for(x=n;x<a;++x)this[x]=t;else{const O=c.isBuffer(t)?t:c.from(t,g),be=O.length;if(0===be)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(x=0;x<a-n;++x)this[x+n]=O[x%be]}return this};const Fe={};function Ce(o,t,n){Fe[o]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${o}]`,delete this.name}get code(){return o}set code(g){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:g,writable:!0})}toString(){return`${this.name} [${o}]: ${this.message}`}}}function De(o){let t="",n=o.length;const a="-"===o[0]?1:0;for(;n>=a+4;n-=3)t=`_${o.slice(n-3,n)}${t}`;return`${o.slice(0,n)}${t}`}function ge(o,t,n,a,g,x){if(o>n||o<t){const O="bigint"==typeof t?"n":"";let be;throw be=x>3?0===t||t===BigInt(0)?`>= 0${O} and < 2${O} ** ${8*(x+1)}${O}`:`>= -(2${O} ** ${8*(x+1)-1}${O}) and < 2 ** ${8*(x+1)-1}${O}`:`>= ${t}${O} and <= ${n}${O}`,new Fe.ERR_OUT_OF_RANGE("value",be,o)}!function $e(o,t,n){Te(t,"offset"),(void 0===o[t]||void 0===o[t+n])&&m(t,o.length-(n+1))}(a,g,x)}function Te(o,t){if("number"!=typeof o)throw new Fe.ERR_INVALID_ARG_TYPE(t,"number",o)}function m(o,t,n){throw Math.floor(o)!==o?(Te(o,n),new Fe.ERR_OUT_OF_RANGE(n||"offset","an integer",o)):t<0?new Fe.ERR_BUFFER_OUT_OF_BOUNDS:new Fe.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,o)}Ce("ERR_BUFFER_OUT_OF_BOUNDS",function(o){return o?`${o} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ce("ERR_INVALID_ARG_TYPE",function(o,t){return`The "${o}" argument must be of type number. Received type ${typeof t}`},TypeError),Ce("ERR_OUT_OF_RANGE",function(o,t,n){let a=`The value of "${o}" is out of range.`,g=n;return Number.isInteger(n)&&Math.abs(n)>2**32?g=De(String(n)):"bigint"==typeof n&&(g=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(g=De(g)),g+="n"),a+=` It must be ${t}. Received ${g}`,a},RangeError);const I=/[^+/0-9A-Za-z-_]/g;function ie(o,t){let n;t=t||1/0;const a=o.length;let g=null;const x=[];for(let O=0;O<a;++O){if(n=o.charCodeAt(O),n>55295&&n<57344){if(!g){if(n>56319){(t-=3)>-1&&x.push(239,191,189);continue}if(O+1===a){(t-=3)>-1&&x.push(239,191,189);continue}g=n;continue}if(n<56320){(t-=3)>-1&&x.push(239,191,189),g=n;continue}n=65536+(g-55296<<10|n-56320)}else g&&(t-=3)>-1&&x.push(239,191,189);if(g=null,n<128){if((t-=1)<0)break;x.push(n)}else if(n<2048){if((t-=2)<0)break;x.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;x.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;x.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return x}function f(o){return _.toByteArray(function M(o){if((o=(o=o.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;o.length%4!=0;)o+="=";return o}(o))}function A(o,t,n,a){let g;for(g=0;g<a&&!(g+n>=t.length||g>=o.length);++g)t[g+n]=o[g];return g}function P(o,t){return o instanceof t||null!=o&&null!=o.constructor&&null!=o.constructor.name&&o.constructor.name===t.name}function Z(o){return o!=o}const ae=function(){const o="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const a=16*n;for(let g=0;g<16;++g)t[a+g]=o[n]+o[g]}return t}();function J(o){return typeof BigInt>"u"?Se:o}function Se(){throw new Error("BigInt not supported")}},44356(re){"use strict";var _,ne="object"==typeof Reflect?Reflect:null,u=ne&&"function"==typeof ne.apply?ne.apply:function(p,E,v){return Function.prototype.apply.call(p,E,v)};_=ne&&"function"==typeof ne.ownKeys?ne.ownKeys:Object.getOwnPropertySymbols?function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:function(p){return Object.getOwnPropertyNames(p)};var F=Number.isNaN||function(p){return p!=p};function j(){j.init.call(this)}re.exports=j,re.exports.once=function q(d,p){return new Promise(function(E,v){function K(ee){d.removeListener(p,de),v(ee)}function de(){"function"==typeof d.removeListener&&d.removeListener("error",K),E([].slice.call(arguments))}h(d,p,de,{once:!0}),"error"!==p&&function S(d,p,E){"function"==typeof d.on&&h(d,"error",p,E)}(d,K,{once:!0})})},j.EventEmitter=j,j.prototype._events=void 0,j.prototype._eventsCount=0,j.prototype._maxListeners=void 0;var D=10;function R(d){if("function"!=typeof d)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof d)}function c(d){return void 0===d._maxListeners?j.defaultMaxListeners:d._maxListeners}function L(d,p,E,v){var K,de,ee;if(R(E),void 0===(de=d._events)?(de=d._events=Object.create(null),d._eventsCount=0):(void 0!==de.newListener&&(d.emit("newListener",p,E.listener?E.listener:E),de=d._events),ee=de[p]),void 0===ee)ee=de[p]=E,++d._eventsCount;else if("function"==typeof ee?ee=de[p]=v?[E,ee]:[ee,E]:v?ee.unshift(E):ee.push(E),(K=c(d))>0&&ee.length>K&&!ee.warned){ee.warned=!0;var me=new Error("Possible EventEmitter memory leak detected. "+ee.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");me.name="MaxListenersExceededWarning",me.emitter=d,me.type=p,me.count=ee.length,function C(d){console&&console.warn&&console.warn(d)}(me)}return d}function X(){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 k(d,p,E){var v={fired:!1,wrapFn:void 0,target:d,type:p,listener:E},K=X.bind(v);return K.listener=E,v.wrapFn=K,K}function N(d,p,E){var v=d._events;if(void 0===v)return[];var K=v[p];return void 0===K?[]:"function"==typeof K?E?[K.listener||K]:[K]:E?function V(d){for(var p=new Array(d.length),E=0;E<p.length;++E)p[E]=d[E].listener||d[E];return p}(K):B(K,K.length)}function z(d){var p=this._events;if(void 0!==p){var E=p[d];if("function"==typeof E)return 1;if(void 0!==E)return E.length}return 0}function B(d,p){for(var E=new Array(p),v=0;v<p;++v)E[v]=d[v];return E}function h(d,p,E,v){if("function"==typeof d.on)v.once?d.once(p,E):d.on(p,E);else{if("function"!=typeof d.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof d);d.addEventListener(p,function K(de){v.once&&d.removeEventListener(p,K),E(de)})}}Object.defineProperty(j,"defaultMaxListeners",{enumerable:!0,get:function(){return D},set:function(d){if("number"!=typeof d||d<0||F(d))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+d+".");D=d}}),j.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},j.prototype.setMaxListeners=function(p){if("number"!=typeof p||p<0||F(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this},j.prototype.getMaxListeners=function(){return c(this)},j.prototype.emit=function(p){for(var E=[],v=1;v<arguments.length;v++)E.push(arguments[v]);var K="error"===p,de=this._events;if(void 0!==de)K=K&&void 0===de.error;else if(!K)return!1;if(K){var ee;if(E.length>0&&(ee=E[0]),ee instanceof Error)throw ee;var me=new Error("Unhandled error."+(ee?" ("+ee.message+")":""));throw me.context=ee,me}var U=de[p];if(void 0===U)return!1;if("function"==typeof U)u(U,this,E);else{var te=U.length,Y=B(U,te);for(v=0;v<te;++v)u(Y[v],this,E)}return!0},j.prototype.on=j.prototype.addListener=function(p,E){return L(this,p,E,!1)},j.prototype.prependListener=function(p,E){return L(this,p,E,!0)},j.prototype.once=function(p,E){return R(E),this.on(p,k(this,p,E)),this},j.prototype.prependOnceListener=function(p,E){return R(E),this.prependListener(p,k(this,p,E)),this},j.prototype.off=j.prototype.removeListener=function(p,E){var v,K,de,ee,me;if(R(E),void 0===(K=this._events))return this;if(void 0===(v=K[p]))return this;if(v===E||v.listener===E)0===--this._eventsCount?this._events=Object.create(null):(delete K[p],K.removeListener&&this.emit("removeListener",p,v.listener||E));else if("function"!=typeof v){for(de=-1,ee=v.length-1;ee>=0;ee--)if(v[ee]===E||v[ee].listener===E){me=v[ee].listener,de=ee;break}if(de<0)return this;0===de?v.shift():function $(d,p){for(;p+1<d.length;p++)d[p]=d[p+1];d.pop()}(v,de),1===v.length&&(K[p]=v[0]),void 0!==K.removeListener&&this.emit("removeListener",p,me||E)}return this},j.prototype.removeAllListeners=function(p){var E,v,K;if(void 0===(v=this._events))return this;if(void 0===v.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==v[p]&&(0===--this._eventsCount?this._events=Object.create(null):delete v[p]),this;if(0===arguments.length){var ee,de=Object.keys(v);for(K=0;K<de.length;++K)"removeListener"!==(ee=de[K])&&this.removeAllListeners(ee);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(E=v[p]))this.removeListener(p,E);else if(void 0!==E)for(K=E.length-1;K>=0;K--)this.removeListener(p,E[K]);return this},j.prototype.listeners=function(p){return N(this,p,!0)},j.prototype.rawListeners=function(p){return N(this,p,!1)},j.listenerCount=function(d,p){return"function"==typeof d.listenerCount?d.listenerCount(p):z.call(d,p)},j.prototype.listenerCount=z,j.prototype.eventNames=function(){return this._eventsCount>0?_(this._events):[]}},22020(re,ne){ne.read=function(u,_,C,F,j){var D,R,c=8*j-F-1,L=(1<<c)-1,X=L>>1,k=-7,N=C?j-1:0,z=C?-1:1,B=u[_+N];for(N+=z,D=B&(1<<-k)-1,B>>=-k,k+=c;k>0;D=256*D+u[_+N],N+=z,k-=8);for(R=D&(1<<-k)-1,D>>=-k,k+=F;k>0;R=256*R+u[_+N],N+=z,k-=8);if(0===D)D=1-X;else{if(D===L)return R?NaN:1/0*(B?-1:1);R+=Math.pow(2,F),D-=X}return(B?-1:1)*R*Math.pow(2,D-F)},ne.write=function(u,_,C,F,j,D){var R,c,L,X=8*D-j-1,k=(1<<X)-1,N=k>>1,z=23===j?Math.pow(2,-24)-Math.pow(2,-77):0,B=F?0:D-1,$=F?1:-1,V=_<0||0===_&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(c=isNaN(_)?1:0,R=k):(R=Math.floor(Math.log(_)/Math.LN2),_*(L=Math.pow(2,-R))<1&&(R--,L*=2),(_+=R+N>=1?z/L:z*Math.pow(2,1-N))*L>=2&&(R++,L/=2),R+N>=k?(c=0,R=k):R+N>=1?(c=(_*L-1)*Math.pow(2,j),R+=N):(c=_*Math.pow(2,N-1)*Math.pow(2,j),R=0));j>=8;u[C+B]=255&c,B+=$,c/=256,j-=8);for(R=R<<j|c,X+=j;X>0;u[C+B]=255&R,B+=$,R/=256,X-=8);u[C+B-$]|=128*V}},14129(re,ne,u){"use strict";const{SymbolDispose:_}=u(35280),{AbortError:C,codes:F}=u(90485),{isNodeStream:j,isWebStream:D,kControllerErrorFunction:R}=u(96545),c=u(47404),{ERR_INVALID_ARG_TYPE:L}=F;let X;re.exports.addAbortSignal=function(z,B){if((N=>{if("object"!=typeof N||!("aborted"in N))throw new L("signal","AbortSignal",N)})(z),!j(B)&&!D(B))throw new L("stream",["ReadableStream","WritableStream","Stream"],B);return re.exports.addAbortSignalNoValidate(z,B)},re.exports.addAbortSignalNoValidate=function(N,z){if("object"!=typeof N||!("aborted"in N))return z;const B=j(z)?()=>{z.destroy(new C(void 0,{cause:N.reason}))}:()=>{z[R](new C(void 0,{cause:N.reason}))};if(N.aborted)B();else{X=X||u(54326).addAbortListener;const $=X(N,B);c(z,$[_])}return z}},79187(re,ne,u){"use strict";const{StringPrototypeSlice:_,SymbolIterator:C,TypedArrayPrototypeSet:F,Uint8Array:j}=u(35280),{Buffer:D}=u(83838),{inspect:R}=u(54326);re.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(L){const X={data:L,next:null};this.length>0?this.tail.next=X:this.head=X,this.tail=X,++this.length}unshift(L){const X={data:L,next:this.head};0===this.length&&(this.tail=X),this.head=X,++this.length}shift(){if(0===this.length)return;const L=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,L}clear(){this.head=this.tail=null,this.length=0}join(L){if(0===this.length)return"";let X=this.head,k=""+X.data;for(;null!==(X=X.next);)k+=L+X.data;return k}concat(L){if(0===this.length)return D.alloc(0);const X=D.allocUnsafe(L>>>0);let k=this.head,N=0;for(;k;)F(X,k.data,N),N+=k.data.length,k=k.next;return X}consume(L,X){const k=this.head.data;if(L<k.length){const N=k.slice(0,L);return this.head.data=k.slice(L),N}return L===k.length?this.shift():X?this._getString(L):this._getBuffer(L)}first(){return this.head.data}*[C](){for(let L=this.head;L;L=L.next)yield L.data}_getString(L){let X="",k=this.head,N=0;do{const z=k.data;if(!(L>z.length)){L===z.length?(X+=z,++N,this.head=k.next?k.next:this.tail=null):(X+=_(z,0,L),this.head=k,k.data=_(z,L));break}X+=z,L-=z.length,++N}while(null!==(k=k.next));return this.length-=N,X}_getBuffer(L){const X=D.allocUnsafe(L),k=L;let N=this.head,z=0;do{const B=N.data;if(!(L>B.length)){L===B.length?(F(X,B,k-L),++z,this.head=N.next?N.next:this.tail=null):(F(X,new j(B.buffer,B.byteOffset,L),k-L),this.head=N,N.data=B.slice(L));break}F(X,B,k-L),L-=B.length,++z}while(null!==(N=N.next));return this.length-=z,X}[Symbol.for("nodejs.util.inspect.custom")](L,X){return R(this,{...X,depth:0,customInspect:!1})}}},80984(re,ne,u){"use strict";var _=u(29293).default;const{pipeline:C}=u(96208),F=u(44088),{destroyer:j}=u(53014),{isNodeStream:D,isReadable:R,isWritable:c,isWebStream:L,isTransformStream:X,isWritableStream:k,isReadableStream:N}=u(96545),{AbortError:z,codes:{ERR_INVALID_ARG_VALUE:B,ERR_MISSING_ARGS:$}}=u(90485),V=u(47404);re.exports=function(...S){if(0===S.length)throw new $("streams");if(1===S.length)return F.from(S[0]);const h=[...S];if("function"==typeof S[0]&&(S[0]=F.from(S[0])),"function"==typeof S[S.length-1]){const Y=S.length-1;S[Y]=F.from(S[Y])}for(let Y=0;Y<S.length;++Y)if(D(S[Y])||L(S[Y])){if(Y<S.length-1&&!(R(S[Y])||N(S[Y])||X(S[Y])))throw new B(`streams[${Y}]`,h[Y],"must be readable");if(Y>0&&!(c(S[Y])||k(S[Y])||X(S[Y])))throw new B(`streams[${Y}]`,h[Y],"must be writable")}let d,p,E,v,K;const ee=S[0],me=C(S,function de(Y){const le=v;v=null,le?le(Y):Y?K.destroy(Y):!te&&!U&&K.destroy()}),U=!!(c(ee)||k(ee)||X(ee)),te=!!(R(me)||N(me)||X(me));if(K=new F({writableObjectMode:!(null==ee||!ee.writableObjectMode),readableObjectMode:!(null==me||!me.readableObjectMode),writable:U,readable:te}),U){if(D(ee))K._write=function(le,xe,fe){ee.write(le,xe)?fe():d=fe},K._final=function(le){ee.end(),p=le},ee.on("drain",function(){if(d){const le=d;d=null,le()}});else if(L(ee)){const xe=(X(ee)?ee.writable:ee).getWriter();K._write=function(){var fe=_(function*(G,Ae,Q){try{yield xe.ready,xe.write(G).catch(()=>{}),Q()}catch(ce){Q(ce)}});return function(G,Ae,Q){return fe.apply(this,arguments)}}(),K._final=function(){var fe=_(function*(G){try{yield xe.ready,xe.close().catch(()=>{}),p=G}catch(Ae){G(Ae)}});return function(G){return fe.apply(this,arguments)}}()}const Y=X(me)?me.readable:me;V(Y,()=>{if(p){const le=p;p=null,le()}})}if(te)if(D(me))me.on("readable",function(){if(E){const Y=E;E=null,Y()}}),me.on("end",function(){K.push(null)}),K._read=function(){for(;;){const Y=me.read();if(null===Y)return void(E=K._read);if(!K.push(Y))return}};else if(L(me)){const le=(X(me)?me.readable:me).getReader();K._read=_(function*(){for(;;)try{const{value:xe,done:fe}=yield le.read();if(!K.push(xe))return;if(fe)return void K.push(null)}catch{return}})}return K._destroy=function(Y,le){!Y&&null!==v&&(Y=new z),E=null,d=null,p=null,null===v?le(Y):(v=le,D(me)&&j(me,Y))},K}},53014(re,ne,u){"use strict";const _=u(40573),{aggregateTwoErrors:C,codes:{ERR_MULTIPLE_CALLBACK:F},AbortError:j}=u(90485),{Symbol:D}=u(35280),{kIsDestroyed:R,isDestroyed:c,isFinished:L,isServerRequest:X}=u(96545),k=D("kDestroy"),N=D("kConstruct");function z(U,te,Y){U&&(te&&!te.errored&&(te.errored=U),Y&&!Y.errored&&(Y.errored=U))}function $(U,te,Y){let le=!1;function xe(fe){if(le)return;le=!0;const G=U._readableState,Ae=U._writableState;z(fe,Ae,G),Ae&&(Ae.closed=!0),G&&(G.closed=!0),"function"==typeof Y&&Y(fe),fe?_.nextTick(V,U,fe):_.nextTick(q,U)}try{U._destroy(te||null,xe)}catch(fe){xe(fe)}}function V(U,te){S(U,te),q(U)}function q(U){const te=U._readableState,Y=U._writableState;Y&&(Y.closeEmitted=!0),te&&(te.closeEmitted=!0),(null!=Y&&Y.emitClose||null!=te&&te.emitClose)&&U.emit("close")}function S(U,te){const Y=U._readableState,le=U._writableState;null!=le&&le.errorEmitted||null!=Y&&Y.errorEmitted||(le&&(le.errorEmitted=!0),Y&&(Y.errorEmitted=!0),U.emit("error",te))}function d(U,te,Y){const le=U._readableState,xe=U._writableState;if(null!=xe&&xe.destroyed||null!=le&&le.destroyed)return this;null!=le&&le.autoDestroy||null!=xe&&xe.autoDestroy?U.destroy(te):te&&(xe&&!xe.errored&&(xe.errored=te),le&&!le.errored&&(le.errored=te),Y?_.nextTick(S,U,te):S(U,te))}function E(U){let te=!1;function Y(le){if(te)return void d(U,le??new F);te=!0;const xe=U._readableState,fe=U._writableState,G=fe||xe;xe&&(xe.constructed=!0),fe&&(fe.constructed=!0),G.destroyed?U.emit(k,le):le?d(U,le,!0):_.nextTick(v,U)}try{U._construct(le=>{_.nextTick(Y,le)})}catch(le){_.nextTick(Y,le)}}function v(U){U.emit(N)}function K(U){return U?.setHeader&&"function"==typeof U.abort}function de(U){U.emit("close")}function ee(U,te){U.emit("error",te),_.nextTick(de,U)}re.exports={construct:function p(U,te){if("function"!=typeof U._construct)return;const Y=U._readableState,le=U._writableState;Y&&(Y.constructed=!1),le&&(le.constructed=!1),U.once(N,te),!(U.listenerCount(N)>1)&&_.nextTick(E,U)},destroyer:function me(U,te){!U||c(U)||(!te&&!L(U)&&(te=new j),X(U)?(U.socket=null,U.destroy(te)):K(U)?U.abort():K(U.req)?U.req.abort():"function"==typeof U.destroy?U.destroy(te):"function"==typeof U.close?U.close():te?_.nextTick(ee,U,te):_.nextTick(de,U),U.destroyed||(U[R]=!0))},destroy:function B(U,te){const Y=this._readableState,le=this._writableState,xe=le||Y;return null!=le&&le.destroyed||null!=Y&&Y.destroyed?("function"==typeof te&&te(),this):(z(U,le,Y),le&&(le.destroyed=!0),Y&&(Y.destroyed=!0),xe.constructed?$(this,U,te):this.once(k,function(fe){$(this,C(fe,U),te)}),this)},undestroy:function h(){const U=this._readableState,te=this._writableState;U&&(U.constructed=!0,U.closed=!1,U.closeEmitted=!1,U.destroyed=!1,U.errored=null,U.errorEmitted=!1,U.reading=!1,U.ended=!1===U.readable,U.endEmitted=!1===U.readable),te&&(te.constructed=!0,te.destroyed=!1,te.closed=!1,te.closeEmitted=!1,te.errored=null,te.errorEmitted=!1,te.finalCalled=!1,te.prefinished=!1,te.ended=!1===te.writable,te.ending=!1===te.writable,te.finished=!1===te.writable)},errorOrDestroy:d}},44088(re,ne,u){"use strict";const{ObjectDefineProperties:_,ObjectGetOwnPropertyDescriptor:C,ObjectKeys:F,ObjectSetPrototypeOf:j}=u(35280);re.exports=c;const D=u(33774),R=u(74850);j(c.prototype,D.prototype),j(c,D);{const N=F(R.prototype);for(let z=0;z<N.length;z++){const B=N[z];c.prototype[B]||(c.prototype[B]=R.prototype[B])}}function c(N){if(!(this instanceof c))return new c(N);D.call(this,N),R.call(this,N),N?(this.allowHalfOpen=!1!==N.allowHalfOpen,!1===N.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===N.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let L,k;function X(){return void 0===L&&(L={}),L}_(c.prototype,{writable:{__proto__:null,...C(R.prototype,"writable")},writableHighWaterMark:{__proto__:null,...C(R.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...C(R.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...C(R.prototype,"writableBuffer")},writableLength:{__proto__:null,...C(R.prototype,"writableLength")},writableFinished:{__proto__:null,...C(R.prototype,"writableFinished")},writableCorked:{__proto__:null,...C(R.prototype,"writableCorked")},writableEnded:{__proto__:null,...C(R.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...C(R.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(N){this._readableState&&this._writableState&&(this._readableState.destroyed=N,this._writableState.destroyed=N)}}}),c.fromWeb=function(N,z){return X().newStreamDuplexFromReadableWritablePair(N,z)},c.toWeb=function(N){return X().newReadableWritablePairFromDuplex(N)},c.from=function(N){return k||(k=u(98888)),k(N,"body")}},98888(re,ne,u){var _=u(29293).default,C=u(53344).default,F=u(42958).default;const j=u(40573),D=u(83838),{isReadable:R,isWritable:c,isIterable:L,isNodeStream:X,isReadableNodeStream:k,isWritableNodeStream:N,isDuplexNodeStream:z,isReadableStream:B,isWritableStream:$}=u(96545),V=u(47404),{AbortError:q,codes:{ERR_INVALID_ARG_TYPE:S,ERR_INVALID_RETURN_VALUE:h}}=u(90485),{destroyer:d}=u(53014),p=u(44088),E=u(33774),v=u(74850),{createDeferredPromise:K}=u(54326),de=u(29814),ee=globalThis.Blob||D.Blob,me=typeof ee<"u"?function(G){return G instanceof ee}:function(G){return!1},U=globalThis.AbortController||u(9465).AbortController,{FunctionPrototypeCall:te}=u(35280);class Y extends p{constructor(G){super(G),!1===G?.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===G?.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function xe(fe){const G=fe.readable&&"function"!=typeof fe.readable.read?E.wrap(fe.readable):fe.readable,Ae=fe.writable;let y,W,se,ye,Ee,Q=!!R(G),ce=!!c(Ae);function Be(he){const Fe=ye;ye=null,Fe?Fe(he):he&&Ee.destroy(he)}return Ee=new Y({readableObjectMode:!(null==G||!G.readableObjectMode),writableObjectMode:!(null==Ae||!Ae.writableObjectMode),readable:Q,writable:ce}),ce&&(V(Ae,he=>{ce=!1,he&&d(G,he),Be(he)}),Ee._write=function(he,Fe,Ce){Ae.write(he,Fe)?Ce():y=Ce},Ee._final=function(he){Ae.end(),W=he},Ae.on("drain",function(){if(y){const he=y;y=null,he()}}),Ae.on("finish",function(){if(W){const he=W;W=null,he()}})),Q&&(V(G,he=>{Q=!1,he&&d(G,he),Be(he)}),G.on("readable",function(){if(se){const he=se;se=null,he()}}),G.on("end",function(){Ee.push(null)}),Ee._read=function(){for(;;){const he=G.read();if(null===he)return void(se=Ee._read);if(!Ee.push(he))return}}),Ee._destroy=function(he,Fe){!he&&null!==ye&&(he=new q),se=null,y=null,W=null,null===ye?Fe(he):(ye=Fe,d(Ae,he),d(G,he))},Ee}re.exports=function fe(G,Ae){if(z(G))return G;if(k(G))return xe({readable:G});if(N(G))return xe({writable:G});if(X(G))return xe({writable:!1,readable:!1});if(B(G))return xe({readable:E.fromWeb(G)});if($(G))return xe({writable:v.fromWeb(G)});if("function"==typeof G){const{value:ce,write:y,final:W,destroy:se}=function le(fe){let{promise:G,resolve:Ae}=K();const Q=new U,ce=Q.signal;return{value:fe(F(function*(){for(;;){const W=G;G=null;const{chunk:se,done:ye,cb:Ee}=yield C(W);if(j.nextTick(Ee),ye)return;if(ce.aborted)throw new q(void 0,{cause:ce.reason});({promise:G,resolve:Ae}=K()),yield se}})(),{signal:ce}),write(W,se,ye){const Ee=Ae;Ae=null,Ee({chunk:W,done:!1,cb:ye})},final(W){const se=Ae;Ae=null,se({done:!0,cb:W})},destroy(W,se){Q.abort(),se(W)}}}(G);if(L(ce))return de(Y,ce,{objectMode:!0,write:y,final:W,destroy:se});const ye=ce?.then;if("function"==typeof ye){let Ee;const Be=te(ye,ce,he=>{if(null!=he)throw new h("nully","body",he)},he=>{d(Ee,he)});return Ee=new Y({objectMode:!0,readable:!1,write:y,final(he){W(_(function*(){try{yield Be,j.nextTick(he,null)}catch(Fe){j.nextTick(he,Fe)}}))},destroy:se})}throw new h("Iterable, AsyncIterable or AsyncFunction",Ae,ce)}if(me(G))return fe(G.arrayBuffer());if(L(G))return de(Y,G,{objectMode:!0,writable:!1});if(B(G?.readable)&&$(G?.writable))return Y.fromWeb(G);if("object"==typeof G?.writable||"object"==typeof G?.readable)return xe({readable:null!=G&&G.readable?k(G?.readable)?G?.readable:fe(G.readable):void 0,writable:null!=G&&G.writable?N(G?.writable)?G?.writable:fe(G.writable):void 0});const Q=G?.then;if("function"==typeof Q){let ce;return te(Q,G,y=>{null!=y&&ce.push(y),ce.push(null)},y=>{d(ce,y)}),ce=new Y({objectMode:!0,writable:!1,read(){}})}throw new S(Ae,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],G)}},47404(re,ne,u){"use strict";const _=u(40573),{AbortError:C,codes:F}=u(90485),{ERR_INVALID_ARG_TYPE:j,ERR_STREAM_PREMATURE_CLOSE:D}=F,{kEmptyObject:R,once:c}=u(54326),{validateAbortSignal:L,validateFunction:X,validateObject:k,validateBoolean:N}=u(66563),{Promise:z,PromisePrototypeThen:B,SymbolDispose:$}=u(35280),{isClosed:V,isReadable:q,isReadableNodeStream:S,isReadableStream:h,isReadableFinished:d,isReadableErrored:p,isWritable:E,isWritableNodeStream:v,isWritableStream:K,isWritableFinished:de,isWritableErrored:ee,isNodeStream:me,willEmitClose:U,kIsClosedPromise:te}=u(96545);let Y;const xe=()=>{};function fe(Q,ce,y){var W,se;if(2===arguments.length?(y=ce,ce=R):null==ce?ce=R:k(ce,"options"),X(y,"callback"),L(ce.signal,"options.signal"),y=c(y),h(Q)||K(Q))return function G(Q,ce,y){let W=!1,se=xe;if(ce.signal)if(se=()=>{W=!0,y.call(Q,new C(void 0,{cause:ce.signal.reason}))},ce.signal.aborted)_.nextTick(se);else{Y=Y||u(54326).addAbortListener;const Ee=Y(ce.signal,se),Be=y;y=c((...he)=>{Ee[$](),Be.apply(Q,he)})}const ye=(...Ee)=>{W||_.nextTick(()=>y.apply(Q,Ee))};return B(Q[te].promise,ye,ye),xe}(Q,ce,y);if(!me(Q))throw new j("stream",["ReadableStream","WritableStream","Stream"],Q);const ye=null!==(W=ce.readable)&&void 0!==W?W:S(Q),Ee=null!==(se=ce.writable)&&void 0!==se?se:v(Q),Be=Q._writableState,he=Q._readableState,Fe=()=>{Q.writable||$e()};let Ce=U(Q)&&S(Q)===ye&&v(Q)===Ee,De=de(Q,!1);const $e=()=>{De=!0,Q.destroyed&&(Ce=!1),(!Ce||Q.readable&&!ye)&&(!ye||ge)&&y.call(Q)};let ge=d(Q,!1);const Te=()=>{ge=!0,Q.destroyed&&(Ce=!1),(!Ce||Q.writable&&!Ee)&&(!Ee||De)&&y.call(Q)},m=f=>{y.call(Q,f)};let I=V(Q);const M=()=>{I=!0;const f=ee(Q)||p(Q);return f&&"boolean"!=typeof f?y.call(Q,f):ye&&!ge&&S(Q,!0)&&!d(Q,!1)?y.call(Q,new D):!Ee||De||de(Q,!1)?void y.call(Q):y.call(Q,new D)},ie=()=>{I=!0;const f=ee(Q)||p(Q);if(f&&"boolean"!=typeof f)return y.call(Q,f);y.call(Q)},oe=()=>{Q.req.on("finish",$e)};!function le(Q){return Q.setHeader&&"function"==typeof Q.abort}(Q)?Ee&&!Be&&(Q.on("end",Fe),Q.on("close",Fe)):(Q.on("complete",$e),Ce||Q.on("abort",M),Q.req?oe():Q.on("request",oe)),!Ce&&"boolean"==typeof Q.aborted&&Q.on("aborted",M),Q.on("end",Te),Q.on("finish",$e),!1!==ce.error&&Q.on("error",m),Q.on("close",M),I?_.nextTick(M):null!=Be&&Be.errorEmitted||null!=he&&he.errorEmitted?Ce||_.nextTick(ie):(!ye&&(!Ce||q(Q))&&(De||!1===E(Q))||!Ee&&(!Ce||E(Q))&&(ge||!1===q(Q))||he&&Q.req&&Q.aborted)&&_.nextTick(ie);const Ie=()=>{y=xe,Q.removeListener("aborted",M),Q.removeListener("complete",$e),Q.removeListener("abort",M),Q.removeListener("request",oe),Q.req&&Q.req.removeListener("finish",$e),Q.removeListener("end",Fe),Q.removeListener("close",Fe),Q.removeListener("finish",$e),Q.removeListener("end",Te),Q.removeListener("error",m),Q.removeListener("close",M)};if(ce.signal&&!I){const f=()=>{const A=y;Ie(),A.call(Q,new C(void 0,{cause:ce.signal.reason}))};if(ce.signal.aborted)_.nextTick(f);else{Y=Y||u(54326).addAbortListener;const A=Y(ce.signal,f),P=y;y=c((...Z)=>{A[$](),P.apply(Q,Z)})}}return Ie}re.exports=fe,re.exports.finished=function Ae(Q,ce){var y;let W=!1;return null===ce&&(ce=R),null!==(y=ce)&&void 0!==y&&y.cleanup&&(N(ce.cleanup,"cleanup"),W=ce.cleanup),new z((se,ye)=>{const Ee=fe(Q,ce,Be=>{W&&Ee(),Be?ye(Be):se()})})}},29814(re,ne,u){"use strict";var _=u(29293).default;const C=u(40573),{PromisePrototypeThen:F,SymbolAsyncIterator:j,SymbolIterator:D}=u(35280),{Buffer:R}=u(83838),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:L}=u(90485).codes;re.exports=function X(k,N,z){let B,$;if("string"==typeof N||N instanceof R)return new k({objectMode:!0,...z,read(){this.push(N),this.push(null)}});if(N&&N[j])$=!0,B=N[j]();else{if(!N||!N[D])throw new c("iterable",["Iterable"],N);$=!1,B=N[D]()}const V=new k({objectMode:!0,highWaterMark:1,...z});let q=!1;function h(){return(h=_(function*(E){if(null!=E&&"function"==typeof B.throw){const{value:de,done:ee}=yield B.throw(E);if(yield de,ee)return}if("function"==typeof B.return){const{value:de}=yield B.return();yield de}})).apply(this,arguments)}function p(){return(p=_(function*(){for(;;){try{const{value:E,done:v}=$?yield B.next():B.next();if(v)V.push(null);else{const K=E&&"function"==typeof E.then?yield E:E;if(null===K)throw q=!1,new L;if(V.push(K))continue;q=!1}}catch(E){V.destroy(E)}break}})).apply(this,arguments)}return V._read=function(){q||(q=!0,function d(){p.apply(this,arguments)}())},V._destroy=function(E,v){F(function S(E){return h.apply(this,arguments)}(E),()=>C.nextTick(v,E),K=>C.nextTick(v,K||E))},V}},82521(re,ne,u){"use strict";const{ArrayIsArray:_,ObjectSetPrototypeOf:C}=u(35280),{EventEmitter:F}=u(44356);function j(R){F.call(this,R)}function D(R,c,L){if("function"==typeof R.prependListener)return R.prependListener(c,L);R._events&&R._events[c]?_(R._events[c])?R._events[c].unshift(L):R._events[c]=[L,R._events[c]]:R.on(c,L)}C(j.prototype,F.prototype),C(j,F),j.prototype.pipe=function(R,c){const L=this;function X(q){R.writable&&!1===R.write(q)&&L.pause&&L.pause()}function k(){L.readable&&L.resume&&L.resume()}L.on("data",X),R.on("drain",k),!R._isStdio&&(!c||!1!==c.end)&&(L.on("end",z),L.on("close",B));let N=!1;function z(){N||(N=!0,R.end())}function B(){N||(N=!0,"function"==typeof R.destroy&&R.destroy())}function $(q){V(),0===F.listenerCount(this,"error")&&this.emit("error",q)}function V(){L.removeListener("data",X),R.removeListener("drain",k),L.removeListener("end",z),L.removeListener("close",B),L.removeListener("error",$),R.removeListener("error",$),L.removeListener("end",V),L.removeListener("close",V),R.removeListener("close",V)}return D(L,"error",$),D(R,"error",$),L.on("end",V),L.on("close",V),R.on("close",V),R.emit("pipe",L),R},re.exports={Stream:j,prependListener:D}},59597(re,ne,u){"use strict";var _=u(29293).default,C=u(93513).default,F=u(82881).default,j=u(53344).default,D=u(42958).default;const R=globalThis.AbortController||u(9465).AbortController,{codes:{ERR_INVALID_ARG_VALUE:c,ERR_INVALID_ARG_TYPE:L,ERR_MISSING_ARGS:X,ERR_OUT_OF_RANGE:k},AbortError:N}=u(90485),{validateAbortSignal:z,validateInteger:B,validateObject:$}=u(66563),V=u(35280).Symbol("kWeak"),q=u(35280).Symbol("kResistStopPropagation"),{finished:S}=u(47404),h=u(80984),{addAbortSignalNoValidate:d}=u(14129),{isWritable:p,isNodeStream:E}=u(96545),{deprecate:v}=u(54326),{ArrayPrototypePush:K,Boolean:de,MathFloor:ee,Number:me,NumberIsNaN:U,Promise:te,PromiseReject:Y,PromiseResolve:le,PromisePrototypeThen:xe,Symbol:fe}=u(35280),G=fe("kEmpty"),Ae=fe("kEof");function ce(f,A){if("function"!=typeof f)throw new L("fn",["Function","AsyncFunction"],f);null!=A&&$(A,"options"),null!=A?.signal&&z(A.signal,"options.signal");let P=1;null!=A?.concurrency&&(P=ee(A.concurrency));let Z=P-1;return null!=A?.highWaterMark&&(Z=ee(A.highWaterMark)),B(P,"options.concurrency",1),B(Z,"options.highWaterMark",0),Z+=P,(ae=D(function*(){const Se=u(54326).AbortSignalAny([A?.signal].filter(de)),o=this,t=[],n={signal:Se};let a,g,x=!1,O=0;function be(){x=!0,je()}function je(){O-=1,Pe()}function Pe(){g&&!x&&O<P&&t.length<Z&&(g(),g=null)}function ve(){return(ve=_(function*(){try{var Ue,We=!1,ke=!1;try{for(var Ke,ze=F(o);We=!(Ke=yield ze.next()).done;We=!1){let Ge=Ke.value;if(x)return;if(Se.aborted)throw new N;try{if(Ge=f(Ge,n),Ge===G)continue;Ge=le(Ge)}catch(Ve){Ge=Y(Ve)}O+=1,xe(Ge,je,be),t.push(Ge),a&&(a(),a=null),!x&&(t.length>=Z||O>=P)&&(yield new te(Ve=>{g=Ve}))}}catch(Ge){ke=!0,Ue=Ge}finally{try{We&&null!=ze.return&&(yield ze.return())}finally{if(ke)throw Ue}}t.push(Ae)}catch(Ge){const Ve=Y(Ge);xe(Ve,je,be),t.push(Ve)}finally{x=!0,a&&(a(),a=null)}})).apply(this,arguments)}!function Ne(){ve.apply(this,arguments)}();try{for(;;){for(;t.length>0;){const We=yield j(t[0]);if(We===Ae)return;if(Se.aborted)throw new N;We!==G&&(yield We),t.shift(),Pe()}yield j(new te(We=>{a=We}))}}finally{x=!0,g&&(g(),g=null)}}),function J(){return ae.apply(this,arguments)}).call(this);var ae}function W(f){return se.apply(this,arguments)}function se(){return(se=_(function*(f,A=void 0){var ae,P=!1,Z=!1;try{for(var J=F(De.call(this,f,A));P=!(yield J.next()).done;P=!1)return!0}catch(o){Z=!0,ae=o}finally{try{P&&null!=J.return&&(yield J.return())}finally{if(Z)throw ae}}return!1})).apply(this,arguments)}function Ee(){return(Ee=_(function*(f,A=void 0){if("function"!=typeof f)throw new L("fn",["Function","AsyncFunction"],f);return!(yield W.call(this,_(function*(...P){return!(yield f(...P))}),A))})).apply(this,arguments)}function he(){return(he=_(function*(f,A){var ae,P=!1,Z=!1;try{for(var Se,J=F(De.call(this,f,A));P=!(Se=yield J.next()).done;P=!1)return Se.value}catch(o){Z=!0,ae=o}finally{try{P&&null!=J.return&&(yield J.return())}finally{if(Z)throw ae}}})).apply(this,arguments)}function Ce(){return Ce=_(function*(f,A){if("function"!=typeof f)throw new L("fn",["Function","AsyncFunction"],f);function Z(){return(Z=_(function*(n,a){return yield f(n,a),G})).apply(this,arguments)}var Se,ae=!1,J=!1;try{for(var o=F(ce.call(this,function P(n,a){return Z.apply(this,arguments)},A));ae=!(yield o.next()).done;ae=!1);}catch(n){J=!0,Se=n}finally{try{ae&&null!=o.return&&(yield o.return())}finally{if(J)throw Se}}}),Ce.apply(this,arguments)}function De(f,A){if("function"!=typeof f)throw new L("fn",["Function","AsyncFunction"],f);function Z(){return(Z=_(function*(ae,J){return(yield f(ae,J))?ae:G})).apply(this,arguments)}return ce.call(this,function P(ae,J){return Z.apply(this,arguments)},A)}class $e extends X{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function Te(){return Te=_(function*(f,A,P){var Z;if("function"!=typeof f)throw new L("reducer",["Function","AsyncFunction"],f);null!=P&&$(P,"options"),null!=P?.signal&&z(P.signal,"options.signal");let ae=arguments.length>1;if(null!=P&&null!==(Z=P.signal)&&void 0!==Z&&Z.aborted){const be=new N(void 0,{cause:P.signal.reason});throw this.once("error",()=>{}),yield S(this.destroy(be)),be}const J=new R,Se=J.signal;null!=P&&P.signal&&P.signal.addEventListener("abort",()=>J.abort(),{once:!0,[V]:this,[q]:!0});let o=!1;try{var a,t=!1,n=!1;try{for(var x,g=F(this);t=!(x=yield g.next()).done;t=!1){const be=x.value;var O;if(o=!0,null!=P&&null!==(O=P.signal)&&void 0!==O&&O.aborted)throw new N;ae?A=yield f(A,be,{signal:Se}):(A=be,ae=!0)}}catch(be){n=!0,a=be}finally{try{t&&null!=g.return&&(yield g.return())}finally{if(n)throw a}}if(!o&&!ae)throw new $e}finally{J.abort()}return A}),Te.apply(this,arguments)}function I(){return(I=_(function*(f){null!=f&&$(f,"options"),null!=f?.signal&&z(f.signal,"options.signal");const A=[];var ae,P=!1,Z=!1;try{for(var Se,J=F(this);P=!(Se=yield J.next()).done;P=!1){const t=Se.value;var o;if(null!=f&&null!==(o=f.signal)&&void 0!==o&&o.aborted)throw new N(void 0,{cause:f.signal.reason});K(A,t)}}catch(t){Z=!0,ae=t}finally{try{P&&null!=J.return&&(yield J.return())}finally{if(Z)throw ae}}return A})).apply(this,arguments)}function ie(f){if(f=me(f),U(f))return 0;if(f<0)throw new k("number",">= 0",f);return f}re.exports.streamReturningOperators={asIndexedPairs:v(function y(f=void 0){return null!=f&&$(f,"options"),null!=f?.signal&&z(f.signal,"options.signal"),(A=D(function*(){let Z=0;var Se,ae=!1,J=!1;try{for(var t,o=F(this);ae=!(t=yield j(o.next())).done;ae=!1){const a=t.value;var n;if(null!=f&&null!==(n=f.signal)&&void 0!==n&&n.aborted)throw new N({cause:f.signal.reason});yield[Z++,a]}}catch(a){J=!0,Se=a}finally{try{ae&&null!=o.return&&(yield j(o.return()))}finally{if(J)throw Se}}}),function P(){return A.apply(this,arguments)}).call(this);var A},"readable.asIndexedPairs will be removed in a future version."),drop:function oe(f,A=void 0){return null!=A&&$(A,"options"),null!=A?.signal&&z(A.signal,"options.signal"),f=ie(f),(P=D(function*(){var ae;if(null!=A&&null!==(ae=A.signal)&&void 0!==ae&&ae.aborted)throw new N;var o,J=!1,Se=!1;try{for(var n,t=F(this);J=!(n=yield j(t.next())).done;J=!1){const g=n.value;var a;if(null!=A&&null!==(a=A.signal)&&void 0!==a&&a.aborted)throw new N;f--<=0&&(yield g)}}catch(g){Se=!0,o=g}finally{try{J&&null!=t.return&&(yield j(t.return()))}finally{if(Se)throw o}}}),function Z(){return P.apply(this,arguments)}).call(this);var P},filter:De,flatMap:function M(f,A){const P=ce.call(this,f,A);return(Z=D(function*(){var o,J=!1,Se=!1;try{for(var n,t=F(P);J=!(n=yield j(t.next())).done;J=!1){const a=n.value;yield*C(F(a),j)}}catch(a){Se=!0,o=a}finally{try{J&&null!=t.return&&(yield j(t.return()))}finally{if(Se)throw o}}}),function ae(){return Z.apply(this,arguments)}).call(this);var Z},map:ce,take:function Ie(f,A=void 0){return null!=A&&$(A,"options"),null!=A?.signal&&z(A.signal,"options.signal"),f=ie(f),(P=D(function*(){var ae;if(null!=A&&null!==(ae=A.signal)&&void 0!==ae&&ae.aborted)throw new N;var o,J=!1,Se=!1;try{for(var n,t=F(this);J=!(n=yield j(t.next())).done;J=!1){const g=n.value;var a;if(null!=A&&null!==(a=A.signal)&&void 0!==a&&a.aborted)throw new N;if(f-- >0&&(yield g),f<=0)return}}catch(g){Se=!0,o=g}finally{try{J&&null!=t.return&&(yield j(t.return()))}finally{if(Se)throw o}}}),function Z(){return P.apply(this,arguments)}).call(this);var P},compose:function Q(f,A){if(null!=A&&$(A,"options"),null!=A?.signal&&z(A.signal,"options.signal"),E(f)&&!p(f))throw new c("stream",f,"must be writable");const P=h(this,f);return null!=A&&A.signal&&d(A.signal,P),P}},re.exports.promiseReturningOperators={every:function ye(f){return Ee.apply(this,arguments)},forEach:function Fe(f,A){return Ce.apply(this,arguments)},reduce:function ge(f,A,P){return Te.apply(this,arguments)},toArray:function m(f){return I.apply(this,arguments)},some:W,find:function Be(f,A){return he.apply(this,arguments)}}},27322(re,ne,u){"use strict";const{ObjectSetPrototypeOf:_}=u(35280);re.exports=F;const C=u(95112);function F(j){if(!(this instanceof F))return new F(j);C.call(this,j)}_(F.prototype,C.prototype),_(F,C),F.prototype._transform=function(j,D,R){R(null,j)}},96208(re,ne,u){var _=u(29293).default,C=u(42958).default,F=u(53344).default,j=u(93513).default,D=u(82881).default;const R=u(40573),{ArrayIsArray:c,Promise:L,SymbolAsyncIterator:X,SymbolDispose:k}=u(35280),N=u(47404),{once:z}=u(54326),B=u(53014),$=u(44088),{aggregateTwoErrors:V,codes:{ERR_INVALID_ARG_TYPE:q,ERR_INVALID_RETURN_VALUE:S,ERR_MISSING_ARGS:h,ERR_STREAM_DESTROYED:d,ERR_STREAM_PREMATURE_CLOSE:p},AbortError:E}=u(90485),{validateFunction:v,validateAbortSignal:K}=u(66563),{isIterable:de,isReadable:ee,isReadableNodeStream:me,isNodeStream:U,isTransformStream:te,isWebStream:Y,isReadableStream:le,isReadableFinished:xe}=u(96545),fe=globalThis.AbortController||u(9465).AbortController;let G,Ae,Q;function ce(ge,Te,m){let I=!1;return ge.on("close",()=>{I=!0}),{destroy:ie=>{I||(I=!0,B.destroyer(ge,ie||new d("pipe")))},cleanup:N(ge,{readable:Te,writable:m},ie=>{I=!ie})}}function W(ge){if(de(ge))return ge;if(me(ge))return function se(ge){return ye.apply(this,arguments)}(ge);throw new q("val",["Readable","Iterable","AsyncIterable"],ge)}function ye(){return(ye=C(function*(ge){Ae||(Ae=u(33774)),yield*j(D(Ae.prototype[X].call(ge)),F)})).apply(this,arguments)}function Ee(ge,Te,m,I){return Be.apply(this,arguments)}function Be(){return(Be=_(function*(ge,Te,m,{end:I}){let M,ie=null;const oe=Se=>{if(Se&&(M=Se),ie){const o=ie;ie=null,o()}},Ie=()=>new L((Se,o)=>{M?o(M):ie=()=>{M?o(M):Se()}});Te.on("drain",oe);const f=N(Te,{readable:!1},oe);try{Te.writableNeedDrain&&(yield Ie());var Z,A=!1,P=!1;try{for(var J,ae=D(ge);A=!(J=yield ae.next()).done;A=!1)Te.write(J.value)||(yield Ie())}catch(Se){P=!0,Z=Se}finally{try{A&&null!=ae.return&&(yield ae.return())}finally{if(P)throw Z}}I&&(Te.end(),yield Ie()),m()}catch(Se){m(M!==Se?V(M,Se):Se)}finally{f(),Te.off("drain",oe)}})).apply(this,arguments)}function he(ge,Te,m,I){return Fe.apply(this,arguments)}function Fe(){return(Fe=_(function*(ge,Te,m,{end:I}){te(Te)&&(Te=Te.writable);const M=Te.getWriter();try{var Ie,ie=!1,oe=!1;try{for(var A,f=D(ge);ie=!(A=yield f.next()).done;ie=!1){const P=A.value;yield M.ready,M.write(P).catch(()=>{})}}catch(P){oe=!0,Ie=P}finally{try{ie&&null!=f.return&&(yield f.return())}finally{if(oe)throw Ie}}yield M.ready,I&&(yield M.close()),m()}catch(P){try{yield M.abort(P),m(P)}catch(Z){m(Z)}}})).apply(this,arguments)}function De(ge,Te,m){if(1===ge.length&&c(ge[0])&&(ge=ge[0]),ge.length<2)throw new h("streams");const I=new fe,M=I.signal,ie=m?.signal,oe=[];function Ie(){Se(new E)}let f,A,P;K(ie,"options.signal"),Q=Q||u(54326).addAbortListener,ie&&(f=Q(ie,Ie));const Z=[];let o,ae=0;function J(g){Se(g,0===--ae)}function Se(g,x){var O;if(g&&(!A||"ERR_STREAM_PREMATURE_CLOSE"===A.code)&&(A=g),A||x){for(;Z.length;)Z.shift()(A);null===(O=f)||void 0===O||O[k](),I.abort(),x&&(A||oe.forEach(be=>be()),R.nextTick(Te,A,P))}}for(let g=0;g<ge.length;g++){const x=ge[g],O=g<ge.length-1,be=g>0,je=O||!1!==m?.end,Pe=g===ge.length-1;if(U(x)){let Ne=function(ve){ve&&"AbortError"!==ve.name&&"ERR_STREAM_PREMATURE_CLOSE"!==ve.code&&J(ve)};if(je){const{destroy:ve,cleanup:We}=ce(x,O,be);Z.push(ve),ee(x)&&Pe&&oe.push(We)}x.on("error",Ne),ee(x)&&Pe&&oe.push(()=>{x.removeListener("error",Ne)})}if(0===g)if("function"==typeof x){if(o=x({signal:M}),!de(o))throw new S("Iterable, AsyncIterable or Stream","source",o)}else o=de(x)||me(x)||te(x)?x:$.from(x);else if("function"==typeof x){var t;if(o=te(o)?W(null===(t=o)||void 0===t?void 0:t.readable):W(o),o=x(o,{signal:M}),O){if(!de(o,!0))throw new S("AsyncIterable",`transform[${g-1}]`,o)}else{var n;G||(G=u(27322));const Ne=new G({objectMode:!0}),ve=null===(n=o)||void 0===n?void 0:n.then;if("function"==typeof ve)ae++,ve.call(o,Ue=>{P=Ue,null!=Ue&&Ne.write(Ue),je&&Ne.end(),R.nextTick(J)},Ue=>{Ne.destroy(Ue),R.nextTick(J,Ue)});else if(de(o,!0))ae++,Ee(o,Ne,J,{end:je});else{if(!le(o)&&!te(o))throw new S("AsyncIterable or Promise","destination",o);ae++,Ee(o.readable||o,Ne,J,{end:je})}o=Ne;const{destroy:We,cleanup:ke}=ce(o,!1,!0);Z.push(We),Pe&&oe.push(ke)}}else if(U(x)){if(me(o)){ae+=2;const Ne=$e(o,x,J,{end:je});ee(x)&&Pe&&oe.push(Ne)}else if(te(o)||le(o))ae++,Ee(o.readable||o,x,J,{end:je});else{if(!de(o))throw new q("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],o);ae++,Ee(o,x,J,{end:je})}o=x}else if(Y(x)){if(me(o))ae++,he(W(o),x,J,{end:je});else if(le(o)||de(o))ae++,he(o,x,J,{end:je});else{if(!te(o))throw new q("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],o);ae++,he(o.readable,x,J,{end:je})}o=x}else o=$.from(x)}return(null!=M&&M.aborted||null!=ie&&ie.aborted)&&R.nextTick(Ie),o}function $e(ge,Te,m,{end:I}){let M=!1;if(Te.on("close",()=>{M||m(new p)}),ge.pipe(Te,{end:!1}),I){let oe=function(){M=!0,Te.end()};xe(ge)?R.nextTick(oe):ge.once("end",oe)}else m();return N(ge,{readable:!0,writable:!1},oe=>{const Ie=ge._readableState;oe&&"ERR_STREAM_PREMATURE_CLOSE"===oe.code&&Ie&&Ie.ended&&!Ie.errored&&!Ie.errorEmitted?ge.once("end",m).once("error",m):m(oe)}),N(Te,{readable:!1,writable:!0},m)}re.exports={pipelineImpl:De,pipeline:function Ce(...ge){return De(ge,z(function y(ge){return v(ge[ge.length-1],"streams[stream.length - 1]"),ge.pop()}(ge)))}}},33774(re,ne,u){"use strict";var _=u(53344).default,C=u(42958).default;const F=u(40573),{ArrayPrototypeIndexOf:j,NumberIsInteger:D,NumberIsNaN:R,NumberParseInt:c,ObjectDefineProperties:L,ObjectKeys:X,ObjectSetPrototypeOf:k,Promise:N,SafeSet:z,SymbolAsyncDispose:B,SymbolAsyncIterator:$,Symbol:V}=u(35280);re.exports=J,J.ReadableState=ae;const{EventEmitter:q}=u(44356),{Stream:S,prependListener:h}=u(82521),{Buffer:d}=u(83838),{addAbortSignal:p}=u(14129),E=u(47404);let v=u(54326).debuglog("stream",s=>{v=s});const K=u(79187),de=u(53014),{getHighWaterMark:ee,getDefaultHighWaterMark:me}=u(78153),{aggregateTwoErrors:U,codes:{ERR_INVALID_ARG_TYPE:te,ERR_METHOD_NOT_IMPLEMENTED:Y,ERR_OUT_OF_RANGE:le,ERR_STREAM_PUSH_AFTER_EOF:xe,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:fe},AbortError:G}=u(90485),{validateObject:Ae}=u(66563),Q=V("kPaused"),{StringDecoder:ce}=u(43387),y=u(29814);k(J.prototype,S.prototype),k(J,S);const W=()=>{},{errorOrDestroy:se}=de;function Z(s){return{enumerable:!1,get(){return 0!==(this.state&s)},set(e){e?this.state|=s:this.state&=~s}}}function ae(s,e,r){"boolean"!=typeof r&&(r=e instanceof u(44088)),this.state=6192,s&&s.objectMode&&(this.state|=1),r&&s&&s.readableObjectMode&&(this.state|=1),this.highWaterMark=s?ee(this,s,"readableHighWaterMark",r):me(!1),this.buffer=new K,this.length=0,this.pipes=[],this.flowing=null,this[Q]=null,s&&!1===s.emitClose&&(this.state&=-2049),s&&!1===s.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=s&&s.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,s&&s.encoding&&(this.decoder=new ce(s.encoding),this.encoding=s.encoding)}function J(s){if(!(this instanceof J))return new J(s);const e=this instanceof u(44088);this._readableState=new ae(s,this,e),s&&("function"==typeof s.read&&(this._read=s.read),"function"==typeof s.destroy&&(this._destroy=s.destroy),"function"==typeof s.construct&&(this._construct=s.construct),s.signal&&!e&&p(s.signal,this)),S.call(this,s),de.construct(this,()=>{this._readableState.needReadable&&be(this,this._readableState)})}function Se(s,e,r,i){v("readableAddChunk",e);const l=s._readableState;let b;if(!(1&l.state)&&("string"==typeof e?l.encoding!==(r=r||l.defaultEncoding)&&(i&&l.encoding?e=d.from(e,r).toString(l.encoding):(e=d.from(e,r),r="")):e instanceof d?r="":S._isUint8Array(e)?(e=S._uint8ArrayToBuffer(e),r=""):null!=e&&(b=new te("chunk",["string","Buffer","Uint8Array"],e))),b)se(s,b);else if(null===e)l.state&=-9,function g(s,e){if(v("onEofChunk"),!e.ended){if(e.decoder){const r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?x(s):(e.needReadable=!1,e.emittedReadable=!0,O(s))}}(s,l);else if(1&l.state||e&&e.length>0)if(i)if(4&l.state)se(s,new fe);else{if(l.destroyed||l.errored)return!1;o(s,l,e,!0)}else if(l.ended)se(s,new xe);else{if(l.destroyed||l.errored)return!1;l.state&=-9,l.decoder&&!r?(e=l.decoder.write(e),l.objectMode||0!==e.length?o(s,l,e,!1):be(s,l)):o(s,l,e,!1)}else i||(l.state&=-9,be(s,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function o(s,e,r,i){e.flowing&&0===e.length&&!e.sync&&s.listenerCount("data")>0?(65536&e.state?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,s.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),!!(64&e.state)&&x(s)),be(s,e)}function a(s,e){return s<=0||0===e.length&&e.ended?0:1&e.state?1:R(s)?e.flowing&&e.length?e.buffer.first().length:e.length:s<=e.length?s:e.ended?e.length:0}function x(s){const e=s._readableState;v("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(v("emitReadable",e.flowing),e.emittedReadable=!0,F.nextTick(O,s))}function O(s){const e=s._readableState;v("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(s.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Ue(s)}function be(s,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,F.nextTick(je,s,e))}function je(s,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){const r=e.length;if(v("maybeReadMore read 0"),s.read(0),r===e.length)break}e.readingMore=!1}function Ne(s){const e=s._readableState;e.readableListening=s.listenerCount("readable")>0,e.resumeScheduled&&!1===e[Q]?e.flowing=!0:s.listenerCount("data")>0?s.resume():e.readableListening||(e.flowing=null)}function ve(s){v("readable nexttick read 0"),s.read(0)}function ke(s,e){v("resume",e.reading),e.reading||s.read(0),e.resumeScheduled=!1,s.emit("resume"),Ue(s),e.flowing&&!e.reading&&s.read(0)}function Ue(s){const e=s._readableState;for(v("flow",e.flowing);e.flowing&&null!==s.read(););}function ze(s,e){"function"!=typeof s.read&&(s=J.wrap(s,{objectMode:!0}));const r=function Ke(s,e){return Ge.apply(this,arguments)}(s,e);return r.stream=s,r}function Ge(){return(Ge=C(function*(s,e){let l,r=W;function i(w){this===s?(r(),r=W):r=w}s.on("readable",i);const b=E(s,{writable:!1},w=>{l=w?U(l,w):null,r(),r=W});try{for(;;){const w=s.destroyed?null:s.read();if(null!==w)yield w;else{if(l)throw l;if(null===l)return;yield _(new N(i))}}}catch(w){throw l=U(l,w),l}finally{!l&&!1===e?.destroyOnReturn||void 0!==l&&!s._readableState.autoDestroy?(s.off("readable",i),b()):de.destroyer(s,null)}})).apply(this,arguments)}function Ve(s,e){if(0===e.length)return null;let r;return e.objectMode?r=e.buffer.shift():!s||s>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(s,e.decoder),r}function Je(s){const e=s._readableState;v("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,F.nextTick(Ze,e,s))}function Ze(s,e){if(v("endReadableNT",s.endEmitted,s.length),!s.errored&&!s.closeEmitted&&!s.endEmitted&&0===s.length)if(s.endEmitted=!0,e.emit("end"),e.writable&&!1===e.allowHalfOpen)F.nextTick(qe,e);else if(s.autoDestroy){const r=e._writableState;(!r||r.autoDestroy&&(r.finished||!1===r.writable))&&e.destroy()}}function qe(s){s.writable&&!s.writableEnded&&!s.destroyed&&s.end()}let Xe;function et(){return void 0===Xe&&(Xe={}),Xe}L(ae.prototype,{objectMode:Z(1),ended:Z(2),endEmitted:Z(4),reading:Z(8),constructed:Z(16),sync:Z(32),needReadable:Z(64),emittedReadable:Z(128),readableListening:Z(256),resumeScheduled:Z(512),errorEmitted:Z(1024),emitClose:Z(2048),autoDestroy:Z(4096),destroyed:Z(8192),closed:Z(16384),closeEmitted:Z(32768),multiAwaitDrain:Z(65536),readingMore:Z(1<<17),dataEmitted:Z(1<<18)}),J.prototype.destroy=de.destroy,J.prototype._undestroy=de.undestroy,J.prototype._destroy=function(s,e){e(s)},J.prototype[q.captureRejectionSymbol]=function(s){this.destroy(s)},J.prototype[B]=function(){let s;return this.destroyed||(s=this.readableEnded?null:new G,this.destroy(s)),new N((e,r)=>E(this,i=>i&&i!==s?r(i):e(null)))},J.prototype.push=function(s,e){return Se(this,s,e,!1)},J.prototype.unshift=function(s,e){return Se(this,s,e,!0)},J.prototype.isPaused=function(){const s=this._readableState;return!0===s[Q]||!1===s.flowing},J.prototype.setEncoding=function(s){const e=new ce(s);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let i="";for(const l of r)i+=e.write(l);return r.clear(),""!==i&&r.push(i),this._readableState.length=i.length,this},J.prototype.read=function(s){v("read",s),void 0===s?s=NaN:D(s)||(s=c(s,10));const e=this._readableState,r=s;if(s>e.highWaterMark&&(e.highWaterMark=function n(s){if(s>1073741824)throw new le("size","<= 1GiB",s);return s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,++s}(s)),0!==s&&(e.state&=-129),0===s&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return v("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Je(this):x(this),null;if(0===(s=a(s,e))&&e.ended)return 0===e.length&&Je(this),null;let l,i=!!(64&e.state);if(v("need readable",i),(0===e.length||e.length-s<e.highWaterMark)&&(i=!0,v("length less than watermark",i)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)i=!1,v("reading, ended or constructing",i);else if(i){v("do read"),e.state|=40,0===e.length&&(e.state|=64);try{this._read(e.highWaterMark)}catch(b){se(this,b)}e.state&=-33,e.reading||(s=a(r,e))}return l=s>0?Ve(s,e):null,null===l?(e.needReadable=e.length<=e.highWaterMark,s=0):(e.length-=s,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),r!==s&&e.ended&&Je(this)),null!==l&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit("data",l)),l},J.prototype._read=function(s){throw new Y("_read()")},J.prototype.pipe=function(s,e){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new z(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(s),v("pipe count=%d opts=%j",i.pipes.length,e);const b=e&&!1===e.end||s===F.stdout||s===F.stderr?Oe:T;function T(){v("onend"),s.end()}i.endEmitted?F.nextTick(b):r.once("end",b),s.on("unpipe",function w(Qe,He){v("onunpipe"),Qe===r&&He&&!1===He.hasUnpiped&&(He.hasUnpiped=!0,function pe(){v("cleanup"),s.removeListener("close",we),s.removeListener("finish",Le),H&&s.removeListener("drain",H),s.removeListener("error",Me),s.removeListener("unpipe",w),r.removeListener("end",T),r.removeListener("end",Oe),r.removeListener("data",Re),ue=!0,H&&i.awaitDrainWriters&&(!s._writableState||s._writableState.needDrain)&&H()}())});let H,ue=!1;function _e(){ue||(1===i.pipes.length&&i.pipes[0]===s?(v("false write response, pause",0),i.awaitDrainWriters=s,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(s)&&(v("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(s)),r.pause()),H||(H=function Pe(s,e){return function(){const i=s._readableState;i.awaitDrainWriters===e?(v("pipeOnDrain",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(v("pipeOnDrain",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(e)),(!i.awaitDrainWriters||0===i.awaitDrainWriters.size)&&s.listenerCount("data")&&s.resume()}}(r,s),s.on("drain",H))}function Re(Qe){v("ondata");const He=s.write(Qe);v("dest.write",He),!1===He&&_e()}function Me(Qe){if(v("onerror",Qe),Oe(),s.removeListener("error",Me),0===s.listenerCount("error")){const He=s._writableState||s._readableState;He&&!He.errorEmitted?se(s,Qe):s.emit("error",Qe)}}function we(){s.removeListener("finish",Le),Oe()}function Le(){v("onfinish"),s.removeListener("close",we),Oe()}function Oe(){v("unpipe"),r.unpipe(s)}return r.on("data",Re),h(s,"error",Me),s.once("close",we),s.once("finish",Le),s.emit("pipe",r),!0===s.writableNeedDrain?_e():i.flowing||(v("pipe resume"),r.resume()),s},J.prototype.unpipe=function(s){const e=this._readableState;if(0===e.pipes.length)return this;if(!s){const l=e.pipes;e.pipes=[],this.pause();for(let b=0;b<l.length;b++)l[b].emit("unpipe",this,{hasUnpiped:!1});return this}const i=j(e.pipes,s);return-1===i||(e.pipes.splice(i,1),0===e.pipes.length&&this.pause(),s.emit("unpipe",this,{hasUnpiped:!1})),this},J.prototype.addListener=J.prototype.on=function(s,e){const r=S.prototype.on.call(this,s,e),i=this._readableState;return"data"===s?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===s&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,v("on readable",i.length,i.reading),i.length?x(this):i.reading||F.nextTick(ve,this)),r},J.prototype.off=J.prototype.removeListener=function(s,e){const r=S.prototype.removeListener.call(this,s,e);return"readable"===s&&F.nextTick(Ne,this),r},J.prototype.removeAllListeners=function(s){const e=S.prototype.removeAllListeners.apply(this,arguments);return("readable"===s||void 0===s)&&F.nextTick(Ne,this),e},J.prototype.resume=function(){const s=this._readableState;return s.flowing||(v("resume"),s.flowing=!s.readableListening,function We(s,e){e.resumeScheduled||(e.resumeScheduled=!0,F.nextTick(ke,s,e))}(this,s)),s[Q]=!1,this},J.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Q]=!0,this},J.prototype.wrap=function(s){let e=!1;s.on("data",i=>{!this.push(i)&&s.pause&&(e=!0,s.pause())}),s.on("end",()=>{this.push(null)}),s.on("error",i=>{se(this,i)}),s.on("close",()=>{this.destroy()}),s.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&s.resume&&(e=!1,s.resume())};const r=X(s);for(let i=1;i<r.length;i++){const l=r[i];void 0===this[l]&&"function"==typeof s[l]&&(this[l]=s[l].bind(s))}return this},J.prototype[$]=function(){return ze(this)},J.prototype.iterator=function(s){return void 0!==s&&Ae(s,"options"),ze(this,s)},L(J.prototype,{readable:{__proto__:null,get(){const s=this._readableState;return!(!s||!1===s.readable||s.destroyed||s.errorEmitted||s.endEmitted)},set(s){this._readableState&&(this._readableState.readable=!!s)}},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(s){this._readableState&&(this._readableState.flowing=s)}},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(s){this._readableState&&(this._readableState.destroyed=s)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),L(ae.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[Q]},set(s){this[Q]=!!s}}}),J._fromList=Ve,J.from=function(s,e){return y(J,s,e)},J.fromWeb=function(s,e){return et().newStreamReadableFromReadableStream(s,e)},J.toWeb=function(s,e){return et().newReadableStreamFromStreamReadable(s,e)},J.wrap=function(s,e){var r,i;return new J({objectMode:null===(r=null!==(i=s.readableObjectMode)&&void 0!==i?i:s.objectMode)||void 0===r||r,...e,destroy(l,b){de.destroyer(s,l),b(l)}}).wrap(s)}},78153(re,ne,u){"use strict";const{MathFloor:_,NumberIsInteger:C}=u(35280),{validateInteger:F}=u(66563),{ERR_INVALID_ARG_VALUE:j}=u(90485).codes;let D=16384,R=16;function L(N){return N?R:D}re.exports={getHighWaterMark:function k(N,z,B,$){const V=function c(N,z,B){return null!=N.highWaterMark?N.highWaterMark:z?N[B]:null}(z,$,B);if(null!=V){if(!C(V)||V<0)throw new j($?`options.${B}`:"options.highWaterMark",V);return _(V)}return L(N.objectMode)},getDefaultHighWaterMark:L,setDefaultHighWaterMark:function X(N,z){F(z,"value",0),N?R=z:D=z}}},95112(re,ne,u){"use strict";const{ObjectSetPrototypeOf:_,Symbol:C}=u(35280);re.exports=c;const{ERR_METHOD_NOT_IMPLEMENTED:F}=u(90485).codes,j=u(44088),{getHighWaterMark:D}=u(78153);_(c.prototype,j.prototype),_(c,j);const R=C("kCallback");function c(k){if(!(this instanceof c))return new c(k);const N=k?D(this,k,"readableHighWaterMark",!0):null;0===N&&(k={...k,highWaterMark:null,readableHighWaterMark:N,writableHighWaterMark:k.writableHighWaterMark||0}),j.call(this,k),this._readableState.sync=!1,this[R]=null,k&&("function"==typeof k.transform&&(this._transform=k.transform),"function"==typeof k.flush&&(this._flush=k.flush)),this.on("prefinish",X)}function L(k){"function"!=typeof this._flush||this.destroyed?(this.push(null),k&&k()):this._flush((N,z)=>{N?k?k(N):this.destroy(N):(null!=z&&this.push(z),this.push(null),k&&k())})}function X(){this._final!==L&&L.call(this)}c.prototype._final=L,c.prototype._transform=function(k,N,z){throw new F("_transform()")},c.prototype._write=function(k,N,z){const B=this._readableState,$=this._writableState,V=B.length;this._transform(k,N,(q,S)=>{q?z(q):(null!=S&&this.push(S),$.ended||V===B.length||B.length<B.highWaterMark?z():this[R]=z)})},c.prototype._read=function(){if(this[R]){const k=this[R];this[R]=null,k()}}},96545(re,ne,u){"use strict";const{SymbolAsyncIterator:_,SymbolIterator:C,SymbolFor:F}=u(35280),j=F("nodejs.stream.destroyed"),D=F("nodejs.stream.errored"),R=F("nodejs.stream.readable"),c=F("nodejs.stream.writable"),L=F("nodejs.stream.disturbed"),X=F("nodejs.webstream.isClosedPromise"),k=F("nodejs.webstream.controllerErrorFunction");function N(y,W=!1){var se;return!(!y||"function"!=typeof y.pipe||"function"!=typeof y.on||W&&("function"!=typeof y.pause||"function"!=typeof y.resume)||y._writableState&&!1===(null===(se=y._readableState)||void 0===se?void 0:se.readable)||y._writableState&&!y._readableState)}function z(y){var W;return!(!y||"function"!=typeof y.write||"function"!=typeof y.on||y._readableState&&!1===(null===(W=y._writableState)||void 0===W?void 0:W.writable))}function $(y){return y&&(y._readableState||y._writableState||"function"==typeof y.write&&"function"==typeof y.on||"function"==typeof y.pipe&&"function"==typeof y.on)}function V(y){return!(!y||$(y)||"function"!=typeof y.pipeThrough||"function"!=typeof y.getReader||"function"!=typeof y.cancel)}function q(y){return!(!y||$(y)||"function"!=typeof y.getWriter||"function"!=typeof y.abort)}function S(y){return!(!y||$(y)||"object"!=typeof y.readable||"object"!=typeof y.writable)}function p(y){if(!$(y))return null;const ye=y._writableState||y._readableState;return!!(y.destroyed||y[j]||null!=ye&&ye.destroyed)}function E(y){if(!z(y))return null;if(!0===y.writableEnded)return!0;const W=y._writableState;return(null==W||!W.errored)&&("boolean"!=typeof W?.ended?null:W.ended)}function de(y,W){if(!N(y))return null;const se=y._readableState;return(null==se||!se.errored)&&("boolean"!=typeof se?.endEmitted?null:!!(se.endEmitted||!1===W&&!0===se.ended&&0===se.length))}function ee(y){return y&&null!=y[R]?y[R]:"boolean"!=typeof y?.readable?null:!p(y)&&N(y)&&y.readable&&!de(y)}function me(y){return y&&null!=y[c]?y[c]:"boolean"!=typeof y?.writable?null:!p(y)&&z(y)&&y.writable&&!E(y)}function xe(y){return"boolean"==typeof y._closed&&"boolean"==typeof y._defaultKeepAlive&&"boolean"==typeof y._removedConnection&&"boolean"==typeof y._removedContLen}function fe(y){return"boolean"==typeof y._sent100&&xe(y)}re.exports={isDestroyed:p,kIsDestroyed:j,isDisturbed:function Q(y){var W;return!(!y||!(null!==(W=y[L])&&void 0!==W?W:y.readableDidRead||y.readableAborted))},kIsDisturbed:L,isErrored:function ce(y){var W,se,ye,Ee,Be,he,Fe,Ce,De,$e;return!(!y||!(null!==(W=null!==(se=null!==(ye=null!==(Ee=null!==(Be=null!==(he=y[D])&&void 0!==he?he:y.readableErrored)&&void 0!==Be?Be:y.writableErrored)&&void 0!==Ee?Ee:null===(Fe=y._readableState)||void 0===Fe?void 0:Fe.errorEmitted)&&void 0!==ye?ye:null===(Ce=y._writableState)||void 0===Ce?void 0:Ce.errorEmitted)&&void 0!==se?se:null===(De=y._readableState)||void 0===De?void 0:De.errored)&&void 0!==W?W:null!==($e=y._writableState)&&void 0!==$e&&$e.errored))},kIsErrored:D,isReadable:ee,kIsReadable:R,kIsClosedPromise:X,kControllerErrorFunction:k,kIsWritable:c,isClosed:function le(y){if(!$(y))return null;if("boolean"==typeof y.closed)return y.closed;const W=y._writableState,se=y._readableState;return"boolean"==typeof W?.closed||"boolean"==typeof se?.closed?W?.closed||se?.closed:"boolean"==typeof y._closed&&xe(y)?y._closed:null},isDuplexNodeStream:function B(y){return!(!y||"function"!=typeof y.pipe||!y._readableState||"function"!=typeof y.on||"function"!=typeof y.write)},isFinished:function U(y,W){return $(y)?!!p(y)||!(!1!==W?.readable&&ee(y)||!1!==W?.writable&&me(y)):null},isIterable:function d(y,W){return null!=y&&(!0===W?"function"==typeof y[_]:!1===W?"function"==typeof y[C]:"function"==typeof y[_]||"function"==typeof y[C])},isReadableNodeStream:N,isReadableStream:V,isReadableEnded:function K(y){if(!N(y))return null;if(!0===y.readableEnded)return!0;const W=y._readableState;return!(!W||W.errored)&&("boolean"!=typeof W?.ended?null:W.ended)},isReadableFinished:de,isReadableErrored:function Y(y){var W,se;return $(y)?y.readableErrored?y.readableErrored:null!==(W=null===(se=y._readableState)||void 0===se?void 0:se.errored)&&void 0!==W?W:null:null},isNodeStream:$,isWebStream:function h(y){return V(y)||q(y)||S(y)},isWritable:me,isWritableNodeStream:z,isWritableStream:q,isWritableEnded:E,isWritableFinished:function v(y,W){if(!z(y))return null;if(!0===y.writableFinished)return!0;const se=y._writableState;return(null==se||!se.errored)&&("boolean"!=typeof se?.finished?null:!!(se.finished||!1===W&&!0===se.ended&&0===se.length))},isWritableErrored:function te(y){var W,se;return $(y)?y.writableErrored?y.writableErrored:null!==(W=null===(se=y._writableState)||void 0===se?void 0:se.errored)&&void 0!==W?W:null:null},isServerRequest:function G(y){var W;return"boolean"==typeof y._consuming&&"boolean"==typeof y._dumped&&void 0===(null===(W=y.req)||void 0===W?void 0:W.upgradeOrConnect)},isServerResponse:fe,willEmitClose:function Ae(y){if(!$(y))return null;const ye=y._writableState||y._readableState;return!ye&&fe(y)||!!(ye&&ye.autoDestroy&&ye.emitClose&&!1===ye.closed)},isTransformStream:S}},74850(re,ne,u){"use strict";const _=u(40573),{ArrayPrototypeSlice:C,Error:F,FunctionPrototypeSymbolHasInstance:j,ObjectDefineProperty:D,ObjectDefineProperties:R,ObjectSetPrototypeOf:c,StringPrototypeToLowerCase:L,Symbol:X,SymbolHasInstance:k}=u(35280);re.exports=fe,fe.WritableState=le;const{EventEmitter:N}=u(44356),z=u(82521).Stream,{Buffer:B}=u(83838),$=u(53014),{addAbortSignal:V}=u(14129),{getHighWaterMark:q,getDefaultHighWaterMark:S}=u(78153),{ERR_INVALID_ARG_TYPE:h,ERR_METHOD_NOT_IMPLEMENTED:d,ERR_MULTIPLE_CALLBACK:p,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:v,ERR_STREAM_ALREADY_FINISHED:K,ERR_STREAM_NULL_VALUES:de,ERR_STREAM_WRITE_AFTER_END:ee,ERR_UNKNOWN_ENCODING:me}=u(90485).codes,{errorOrDestroy:U}=$;function te(){}c(fe.prototype,z.prototype),c(fe,z);const Y=X("kOnFinished");function le(m,I,M){"boolean"!=typeof M&&(M=I instanceof u(44088)),this.objectMode=!(!m||!m.objectMode),M&&(this.objectMode=this.objectMode||!(!m||!m.writableObjectMode)),this.highWaterMark=m?q(this,m,"writableHighWaterMark",M):S(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(m&&!1===m.decodeStrings),this.defaultEncoding=m&&m.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=y.bind(void 0,I),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,xe(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!m||!1!==m.emitClose,this.autoDestroy=!m||!1!==m.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Y]=[]}function xe(m){m.buffered=[],m.bufferedIndex=0,m.allBuffers=!0,m.allNoop=!0}function fe(m){const I=this instanceof u(44088);if(!I&&!j(fe,this))return new fe(m);this._writableState=new le(m,this,I),m&&("function"==typeof m.write&&(this._write=m.write),"function"==typeof m.writev&&(this._writev=m.writev),"function"==typeof m.destroy&&(this._destroy=m.destroy),"function"==typeof m.final&&(this._final=m.final),"function"==typeof m.construct&&(this._construct=m.construct),m.signal&&V(m.signal,this)),z.call(this,m),$.construct(this,()=>{const M=this._writableState;M.writing||Ee(this,M),Ce(this,M)})}function G(m,I,M,ie){const oe=m._writableState;if("function"==typeof M)ie=M,M=oe.defaultEncoding;else{if(M){if("buffer"!==M&&!B.isEncoding(M))throw new me(M)}else M=oe.defaultEncoding;"function"!=typeof ie&&(ie=te)}if(null===I)throw new de;if(!oe.objectMode)if("string"==typeof I)!1!==oe.decodeStrings&&(I=B.from(I,M),M="buffer");else if(I instanceof B)M="buffer";else{if(!z._isUint8Array(I))throw new h("chunk",["string","Buffer","Uint8Array"],I);I=z._uint8ArrayToBuffer(I),M="buffer"}let Ie;return oe.ending?Ie=new ee:oe.destroyed&&(Ie=new v("write")),Ie?(_.nextTick(ie,Ie),U(m,Ie,!0),Ie):(oe.pendingcb++,function Ae(m,I,M,ie,oe){const Ie=I.objectMode?1:M.length;I.length+=Ie;const f=I.length<I.highWaterMark;return f||(I.needDrain=!0),I.writing||I.corked||I.errored||!I.constructed?(I.buffered.push({chunk:M,encoding:ie,callback:oe}),I.allBuffers&&"buffer"!==ie&&(I.allBuffers=!1),I.allNoop&&oe!==te&&(I.allNoop=!1)):(I.writelen=Ie,I.writecb=oe,I.writing=!0,I.sync=!0,m._write(M,ie,I.onwrite),I.sync=!1),f&&!I.errored&&!I.destroyed}(m,oe,I,M,ie))}function Q(m,I,M,ie,oe,Ie,f){I.writelen=ie,I.writecb=f,I.writing=!0,I.sync=!0,I.destroyed?I.onwrite(new v("write")):M?m._writev(oe,I.onwrite):m._write(oe,Ie,I.onwrite),I.sync=!1}function ce(m,I,M,ie){--I.pendingcb,ie(M),ye(I),U(m,M)}function y(m,I){const M=m._writableState,ie=M.sync,oe=M.writecb;"function"==typeof oe?(M.writing=!1,M.writecb=null,M.length-=M.writelen,M.writelen=0,I?(M.errored||(M.errored=I),m._readableState&&!m._readableState.errored&&(m._readableState.errored=I),ie?_.nextTick(ce,m,M,I,oe):ce(m,M,I,oe)):(M.buffered.length>M.bufferedIndex&&Ee(m,M),ie?null!==M.afterWriteTickInfo&&M.afterWriteTickInfo.cb===oe?M.afterWriteTickInfo.count++:(M.afterWriteTickInfo={count:1,cb:oe,stream:m,state:M},_.nextTick(W,M.afterWriteTickInfo)):se(m,M,1,oe))):U(m,new p)}function W({stream:m,state:I,count:M,cb:ie}){return I.afterWriteTickInfo=null,se(m,I,M,ie)}function se(m,I,M,ie){for(!I.ending&&!m.destroyed&&0===I.length&&I.needDrain&&(I.needDrain=!1,m.emit("drain"));M-- >0;)I.pendingcb--,ie();I.destroyed&&ye(I),Ce(m,I)}function ye(m){if(m.writing)return;for(let oe=m.bufferedIndex;oe<m.buffered.length;++oe){var I;const{chunk:Ie,callback:f}=m.buffered[oe];m.length-=m.objectMode?1:Ie.length,f(null!==(I=m.errored)&&void 0!==I?I:new v("write"))}const M=m[Y].splice(0);for(let oe=0;oe<M.length;oe++){var ie;M[oe](null!==(ie=m.errored)&&void 0!==ie?ie:new v("end"))}xe(m)}function Ee(m,I){if(I.corked||I.bufferProcessing||I.destroyed||!I.constructed)return;const{buffered:M,bufferedIndex:ie,objectMode:oe}=I,Ie=M.length-ie;if(!Ie)return;let f=ie;if(I.bufferProcessing=!0,Ie>1&&m._writev){I.pendingcb-=Ie-1;const A=I.allNoop?te:Z=>{for(let ae=f;ae<M.length;++ae)M[ae].callback(Z)},P=I.allNoop&&0===f?M:C(M,f);P.allBuffers=I.allBuffers,Q(m,I,!0,I.length,P,"",A),xe(I)}else{do{const{chunk:A,encoding:P,callback:Z}=M[f];M[f++]=null,Q(m,I,!1,oe?1:A.length,A,P,Z)}while(f<M.length&&!I.writing);f===M.length?xe(I):f>256?(M.splice(0,f),I.bufferedIndex=0):I.bufferedIndex=f}I.bufferProcessing=!1}function Be(m){return m.ending&&!m.destroyed&&m.constructed&&0===m.length&&!m.errored&&0===m.buffered.length&&!m.finished&&!m.writing&&!m.errorEmitted&&!m.closeEmitted}function Ce(m,I,M){Be(I)&&(function Fe(m,I){!I.prefinished&&!I.finalCalled&&("function"!=typeof m._final||I.destroyed?(I.prefinished=!0,m.emit("prefinish")):(I.finalCalled=!0,function he(m,I){let M=!1;function ie(oe){if(M)U(m,oe??p());else if(M=!0,I.pendingcb--,oe){const Ie=I[Y].splice(0);for(let f=0;f<Ie.length;f++)Ie[f](oe);U(m,oe,I.sync)}else Be(I)&&(I.prefinished=!0,m.emit("prefinish"),I.pendingcb++,_.nextTick(De,m,I))}I.sync=!0,I.pendingcb++;try{m._final(ie)}catch(oe){ie(oe)}I.sync=!1}(m,I)))}(m,I),0===I.pendingcb&&(M?(I.pendingcb++,_.nextTick((ie,oe)=>{Be(oe)?De(ie,oe):oe.pendingcb--},m,I)):Be(I)&&(I.pendingcb++,De(m,I))))}function De(m,I){I.pendingcb--,I.finished=!0;const M=I[Y].splice(0);for(let ie=0;ie<M.length;ie++)M[ie]();if(m.emit("finish"),I.autoDestroy){const ie=m._readableState;(!ie||ie.autoDestroy&&(ie.endEmitted||!1===ie.readable))&&m.destroy()}}le.prototype.getBuffer=function(){return C(this.buffered,this.bufferedIndex)},D(le.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),D(fe,k,{__proto__:null,value:function(m){return!!j(this,m)||this===fe&&m&&m._writableState instanceof le}}),fe.prototype.pipe=function(){U(this,new E)},fe.prototype.write=function(m,I,M){return!0===G(this,m,I,M)},fe.prototype.cork=function(){this._writableState.corked++},fe.prototype.uncork=function(){const m=this._writableState;m.corked&&(m.corked--,m.writing||Ee(this,m))},fe.prototype.setDefaultEncoding=function(I){if("string"==typeof I&&(I=L(I)),!B.isEncoding(I))throw new me(I);return this._writableState.defaultEncoding=I,this},fe.prototype._write=function(m,I,M){if(!this._writev)throw new d("_write()");this._writev([{chunk:m,encoding:I}],M)},fe.prototype._writev=null,fe.prototype.end=function(m,I,M){const ie=this._writableState;let oe;if("function"==typeof m?(M=m,m=null,I=null):"function"==typeof I&&(M=I,I=null),null!=m){const Ie=G(this,m,I);Ie instanceof F&&(oe=Ie)}return ie.corked&&(ie.corked=1,this.uncork()),oe||(ie.errored||ie.ending?ie.finished?oe=new K("end"):ie.destroyed&&(oe=new v("end")):(ie.ending=!0,Ce(this,ie,!0),ie.ended=!0)),"function"==typeof M&&(oe||ie.finished?_.nextTick(M,oe):ie[Y].push(M)),this},R(fe.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(m){this._writableState&&(this._writableState.destroyed=m)}},writable:{__proto__:null,get(){const m=this._writableState;return!(!m||!1===m.writable||m.destroyed||m.errored||m.ending||m.ended)},set(m){this._writableState&&(this._writableState.writable=!!m)}},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 m=this._writableState;return!!m&&!m.destroyed&&!m.ending&&m.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 $e=$.destroy;let ge;function Te(){return void 0===ge&&(ge={}),ge}fe.prototype.destroy=function(m,I){const M=this._writableState;return!M.destroyed&&(M.bufferedIndex<M.buffered.length||M[Y].length)&&_.nextTick(ye,M),$e.call(this,m,I),this},fe.prototype._undestroy=$.undestroy,fe.prototype._destroy=function(m,I){I(m)},fe.prototype[N.captureRejectionSymbol]=function(m){this.destroy(m)},fe.fromWeb=function(m,I){return Te().newStreamWritableFromWritableStream(m,I)},fe.toWeb=function(m){return Te().newWritableStreamFromStreamWritable(m)}},66563(re,ne,u){"use strict";const{ArrayIsArray:_,ArrayPrototypeIncludes:C,ArrayPrototypeJoin:F,ArrayPrototypeMap:j,NumberIsInteger:D,NumberIsNaN:R,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:L,NumberParseInt:X,ObjectPrototypeHasOwnProperty:k,RegExpPrototypeExec:N,String:z,StringPrototypeToUpperCase:B,StringPrototypeTrim:$}=u(35280),{hideStackFrames:V,codes:{ERR_SOCKET_BAD_PORT:q,ERR_INVALID_ARG_TYPE:S,ERR_INVALID_ARG_VALUE:h,ERR_OUT_OF_RANGE:d,ERR_UNKNOWN_SIGNAL:p}}=u(90485),{normalizeEncoding:E}=u(54326),{isAsyncFunction:v,isArrayBufferView:K}=u(54326).types,de={},U=/^[0-7]+$/,le=V((f,A,P=L,Z=c)=>{if("number"!=typeof f)throw new S(A,"number",f);if(!D(f))throw new d(A,"an integer",f);if(f<P||f>Z)throw new d(A,`>= ${P} && <= ${Z}`,f)}),xe=V((f,A,P=-2147483648,Z=2147483647)=>{if("number"!=typeof f)throw new S(A,"number",f);if(!D(f))throw new d(A,"an integer",f);if(f<P||f>Z)throw new d(A,`>= ${P} && <= ${Z}`,f)}),fe=V((f,A,P=!1)=>{if("number"!=typeof f)throw new S(A,"number",f);if(!D(f))throw new d(A,"an integer",f);const Z=P?1:0,ae=4294967295;if(f<Z||f>ae)throw new d(A,`>= ${Z} && <= ${ae}`,f)});function G(f,A){if("string"!=typeof f)throw new S(A,"string",f)}const Q=V((f,A,P)=>{if(!C(P,f)){const ae="must be one of: "+F(j(P,J=>"string"==typeof J?`'${J}'`:z(J)),", ");throw new h(A,f,ae)}});function ce(f,A){if("boolean"!=typeof f)throw new S(A,"boolean",f)}function y(f,A,P){return null!=f&&k(f,A)?f[A]:P}const W=V((f,A,P=null)=>{const Z=y(P,"allowArray",!1),ae=y(P,"allowFunction",!1);if(!y(P,"nullable",!1)&&null===f||!Z&&_(f)||"object"!=typeof f&&(!ae||"function"!=typeof f))throw new S(A,"Object",f)}),se=V((f,A)=>{if(null!=f&&"object"!=typeof f&&"function"!=typeof f)throw new S(A,"a dictionary",f)}),ye=V((f,A,P=0)=>{if(!_(f))throw new S(A,"Array",f);if(f.length<P)throw new h(A,f,`must be longer than ${P}`)}),Ce=V((f,A="buffer")=>{if(!K(f))throw new S(A,["Buffer","TypedArray","DataView"],f)}),ge=V((f,A)=>{if(void 0!==f&&(null===f||"object"!=typeof f||!("aborted"in f)))throw new S(A,"AbortSignal",f)}),Te=V((f,A)=>{if("function"!=typeof f)throw new S(A,"Function",f)}),m=V((f,A)=>{if("function"!=typeof f||v(f))throw new S(A,"Function",f)}),I=V((f,A)=>{if(void 0!==f)throw new S(A,"undefined",f)}),ie=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function oe(f,A){if(typeof f>"u"||!N(ie,f))throw new h(A,f,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}re.exports={isInt32:function ee(f){return f===(0|f)},isUint32:function me(f){return f===f>>>0},parseFileMode:function Y(f,A,P){if(typeof f>"u"&&(f=P),"string"==typeof f){if(null===N(U,f))throw new h(A,f,"must be a 32-bit unsigned integer or an octal string");f=X(f,8)}return fe(f,A),f},validateArray:ye,validateStringArray:function Ee(f,A){ye(f,A);for(let P=0;P<f.length;P++)G(f[P],`${A}[${P}]`)},validateBooleanArray:function Be(f,A){ye(f,A);for(let P=0;P<f.length;P++)ce(f[P],`${A}[${P}]`)},validateAbortSignalArray:function he(f,A){ye(f,A);for(let P=0;P<f.length;P++){const Z=f[P],ae=`${A}[${P}]`;if(null==Z)throw new S(ae,"AbortSignal",Z);ge(Z,ae)}},validateBoolean:ce,validateBuffer:Ce,validateDictionary:se,validateEncoding:function De(f,A){const P=E(A),Z=f.length;if("hex"===P&&Z%2!=0)throw new h("encoding",A,`is invalid for data of length ${Z}`)},validateFunction:Te,validateInt32:xe,validateInteger:le,validateNumber:function Ae(f,A,P=void 0,Z){if("number"!=typeof f)throw new S(A,"number",f);if(null!=P&&f<P||null!=Z&&f>Z||(null!=P||null!=Z)&&R(f))throw new d(A,`${null!=P?`>= ${P}`:""}${null!=P&&null!=Z?" && ":""}${null!=Z?`<= ${Z}`:""}`,f)},validateObject:W,validateOneOf:Q,validatePlainFunction:m,validatePort:function $e(f,A="Port",P=!0){if("number"!=typeof f&&"string"!=typeof f||"string"==typeof f&&0===$(f).length||+f!==+f>>>0||f>65535||0===f&&!P)throw new q(A,f,P);return 0|f},validateSignalName:function Fe(f,A="signal"){if(G(f,A),void 0===de[f])throw void 0!==de[B(f)]?new p(f+" (signals must use all capital letters)"):new p(f)},validateString:G,validateUint32:fe,validateUndefined:I,validateUnion:function M(f,A,P){if(!C(P,f))throw new S(A,`('${F(P,"|")}')`,f)},validateAbortSignal:ge,validateLinkHeaderValue:function Ie(f){if("string"==typeof f)return oe(f,"hints"),f;if(_(f)){const A=f.length;let P="";if(0===A)return P;for(let Z=0;Z<A;Z++){const ae=f[Z];oe(ae,"hints"),P+=ae,Z!==A-1&&(P+=", ")}return P}throw new h("hints",f,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},58208(re,ne,u){"use strict";const _=u(81132),C=u(46305),F=_.Readable.destroy;re.exports=_.Readable,re.exports._uint8ArrayToBuffer=_._uint8ArrayToBuffer,re.exports._isUint8Array=_._isUint8Array,re.exports.isDisturbed=_.isDisturbed,re.exports.isErrored=_.isErrored,re.exports.isReadable=_.isReadable,re.exports.Readable=_.Readable,re.exports.Writable=_.Writable,re.exports.Duplex=_.Duplex,re.exports.Transform=_.Transform,re.exports.PassThrough=_.PassThrough,re.exports.addAbortSignal=_.addAbortSignal,re.exports.finished=_.finished,re.exports.destroy=_.destroy,re.exports.destroy=F,re.exports.pipeline=_.pipeline,re.exports.compose=_.compose,Object.defineProperty(_,"promises",{configurable:!0,enumerable:!0,get:()=>C}),re.exports.Stream=_.Stream,re.exports.default=re.exports},90485(re,ne,u){"use strict";const{format:_,inspect:C}=u(29621),{AggregateError:F}=u(35280),j=globalThis.AggregateError||F,D=Symbol("kIsNodeError"),R=["string","function","number","object","Function","Object","boolean","bigint","symbol"],c=/^([A-Z][a-z0-9]*)+$/,X={};function k(S,h){if(!S)throw new X.ERR_INTERNAL_ASSERTION(h)}function N(S){let h="",d=S.length;const p="-"===S[0]?1:0;for(;d>=p+4;d-=3)h=`_${S.slice(d-3,d)}${h}`;return`${S.slice(0,d)}${h}`}function B(S,h,d){d||(d=Error);class p extends d{constructor(...v){super(function z(S,h,d){if("function"==typeof h)return k(h.length<=d.length,`Code: ${S}; The provided arguments length (${d.length}) does not match the required ones (${h.length}).`),h(...d);const p=(h.match(/%[dfijoOs]/g)||[]).length;return k(p===d.length,`Code: ${S}; The provided arguments length (${d.length}) does not match the required ones (${p}).`),0===d.length?h:_(h,...d)}(S,h,v))}toString(){return`${this.name} [${S}]: ${this.message}`}}Object.defineProperties(p.prototype,{name:{value:d.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${S}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),p.prototype.code=S,p.prototype[D]=!0,X[S]=p}function $(S){return Object.defineProperty(S,"name",{value:"__node_internal_"+S.name}),S}class q extends Error{constructor(h="The operation was aborted",d=void 0){if(void 0!==d&&"object"!=typeof d)throw new X.ERR_INVALID_ARG_TYPE("options","Object",d);super(h,d),this.code="ABORT_ERR",this.name="AbortError"}}B("ERR_ASSERTION","%s",Error),B("ERR_INVALID_ARG_TYPE",(S,h,d)=>{k("string"==typeof S,"'name' must be a string"),Array.isArray(h)||(h=[h]);let p="The ";S.endsWith(" argument")?p+=`${S} `:p+=`"${S}" ${S.includes(".")?"property":"argument"} `,p+="must be ";const E=[],v=[],K=[];for(const ee of h)k("string"==typeof ee,"All expected entries have to be of type string"),R.includes(ee)?E.push(ee.toLowerCase()):c.test(ee)?v.push(ee):(k("object"!==ee,'The value "object" should be written as "Object"'),K.push(ee));if(v.length>0){const ee=E.indexOf("object");-1!==ee&&(E.splice(E,ee,1),v.push("Object"))}if(E.length>0){switch(E.length){case 1:p+=`of type ${E[0]}`;break;case 2:p+=`one of type ${E[0]} or ${E[1]}`;break;default:{const ee=E.pop();p+=`one of type ${E.join(", ")}, or ${ee}`}}(v.length>0||K.length>0)&&(p+=" or ")}if(v.length>0){switch(v.length){case 1:p+=`an instance of ${v[0]}`;break;case 2:p+=`an instance of ${v[0]} or ${v[1]}`;break;default:{const ee=v.pop();p+=`an instance of ${v.join(", ")}, or ${ee}`}}K.length>0&&(p+=" or ")}switch(K.length){case 0:break;case 1:K[0].toLowerCase()!==K[0]&&(p+="an "),p+=`${K[0]}`;break;case 2:p+=`one of ${K[0]} or ${K[1]}`;break;default:{const ee=K.pop();p+=`one of ${K.join(", ")}, or ${ee}`}}if(null==d)p+=`. Received ${d}`;else if("function"==typeof d&&d.name)p+=`. Received function ${d.name}`;else if("object"==typeof d){var de;null!==(de=d.constructor)&&void 0!==de&&de.name?p+=`. Received an instance of ${d.constructor.name}`:p+=`. Received ${C(d,{depth:-1})}`}else{let ee=C(d,{colors:!1});ee.length>25&&(ee=`${ee.slice(0,25)}...`),p+=`. Received type ${typeof d} (${ee})`}return p},TypeError),B("ERR_INVALID_ARG_VALUE",(S,h,d="is invalid")=>{let p=C(h);return p.length>128&&(p=p.slice(0,128)+"..."),`The ${S.includes(".")?"property":"argument"} '${S}' ${d}. Received ${p}`},TypeError),B("ERR_INVALID_RETURN_VALUE",(S,h,d)=>{var p;return`Expected ${S} to be returned from the "${h}" function but got ${null!=d&&null!==(p=d.constructor)&&void 0!==p&&p.name?`instance of ${d.constructor.name}`:"type "+typeof d}.`},TypeError),B("ERR_MISSING_ARGS",(...S)=>{let h;k(S.length>0,"At least one arg needs to be specified");const d=S.length;switch(S=(Array.isArray(S)?S:[S]).map(p=>`"${p}"`).join(" or "),d){case 1:h+=`The ${S[0]} argument`;break;case 2:h+=`The ${S[0]} and ${S[1]} arguments`;break;default:{const p=S.pop();h+=`The ${S.join(", ")}, and ${p} arguments`}}return`${h} must be specified`},TypeError),B("ERR_OUT_OF_RANGE",(S,h,d)=>{let p;if(k(h,'Missing "range" argument'),Number.isInteger(d)&&Math.abs(d)>2**32)p=N(String(d));else if("bigint"==typeof d){p=String(d);const E=BigInt(2)**BigInt(32);(d>E||d<-E)&&(p=N(p)),p+="n"}else p=C(d);return`The value of "${S}" is out of range. It must be ${h}. Received ${p}`},RangeError),B("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),B("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),B("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),B("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),B("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),B("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),B("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),B("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),B("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),B("ERR_STREAM_WRITE_AFTER_END","write after end",Error),B("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),re.exports={AbortError:q,aggregateTwoErrors:$(function V(S,h){if(S&&h&&S!==h){if(Array.isArray(h.errors))return h.errors.push(S),h;const d=new j([h,S],h.message);return d.code=h.code,d}return S||h}),hideStackFrames:$,codes:X}},35280(re){"use strict";class ne extends Error{constructor(_){if(!Array.isArray(_))throw new TypeError("Expected input to be an Array, got "+typeof _);let C="";for(let F=0;F<_.length;F++)C+=` ${_[F].stack}\n`;super(C),this.name="AggregateError",this.errors=_}}re.exports={AggregateError:ne,ArrayIsArray:u=>Array.isArray(u),ArrayPrototypeIncludes:(u,_)=>u.includes(_),ArrayPrototypeIndexOf:(u,_)=>u.indexOf(_),ArrayPrototypeJoin:(u,_)=>u.join(_),ArrayPrototypeMap:(u,_)=>u.map(_),ArrayPrototypePop:(u,_)=>u.pop(_),ArrayPrototypePush:(u,_)=>u.push(_),ArrayPrototypeSlice:(u,_,C)=>u.slice(_,C),Error,FunctionPrototypeCall:(u,_,...C)=>u.call(_,...C),FunctionPrototypeSymbolHasInstance:(u,_)=>Function.prototype[Symbol.hasInstance].call(u,_),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:(u,_)=>Object.defineProperties(u,_),ObjectDefineProperty:(u,_,C)=>Object.defineProperty(u,_,C),ObjectGetOwnPropertyDescriptor:(u,_)=>Object.getOwnPropertyDescriptor(u,_),ObjectKeys:u=>Object.keys(u),ObjectSetPrototypeOf:(u,_)=>Object.setPrototypeOf(u,_),Promise,PromisePrototypeCatch:(u,_)=>u.catch(_),PromisePrototypeThen:(u,_,C)=>u.then(_,C),PromiseReject:u=>Promise.reject(u),PromiseResolve:u=>Promise.resolve(u),ReflectApply:Reflect.apply,RegExpPrototypeTest:(u,_)=>u.test(_),SafeSet:Set,String,StringPrototypeSlice:(u,_,C)=>u.slice(_,C),StringPrototypeToLowerCase:u=>u.toLowerCase(),StringPrototypeToUpperCase:u=>u.toUpperCase(),StringPrototypeTrim:u=>u.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:(u,_,C)=>u.set(_,C),Boolean,Uint8Array}},54326(re,ne,u){"use strict";var _=u(29293).default;const C=u(83838),{format:F,inspect:j}=u(29621),{codes:{ERR_INVALID_ARG_TYPE:D}}=u(90485),{kResistStopPropagation:R,AggregateError:c,SymbolDispose:L}=u(35280),X=globalThis.AbortSignal||u(9465).AbortSignal,k=globalThis.AbortController||u(9465).AbortController,N=Object.getPrototypeOf(_(function*(){})).constructor,z=globalThis.Blob||C.Blob,B=typeof z<"u"?function(S){return S instanceof z}:function(S){return!1},$=(q,S)=>{if(void 0!==q&&(null===q||"object"!=typeof q||!("aborted"in q)))throw new D(S,"AbortSignal",q)};re.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(q){let S=!1;return function(...h){S||(S=!0,q.apply(this,h))}},createDeferredPromise:function(){let q,S;return{promise:new Promise((d,p)=>{q=d,S=p}),resolve:q,reject:S}},promisify:q=>new Promise((S,h)=>{q((d,...p)=>d?h(d):S(...p))}),debuglog:()=>function(){},format:F,inspect:j,types:{isAsyncFunction:q=>q instanceof N,isArrayBufferView:q=>ArrayBuffer.isView(q)},isBlob:B,deprecate:(q,S)=>q,addAbortListener:u(44356).addAbortListener||function(S,h){if(void 0===S)throw new D("signal","AbortSignal",S);let d;return $(S,"signal"),(q=>{if("function"!=typeof q)throw new D("listener","Function",q)})(h),S.aborted?queueMicrotask(()=>h()):(S.addEventListener("abort",h,{__proto__:null,once:!0,[R]:!0}),d=()=>{S.removeEventListener("abort",h)}),{__proto__:null,[L](){var p;null===(p=d)||void 0===p||p()}}},AbortSignalAny:X.any||function(S){if(1===S.length)return S[0];const h=new k,d=()=>h.abort();return S.forEach(p=>{$(p,"signals"),p.addEventListener("abort",d,{once:!0})}),h.signal.addEventListener("abort",()=>{S.forEach(p=>p.removeEventListener("abort",d))},{once:!0}),h.signal}},re.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},29621(re){"use strict";re.exports={format:(ne,...u)=>ne.replace(/%([sdifj])/g,function(...[_,C]){const F=u.shift();return"f"===C?F.toFixed(6):"j"===C?JSON.stringify(F):"s"===C&&"object"==typeof F?`${F.constructor!==Object?F.constructor.name:""} {}`.trim():F.toString()}),inspect(ne){switch(typeof ne){case"string":if(ne.includes("'")){if(!ne.includes('"'))return`"${ne}"`;if(!ne.includes("`")&&!ne.includes("${"))return`\`${ne}\``}return`'${ne}'`;case"number":return isNaN(ne)?"NaN":Object.is(ne,-0)?String(ne):ne;case"bigint":return`${String(ne)}n`;case"boolean":case"undefined":return String(ne);case"object":return"{}"}}}},81132(re,ne,u){"use strict";const{Buffer:_}=u(83838),{ObjectDefineProperty:C,ObjectKeys:F,ReflectApply:j}=u(35280),{promisify:{custom:D}}=u(54326),{streamReturningOperators:R,promiseReturningOperators:c}=u(59597),{codes:{ERR_ILLEGAL_CONSTRUCTOR:L}}=u(90485),X=u(80984),{setDefaultHighWaterMark:k,getDefaultHighWaterMark:N}=u(78153),{pipeline:z}=u(96208),{destroyer:B}=u(53014),$=u(47404),q=u(46305),S=u(96545),h=re.exports=u(82521).Stream;h.isDestroyed=S.isDestroyed,h.isDisturbed=S.isDisturbed,h.isErrored=S.isErrored,h.isReadable=S.isReadable,h.isWritable=S.isWritable,h.Readable=u(33774);for(const p of F(R)){let v=function(...K){if(new.target)throw L();return h.Readable.from(j(E,this,K))};const E=R[p];C(v,"name",{__proto__:null,value:E.name}),C(v,"length",{__proto__:null,value:E.length}),C(h.Readable.prototype,p,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(const p of F(c)){let v=function(...K){if(new.target)throw L();return j(E,this,K)};const E=c[p];C(v,"name",{__proto__:null,value:E.name}),C(v,"length",{__proto__:null,value:E.length}),C(h.Readable.prototype,p,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}h.Writable=u(74850),h.Duplex=u(44088),h.Transform=u(95112),h.PassThrough=u(27322),h.pipeline=z;const{addAbortSignal:d}=u(14129);h.addAbortSignal=d,h.finished=$,h.destroy=B,h.compose=X,h.setDefaultHighWaterMark=k,h.getDefaultHighWaterMark=N,C(h,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>q}),C(z,D,{__proto__:null,enumerable:!0,get:()=>q.pipeline}),C($,D,{__proto__:null,enumerable:!0,get:()=>q.finished}),h.Stream=h,h._isUint8Array=function(E){return E instanceof Uint8Array},h._uint8ArrayToBuffer=function(E){return _.from(E.buffer,E.byteOffset,E.byteLength)}},46305(re,ne,u){"use strict";const{ArrayPrototypePop:_,Promise:C}=u(35280),{isIterable:F,isNodeStream:j,isWebStream:D}=u(96545),{pipelineImpl:R}=u(96208),{finished:c}=u(47404);u(81132),re.exports={finished:c,pipeline:function L(...X){return new C((k,N)=>{let z,B;const $=X[X.length-1];if($&&"object"==typeof $&&!j($)&&!F($)&&!D($)){const V=_(X);z=V.signal,B=V.end}R(X,(V,q)=>{V?N(V):k(q)},{signal:z,end:B})})}}},5407(re,ne,u){var _=u(83838),C=_.Buffer;function F(D,R){for(var c in D)R[c]=D[c]}function j(D,R,c){return C(D,R,c)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?re.exports=_:(F(_,ne),ne.Buffer=j),j.prototype=Object.create(C.prototype),F(C,j),j.from=function(D,R,c){if("number"==typeof D)throw new TypeError("Argument must not be a number");return C(D,R,c)},j.alloc=function(D,R,c){if("number"!=typeof D)throw new TypeError("Argument must be a number");var L=C(D);return void 0!==R?"string"==typeof c?L.fill(R,c):L.fill(R):L.fill(0),L},j.allocUnsafe=function(D){if("number"!=typeof D)throw new TypeError("Argument must be a number");return C(D)},j.allocUnsafeSlow=function(D){if("number"!=typeof D)throw new TypeError("Argument must be a number");return _.SlowBuffer(D)}},43387(re,ne,u){"use strict";var _=u(5407).Buffer,C=_.isEncoding||function(h){switch((h=""+h)&&h.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 D(h){var d;switch(this.encoding=function j(h){var d=function F(h){if(!h)return"utf8";for(var d;;)switch(h){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 h;default:if(d)return;h=(""+h).toLowerCase(),d=!0}}(h);if("string"!=typeof d&&(_.isEncoding===C||!C(h)))throw new Error("Unknown encoding: "+h);return d||h}(h),this.encoding){case"utf16le":this.text=z,this.end=B,d=4;break;case"utf8":this.fillLast=X,d=4;break;case"base64":this.text=$,this.end=V,d=3;break;default:return this.write=q,void(this.end=S)}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(d)}function R(h){return h<=127?0:h>>5==6?2:h>>4==14?3:h>>3==30?4:h>>6==2?-1:-2}function X(h){var d=this.lastTotal-this.lastNeed,p=function L(h,d){if(128!=(192&d[0]))return h.lastNeed=0,"\ufffd";if(h.lastNeed>1&&d.length>1){if(128!=(192&d[1]))return h.lastNeed=1,"\ufffd";if(h.lastNeed>2&&d.length>2&&128!=(192&d[2]))return h.lastNeed=2,"\ufffd"}}(this,h);return void 0!==p?p:this.lastNeed<=h.length?(h.copy(this.lastChar,d,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(h.copy(this.lastChar,d,0,h.length),void(this.lastNeed-=h.length))}function z(h,d){if((h.length-d)%2==0){var p=h.toString("utf16le",d);if(p){var E=p.charCodeAt(p.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],p.slice(0,-1)}return p}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",d,h.length-1)}function B(h){var d=h&&h.length?this.write(h):"";return this.lastNeed?d+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):d}function $(h,d){var p=(h.length-d)%3;return 0===p?h.toString("base64",d):(this.lastNeed=3-p,this.lastTotal=3,1===p?this.lastChar[0]=h[h.length-1]:(this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1]),h.toString("base64",d,h.length-p))}function V(h){var d=h&&h.length?this.write(h):"";return this.lastNeed?d+this.lastChar.toString("base64",0,3-this.lastNeed):d}function q(h){return h.toString(this.encoding)}function S(h){return h&&h.length?this.write(h):""}ne.StringDecoder=D,D.prototype.write=function(h){if(0===h.length)return"";var d,p;if(this.lastNeed){if(void 0===(d=this.fillLast(h)))return"";p=this.lastNeed,this.lastNeed=0}else p=0;return p<h.length?d?d+this.text(h,p):this.text(h,p):d||""},D.prototype.end=function N(h){var d=h&&h.length?this.write(h):"";return this.lastNeed?d+"\ufffd":d},D.prototype.text=function k(h,d){var p=function c(h,d,p){var E=d.length-1;if(E<p)return 0;var v=R(d[E]);return v>=0?(v>0&&(h.lastNeed=v-1),v):--E<p||-2===v?0:(v=R(d[E]))>=0?(v>0&&(h.lastNeed=v-2),v):--E<p||-2===v?0:(v=R(d[E]))>=0?(v>0&&(2===v?v=0:h.lastNeed=v-3),v):0}(this,h,d);if(!this.lastNeed)return h.toString("utf8",d);this.lastTotal=p;var E=h.length-(p-this.lastNeed);return h.copy(this.lastChar,0,E),h.toString("utf8",d,E)},D.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length}},53786(re,ne,u){"use strict";u.r(ne),u.d(ne,{BaseIRI:()=>ae,BlankNode:()=>de,DataFactory:()=>p,DefaultGraph:()=>me,EntityIndex:()=>We,Lexer:()=>B,Literal:()=>K,NamedNode:()=>v,Parser:()=>Ee,Quad:()=>Y,Reasoner:()=>Ve,Store:()=>ke,StoreFactory:()=>Ke,StreamParser:()=>qe,StreamWriter:()=>Xe,Term:()=>E,Triple:()=>Y,Util:()=>_,Variable:()=>ee,Writer:()=>x,default:()=>et,getRulesFromDataset:()=>Ge,termFromId:()=>U,termToId:()=>te});var _={};u.r(_),u.d(_,{inDefaultGraph:()=>m,isBlankNode:()=>Ce,isDefaultGraph:()=>Te,isLiteral:()=>De,isNamedNode:()=>Fe,isQuad:()=>ge,isVariable:()=>$e,prefix:()=>I,prefixes:()=>M});var C=u(83838);const F="http://www.w3.org/1999/02/22-rdf-syntax-ns#",j="http://www.w3.org/2001/XMLSchema#",D="http://www.w3.org/2000/10/swap/",R={xsd:{decimal:`${j}decimal`,boolean:`${j}boolean`,double:`${j}double`,integer:`${j}integer`,string:`${j}string`},rdf:{type:`${F}type`,nil:`${F}nil`,first:`${F}first`,rest:`${F}rest`,langString:`${F}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${D}reify#forSome`,forAll:`${D}reify#forAll`},log:{implies:`${D}log#implies`,isImpliedBy:`${D}log#isImpliedBy`}},{xsd:c}=R,L=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,X={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},k=/[\x00-\x20<>\\"\{\}\|\^\`]/,N={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},z=/$0^/;class B{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,this._isImpliedBy=(e=e||{}).isImpliedBy,this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const r in this)!(r in N)&&this[r]instanceof RegExp&&(this[r]=z)}else this._n3Mode=!1!==e.n3;this.comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,r){let i=this._input,l=i.length;for(;;){let T,H;for(;T=this._newline.exec(i);)this.comments&&(H=this._comment.exec(T[0]))&&b("comment",H[1],"",this._line,T[0].length),i=i.substr(T[0].length,i.length),l=i.length,this._line++;if(!T&&(T=this._whitespace.exec(i))&&(i=i.substr(T[0].length,i.length)),this._endOfFile.test(i))return r&&(this.comments&&(H=this._comment.exec(i))&&b("comment",H[1],"",this._line,i.length),i=null,b("eof","","",this._line,0)),this._input=i;const ue=this._line,pe=i[0];let _e="",Re="",Me="",we=null,Le=0,Oe=!1;switch(pe){case"^":if(i.length<3)break;if("^"!==i[1]){this._n3Mode&&(Le=1,_e="^");break}if(this._previousMarker="^^",i=i.substr(2),"<"!==i[0]){Oe=!0;break}case"<":if(we=this._unescapedIri.exec(i))_e="IRI",Re=we[1];else if(we=this._iri.exec(i)){if(Re=this._unescape(we[1]),null===Re||k.test(Re))return w(this);_e="IRI"}else i.length>1&&"<"===i[1]?(_e="<<",Le=2):this._n3Mode&&i.length>1&&"="===i[1]&&(Le=2,this._isImpliedBy?(_e="abbreviation",Re="<"):(_e="inverse",Re=">"));break;case">":i.length>1&&">"===i[1]&&(_e=">>",Le=2);break;case"_":((we=this._blank.exec(i))||r&&(we=this._blank.exec(`${i} `)))&&(_e="blank",Me="_",Re=we[1]);break;case'"':if(we=this._simpleQuotedString.exec(i))Re=we[1];else if(({value:Re,matchLength:Le}=this._parseLiteral(i)),null===Re)return w(this);(null!==we||0!==Le)&&(_e="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(we=this._simpleApostropheString.exec(i))Re=we[1];else if(({value:Re,matchLength:Le}=this._parseLiteral(i)),null===Re)return w(this);(null!==we||0!==Le)&&(_e="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(we=this._variable.exec(i))&&(_e="var",Re=we[0]);break;case"@":"literal"===this._previousMarker&&(we=this._langcode.exec(i))?(_e="langcode",Re=we[1]):(we=this._keyword.exec(i))&&(_e=we[0]);break;case".":if(1===i.length?r:i[1]<"0"||i[1]>"9"){_e=".",Le=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(we=this._number.exec(i)||r&&(we=this._number.exec(`${i} `)))&&(_e="literal",Re=we[0],Me="string"==typeof we[1]?c.double:"string"==typeof we[2]?c.decimal:c.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(we=this._sparqlKeyword.exec(i))?_e=we[0].toUpperCase():Oe=!0;break;case"f":case"t":(we=this._boolean.exec(i))?(_e="literal",Re=we[0],Me=c.boolean):Oe=!0;break;case"a":(we=this._shortPredicates.exec(i))?(_e="abbreviation",Re="a"):Oe=!0;break;case"=":this._n3Mode&&i.length>1&&(_e="abbreviation",">"!==i[1]?(Le=1,Re="="):(Le=2,Re=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(Le=1,_e=pe);break;case"{":!this._lineMode&&i.length>=2&&("|"===i[1]?(_e="{|",Le=2):(_e=pe,Le=1));break;case"|":i.length>=2&&"}"===i[1]&&(_e="|}",Le=2);break;default:Oe=!0}if(Oe&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(we=this._prefix.exec(i))?((we=this._prefixed.exec(i))||r&&(we=this._prefixed.exec(`${i} `)))&&(_e="prefixed",Me=we[1]||"",Re=this._unescape(we[2])):(_e="prefix",Re=we[1]||"")),"^^"===this._previousMarker)switch(_e){case"prefixed":_e="type";break;case"IRI":_e="typeIRI";break;default:_e=""}if(!_e)return r||!/^'''|^"""/.test(i)&&/\n|\r/.test(i)?w(this):this._input=i;const Qe=Le||we[0].length,He=b(_e,Re,Me,ue,Qe);this.previousToken=He,this._previousMarker=_e,i=i.substr(Qe,i.length)}function b(T,H,ue,pe,_e){const Re=i?l-i.length:l,we={type:T,value:H,prefix:ue,line:pe,start:Re,end:Re+_e};return e(null,we),we}function w(T){e(T._syntaxError(/^\S*/.exec(i)[0]))}}_unescape(e){let r=!1;const i=e.replace(L,(l,b,w,T)=>{if("string"==typeof b)return String.fromCharCode(Number.parseInt(b,16));if("string"==typeof w){let H=Number.parseInt(w,16);return H<=65535?String.fromCharCode(Number.parseInt(w,16)):String.fromCharCode(55296+((H-=65536)>>10),56320+(1023&H))}return T in X?X[T]:(r=!0,"")});return r?null:i}_parseLiteral(e){if(e.length>=3){const r=e.match(/^(?:"""|"|'''|'|)/)[0],i=r.length;let l=Math.max(this._literalClosingPos,i);for(;(l=e.indexOf(r,l))>0;){let b=0;for(;"\\"===e[l-b-1];)b++;if(b%2==0){const w=e.substring(i,l),T=w.split(/\r\n|\r|\n/).length-1,H=l+i;if(1===i&&0!==T||3===i&&this._lineMode)break;return this._line+=T,{value:this._unescape(w),matchLength:H}}l++}this._literalClosingPos=e.length-i+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const r=new Error(`Unexpected "${e}" on line ${this._line}.`);return r.context={token:void 0,line:this._line,previousToken:this.previousToken},r}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,r){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof r){const i=[];let l;if(this._tokenizeToEnd((b,w)=>b?l=b:i.push(w),!0),l)throw l;return i}queueMicrotask(()=>this._tokenizeToEnd(r,!0))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",i=>{null!==this._input&&0!==i.length&&(this._pendingBuffer&&(i=C.Buffer.concat([this._pendingBuffer,i]),this._pendingBuffer=null),128&i[i.length-1]?this._pendingBuffer=i:(typeof this._input>"u"?this._input=this._readStartingBom("string"==typeof i?i:i.toString()):this._input+=i,this._tokenizeToEnd(r,!1)))}),e.on("end",()=>{"string"==typeof this._input&&this._tokenizeToEnd(r,!0)}),e.on("error",r)}}const{rdf:$,xsd:V}=R;let q,S=0;const d={namedNode:fe,blankNode:G,variable:Q,literal:Ae,defaultGraph:function ce(){return q},quad:y,triple:y,fromTerm:W,fromQuad:se},p=d;class E{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof E?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class v extends E{get termType(){return"NamedNode"}}class K extends E{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let r=e.lastIndexOf('"')+1;return r<e.length&&"@"===e[r++]?e.substr(r).toLowerCase():""}get datatype(){return new v(this.datatypeString)}get datatypeString(){const e=this.id,r=e.lastIndexOf('"')+1,i=r<e.length?e[r]:"";return"^"===i?e.substr(r+2):"@"!==i?V.string:$.langString}equals(e){return e instanceof K?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class de extends E{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class ee extends E{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class me extends E{constructor(){return super(""),q||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}}function U(s,e,r){if(e=e||d,!s)return e.defaultGraph();switch(s[0]){case"?":return e.variable(s.substr(1));case"_":return e.blankNode(s.substr(2));case'"':if(e===d)return new K(s);if('"'===s[s.length-1])return e.literal(s.substr(1,s.length-2));const i=s.lastIndexOf('"',s.length-1);return e.literal(s.substr(1,i-1),"@"===s[i+1]?s.substr(i+2):e.namedNode(s.substr(i+3)));case"[":s=JSON.parse(s);break;default:if(!r||!Array.isArray(s))return e.namedNode(s)}return e.quad(U(s[0],e,!0),U(s[1],e,!0),U(s[2],e,!0),s[3]&&U(s[3],e,!0))}function te(s,e){if("string"==typeof s)return s;if(s instanceof E&&"Quad"!==s.termType)return s.id;if(!s)return q.id;switch(s.termType){case"NamedNode":return s.value;case"BlankNode":return`_:${s.value}`;case"Variable":return`?${s.value}`;case"DefaultGraph":return"";case"Literal":return`"${s.value}"${s.language?`@${s.language}`:s.datatype&&s.datatype.value!==V.string?`^^${s.datatype.value}`:""}`;case"Quad":const r=[te(s.subject,!0),te(s.predicate,!0),te(s.object,!0)];return s.graph&&"DefaultGraph"!==s.graph.termType&&r.push(te(s.graph,!0)),e?r:JSON.stringify(r);default:throw new Error(`Unexpected termType: ${s.termType}`)}}q=new me;class Y extends E{constructor(e,r,i,l){super(""),this._subject=e,this._predicate=r,this._object=i,this._graph=l||q}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function fe(s){return new v(s)}function G(s){return new de(s||"n3-"+S++)}function Ae(s,e){if("string"==typeof e)return new K(`"${s}"@${e.toLowerCase()}`);let r=e?e.value:"";return""===r&&("boolean"==typeof s?r=V.boolean:"number"==typeof s&&(Number.isFinite(s)?r=Number.isInteger(s)?V.integer:V.double:(r=V.double,Number.isNaN(s)||(s=s>0?"INF":"-INF")))),new K(""===r||r===V.string?`"${s}"`:`"${s}"^^${r}`)}function Q(s){return new ee(s)}function y(s,e,r,i){return new Y(s,e,r,i)}function W(s){if(s instanceof E)return s;switch(s.termType){case"NamedNode":return fe(s.value);case"BlankNode":return G(s.value);case"Variable":return Q(s.value);case"DefaultGraph":return q;case"Literal":return Ae(s.value,s.language||s.datatype);case"Quad":return se(s);default:throw new Error(`Unexpected termType: ${s.termType}`)}}function se(s){if(s instanceof Y)return s;if("Quad"!==s.termType)throw new Error(`Unexpected termType: ${s.termType}`);return y(W(s.subject),W(s.predicate),W(s.object),W(s.graph))}let ye=0;class Ee{constructor(e){this._contextStack=[],this._graph=null,this._setBase((e=e||{}).baseIRI),e.factory&&he(this,e.factory);const r="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",i=/turtle/.test(r),l=/trig/.test(r),b=/triple/.test(r),w=/quad/.test(r),T=this._n3Mode=/n3/.test(r),H=b||w;(this._supportsNamedGraphs=!(i||T))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(i||l||b||T),this._isImpliedBy=e.isImpliedBy,this._supportsRDFStar=""===r||/star|\*$/.test(r),H&&(this._resolveRelativeIRI=ue=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new B({lineMode:H,n3:T,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){ye=0}_setBase(e){if(e){const r=e.indexOf("#");r>=0&&(e=e.substr(0,r)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,r,i,l,b){const w=this._n3Mode;this._contextStack.push({type:e,subject:i,predicate:l,object:b,graph:r,inverse:!!w&&this._inversePredicate,blankPrefix:w?this._prefixes._:"",quantified:w?this._quantified:null}),w&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,r){const i=this._contextStack.pop();if(!i||i.type!==e)return this._error(`Unexpected ${r.type}`,r);this._subject=i.subject,this._predicate=i.predicate,this._object=i.object,this._graph=i.graph,this._n3Mode&&(this._inversePredicate=i.inverse,this._prefixes._=i.blankPrefix,this._quantified=i.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,r){let i;switch(e.type){case"IRI":case"typeIRI":const l=this._resolveIRI(e.value);if(null===l)return this._error("Invalid IRI",e);i=this._factory.namedNode(l);break;case"type":case"prefixed":const b=this._prefixes[e.prefix];if(void 0===b)return this._error(`Undefined prefix "${e.prefix}:"`,e);i=this._factory.namedNode(b+e.value);break;case"blank":i=this._factory.blankNode(this._prefixes[e.prefix]+e.value);break;case"var":i=this._factory.variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!r&&this._n3Mode&&i.id in this._quantified&&(i=this._quantified[i.id]),i}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._factory.blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._factory.blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="variable",this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-star syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const r=e.type;switch(r){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${r}`,e):(this._subject=null,"]"===r?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._factory.blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-star syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const r=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:r?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let r=null,i=null,l=this._readListItem;const b=this._subject,w=this._contextStack,T=w[w.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,i=this._factory.blankNode(),this.RDF_FIRST,this._subject=r=this._factory.blankNode()),l=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,i=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==w.length&&"list"===w[w.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(l=this._readPredicate,this._subject===this.RDF_NIL)return l}else if(l=this._getContextEndReader(),this._object===this.RDF_NIL)return l;i=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,l=this._readListItemDataTypeOrLang):(r=this._factory.literal(e.value,this._factory.namedNode(e.prefix)),l=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(r=this._readEntity(e)))return}if(null===i&&(this._subject=i=this._factory.blankNode()),null===b?null===T.predicate?T.subject=i:T.object=i:this._emit(b,this.RDF_REST,i,this._graph),null!==r){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,i,this.RDF_FIRST,r),this._subject=r,this._predicate=null,this._getPathReader(this._readListItem);this._emit(i,this.RDF_FIRST,r,this._graph)}return l}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let r=this._factory.literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const i=this._readEntity(e);if(void 0===i)return;r=this._factory.literal(this._literalValue,i),e=null;break;case"langcode":r=this._factory.literal(this._literalValue,e.value),e=null}return{token:e,literal:r}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,r){const i=this._completeLiteral(e);if(i)return this._object=i.literal,r&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===i.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(i.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let r,i=this._graph;const l=this._subject,b=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,r=this._contextStack.length?this._readSubject:this._readInTopContext,b&&(this._inversePredicate=!1);break;case";":r=this._readPredicate;break;case",":r=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF-star syntax",e);this._subject=this._factory.quad(l,this._predicate,this._object,this.DEFAULTGRAPH),r=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,r=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(i=this._readEntity(e))){r=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==l){const w=this._predicate,T=this._object;b?this._emit(T,w,l,i):this._emit(l,w,T,i)}return r}_readBlankNodePunctuation(e){let r;switch(e.type){case";":r=this._readPredicate;break;case",":r=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),r}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const r=this._readEntity(e);return this._prefixes[this._prefix]=r.value,this._prefixCallback(this._prefix,r),this._readDeclarationPunctuation}_readBaseIRI(e){const r="IRI"===e.type&&this._resolveIRI(e.value);return r?(this._setBase(r),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._factory.blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let r;switch(e.type){case"IRI":case"prefixed":if(void 0!==(r=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,r,this.QUANTIFIERS_GRAPH)):this._quantified[r.id]=this._factory[this._quantifier](this._factory.blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const r=this._contextStack,i=r.length&&r[r.length-1];if(i&&"item"===i.type){const l=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,l,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let r,i;const l=this._factory.blankNode();if(void 0!==(i=this._readEntity(e)))return null===this._predicate?(r=this._subject,this._subject=l):(r=this._object,this._object=l),this._emit(r,i,l,this._graph),this._readPath}_readBackwardPath(e){const r=this._factory.blankNode();let i,l;if(void 0!==(i=this._readEntity(e)))return null===this._predicate?(l=this._subject,this._subject=r):(l=this._object,this._object=r),this._emit(r,i,l,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const r=this._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=r,this._readPredicate):(this._object=r,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,r,i,l){this._callback(null,this._factory.quad(e,r,i,l||this.DEFAULTGRAPH))}_error(e,r){const i=new Error(`${e} on line ${r.line}.`);i.context={token:r,line:r.line,previousToken:this._lexer.previousToken},this._callback(i),this._callback=Be}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const r=e.length;let i="",l=-1,b=-1,w=0,T="/";for(;l<r;){switch(T){case":":if(b<0&&"/"===e[++l]&&"/"===e[++l])for(;(b=l+1)<r&&"/"!==e[b];)l=b;break;case"?":case"#":l=r;break;case"/":if("."===e[l+1])switch(T=e[1+ ++l],T){case"/":i+=e.substring(w,l-1),w=l+1;break;case void 0:case"?":case"#":return i+e.substring(w,l)+e.substr(l+1);case".":if(T=e[1+ ++l],void 0===T||"/"===T||"?"===T||"#"===T){if(i+=e.substring(w,l-2),(w=i.lastIndexOf("/"))>=b&&(i=i.substr(0,w)),"/"!==T)return`${i}/${e.substr(l+1)}`;w=l+1}}}T=e[++l]}return i+e.substring(w)}parse(e,r,i){let l,b,w;if(r&&(r.onQuad||r.onPrefix||r.onComment)?(l=r.onQuad,b=r.onPrefix,w=r.onComment):(l=r,b=i),this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${ye++}_`,this._prefixCallback=b||Be,this._inversePredicate=!1,this._quantified=Object.create(null),!l){const H=[];let ue;if(this._callback=(pe,_e)=>{pe?ue=pe:_e&&H.push(_e)},this._lexer.tokenize(e).every(pe=>this._readCallback=this._readCallback(pe)),ue)throw ue;return H}let T=(H,ue)=>{null!==H?(this._callback(H),this._callback=Be):this._readCallback&&(this._readCallback=this._readCallback(ue))};w&&(this._lexer.comments=!0,T=(H,ue)=>{null!==H?(this._callback(H),this._callback=Be):this._readCallback&&("comment"===ue.type?w(ue.value):this._readCallback=this._readCallback(ue))}),this._callback=l,this._lexer.tokenize(e,T)}}function Be(){}function he(s,e){s._factory=e,s.DEFAULTGRAPH=e.defaultGraph(),s.RDF_FIRST=e.namedNode(R.rdf.first),s.RDF_REST=e.namedNode(R.rdf.rest),s.RDF_NIL=e.namedNode(R.rdf.nil),s.N3_FORALL=e.namedNode(R.r.forAll),s.N3_FORSOME=e.namedNode(R.r.forSome),s.ABBREVIATIONS={a:e.namedNode(R.rdf.type),"=":e.namedNode(R.owl.sameAs),">":e.namedNode(R.log.implies),"<":e.namedNode(R.log.isImpliedBy)},s.QUANTIFIERS_GRAPH=e.namedNode("urn:n3:quantifiers")}function Fe(s){return!!s&&"NamedNode"===s.termType}function Ce(s){return!!s&&"BlankNode"===s.termType}function De(s){return!!s&&"Literal"===s.termType}function $e(s){return!!s&&"Variable"===s.termType}function ge(s){return!!s&&"Quad"===s.termType}function Te(s){return!!s&&"DefaultGraph"===s.termType}function m(s){return Te(s.graph)}function I(s,e){return M({"":s.value||s},e)("")}function M(s,e){const r=Object.create(null);for(const l in s)i(l,s[l]);function i(l,b){if("string"==typeof b){const w=Object.create(null);r[l]=T=>w[T]||(w[T]=e.namedNode(b+T))}else if(!(l in r))throw new Error(`Unknown prefix: ${l}`);return r[l]}return e=e||p,i}function ie(s){return s.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}he(Ee.prototype,p);const oe=/^:?[^:?#]*(?:[?#]|$)|^file:|^[^:]*:\/*[^?#]+?\/(?:\.\.?(?:\/|$)|\/)/i,Ie=/^(?:(?:[^/?#]{3,}|\.?[^/?#.]\.?)(?:\/[^/?#]{3,}|\.?[^/?#.]\.?)*\/?)?(?:[?#]|$)/;class ae{constructor(e){this.base=e,this._baseLength=0,this._baseMatcher=null,this._pathReplacements=new Array(e.length+1)}static supports(e){return!oe.test(e)}_getBaseMatcher(){if(this._baseMatcher)return this._baseMatcher;if(!ae.supports(this.base))return this._baseMatcher=/.^/;const e=/^[^:]*:\/*/.exec(this.base)[0],r=["^",ie(e)],i=[],l=[],b=/[^/?#]*([/?#])/y;let w,T=0,H=0,ue=b.lastIndex=e.length;for(;!T&&!H&&(w=b.exec(this.base));)"#"===w[1]?H=b.lastIndex-1:(r.push(ie(w[0]),"(?:"),i.push(")?"),"?"!==w[1]?l.push(ue=b.lastIndex):(T=ue=b.lastIndex,H=this.base.indexOf("#",T),this._pathReplacements[T]="?"));for(let pe=0;pe<l.length;pe++)this._pathReplacements[l[pe]]="../".repeat(l.length-pe-1);return this._pathReplacements[l[l.length-1]]="./",this._baseLength=H>0?H:this.base.length,r.push(ie(this.base.substring(ue,this._baseLength)),T?"(?:#|$)":"(?:[?#]|$)"),this._baseMatcher=new RegExp([...r,...i].join(""))}toRelative(e){const r=this._getBaseMatcher().exec(e);if(!r)return e;const i=r[0].length;if(i===this._baseLength&&i===e.length)return"";const l=this._pathReplacements[i];if(l){const b=e.substring(i);return"?"===l||Ie.test(b)?"./"===l&&/^[^?#]/.test(b)?b:l+b:e}return e.substring(i-1)}}const J=p.defaultGraph(),{rdf:Se,xsd:o}=R,t=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,n=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,a={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class g extends E{equals(e){return e===this}}class x{constructor(e,r){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(r=e,e=null),this._lists=(r=r||{}).lists,e)this._outputStream=e,this._endStream=void 0===r.end||!!r.end;else{let i="";this._outputStream={write(l,b,w){i+=l,w&&w()},end:l=>{l&&l(null,i)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(r.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=J,this._prefixIRIs=Object.create(null),r.prefixes&&this.addPrefixes(r.prefixes),r.baseIRI&&(this._baseIri=new ae(r.baseIRI)))}get _inDefaultGraph(){return J.equals(this._graph)}_write(e,r){this._outputStream.write(e,"utf8",r)}_writeQuad(e,r,i,l,b){try{l.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(J.equals(l)?"":`${this._encodeIriOrBlank(l)} {\n`)),this._graph=l,this._subject=null),e.equals(this._subject)?r.equals(this._predicate)?this._write(`, ${this._encodeObject(i)}`,b):this._write(`;\n ${this._encodePredicate(this._predicate=r)} ${this._encodeObject(i)}`,b):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=r)} ${this._encodeObject(i)}`,b)}catch(w){b&&b(w)}}_writeQuadLine(e,r,i,l,b){delete this._prefixMatch,this._write(this.quadToString(e,r,i,l),b)}quadToString(e,r,i,l){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(r)} ${this._encodeObject(i)}${l&&l.value?` ${this._encodeIriOrBlank(l)} .\n`:" .\n"}`}quadsToString(e){let r="";for(const i of e)r+=this.quadToString(i.subject,i.predicate,i.object,i.graph);return r}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let r=e.value;this._baseIri&&(r=this._baseIri.toRelative(r)),t.test(r)&&(r=r.replace(n,O));const i=this._prefixRegex.exec(r);return i?i[1]?this._prefixIRIs[i[1]]+i[2]:r:`<${r}>`}_encodeLiteral(e){let r=e.value;if(t.test(r)&&(r=r.replace(n,O)),e.language)return`"${r}"@${e.language}`;if(this._lineMode){if(e.datatype.value===o.string)return`"${r}"`}else switch(e.datatype.value){case o.string:return`"${r}"`;case o.boolean:if("true"===r||"false"===r)return r;break;case o.integer:if(/^[+-]?\d+$/.test(r))return r;break;case o.decimal:if(/^[+-]?\d*\.\d+$/.test(r))return r;break;case o.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(r))return r}return`"${r}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===Se.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:r,object:i,graph:l}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(r)} ${this._encodeObject(i)}${Te(l)?"":` ${this._encodeIriOrBlank(l)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,r,i,l,b){void 0===i?this._writeQuad(e.subject,e.predicate,e.object,e.graph,r):"function"==typeof l?this._writeQuad(e,r,i,J,l):this._writeQuad(e,r,i,l||J,b)}addQuads(e){for(let r=0;r<e.length;r++)this.addQuad(e[r])}addPrefix(e,r,i){const l={};l[e]=r,this.addPrefixes(l,i)}addPrefixes(e,r){if(!this._prefixIRIs)return r&&r();let i=!1;for(let l in e){let b=e[l];"string"!=typeof b&&(b=b.value),i=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[b]=l+=":",this._write(`@prefix ${l} <${b}>.\n`)}if(i){let l="",b="";for(const w in this._prefixIRIs)l+=l?`|${w}`:w,b+=(b?"|":"")+this._prefixIRIs[w];l=ie(l),this._prefixRegex=new RegExp(`^(?:${b})[^/]*$|^(${l})([_a-zA-Z0-9][\\-_a-zA-Z0-9]*)$`)}this._write(i?"\n":"",r)}blank(e,r){let l,b,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:r}]:"length"in e||(i=[e]),b=i.length){case 0:return new g("[]");case 1:if(l=i[0],!(l.object instanceof g))return new g(`[ ${this._encodePredicate(l.predicate)} ${this._encodeObject(l.object)} ]`);default:let w="[";for(let T=0;T<b;T++)l=i[T],l.predicate.equals(e)?w+=`, ${this._encodeObject(l.object)}`:(w+=`${(T?";\n ":"\n ")+this._encodePredicate(l.predicate)} ${this._encodeObject(l.object)}`,e=l.predicate);return new g(`${w}\n]`)}}list(e){const r=e&&e.length||0,i=new Array(r);for(let l=0;l<r;l++)i[l]=this._encodeObject(e[l]);return new g(`(${i.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let r=e&&((i,l)=>{r=null,e(i,l)});if(this._endStream)try{return this._outputStream.end(r)}catch{}r&&r()}}function O(s){let e=a[s];return void 0===e&&(1===s.length?(e=s.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=(1024*(s.charCodeAt(0)-55296)+s.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}var be=u(58208);const je=Symbol("iter");function Pe(s,e,r=4){if(0===r)return Object.assign(s,e);for(const i in e)s[i]=Pe(s[i]||Object.create(null),e[i],r-1);return s}function Ne(s,e,r=4){let i=!1;for(const l in s)if(l in e){const b=0===r?null:Ne(s[l],e[l],r-1);if(!1!==b)i=i||Object.create(null),i[l]=b;else if(3===r)return!1}return i}function ve(s,e,r=4){let i=!1;for(const l in s)if(l in e){if(0!==r){const b=ve(s[l],e[l],r-1);if(!1!==b)i=i||Object.create(null),i[l]=b;else if(3===r)return!1}}else i=i||Object.create(null),i[l]=0===r?null:Pe({},s[l],r-1);return i}class We{constructor(e={}){this._id=1,this._ids=Object.create(null),this._ids[""]=1,this._entities=Object.create(null),this._entities[1]="",this._blankNodeIndex=0,this._factory=e.factory||p}_termFromId(e){if("."===e[0]){const r=this._entities,i=e.split(".");return this._factory.quad(this._termFromId(r[i[1]]),this._termFromId(r[i[2]]),this._termFromId(r[i[3]]),i[4]&&this._termFromId(r[i[4]]))}return U(e,this._factory)}_termToNumericId(e){if("Quad"===e.termType){const r=this._termToNumericId(e.subject),i=this._termToNumericId(e.predicate),l=this._termToNumericId(e.object);let b;return r&&i&&l&&(Te(e.graph)||(b=this._termToNumericId(e.graph)))&&this._ids[b?`.${r}.${i}.${l}.${b}`:`.${r}.${i}.${l}`]}return this._ids[te(e)]}_termToNewNumericId(e){const r=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${Te(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:te(e);return this._ids[r]||(this._ids[this._entities[++this._id]=r]=this._id)}createBlankNode(e){let r,i;if(e)for(r=e=`_:${e}`,i=1;this._ids[r];)r=e+i++;else do{r="_:b"+this._blankNodeIndex++}while(this._ids[r]);return this._ids[r]=++this._id,this._entities[this._id]=r,this._factory.blankNode(r.substr(2))}}class ke{constructor(e,r){this._size=0,this._graphs=Object.create(null),!r&&e&&!e[0]&&"function"!=typeof e.match&&(r=e,e=null),this._factory=(r=r||{}).factory||p,this._entityIndex=r.entityIndex||new We({factory:this._factory}),this._entities=this._entityIndex._entities,this._termFromId=this._entityIndex._termFromId.bind(this._entityIndex),this._termToNumericId=this._entityIndex._termToNumericId.bind(this._entityIndex),this._termToNewNumericId=this._entityIndex._termToNewNumericId.bind(this._entityIndex),e&&this.addAll(e)}get size(){let e=this._size;if(null!==e)return e;e=0;const r=this._graphs;let i,l;for(const b in r)for(const w in i=r[b].subjects)for(const T in l=i[w])e+=Object.keys(l[T]).length;return this._size=e}_addToIndex(e,r,i,l){const b=e[r]||(e[r]={}),w=b[i]||(b[i]={}),T=l in w;return T||(w[l]=null),!T}_removeFromIndex(e,r,i,l){const b=e[r],w=b[i];delete w[l];for(const T in w)return;delete b[i];for(const T in b)return;delete e[r]}*_findInIndex(e,r,i,l,b,w,T,H){let ue,pe,_e;const Re=this._entities,Me=this._termFromId(Re[H]),we={subject:null,predicate:null,object:null};r&&((ue=e,e={})[r]=ue[r]);for(const Le in e)if(pe=e[Le]){we[b]=this._termFromId(Re[Le]),i&&((ue=pe,pe={})[i]=ue[i]);for(const Oe in pe)if(_e=pe[Oe]){we[w]=this._termFromId(Re[Oe]);const Qe=l?l in _e?[l]:[]:Object.keys(_e);for(let He=0;He<Qe.length;He++)we[T]=this._termFromId(Re[Qe[He]]),yield this._factory.quad(we.subject,we.predicate,we.object,Me)}}}_loop(e,r){for(const i in e)r(i)}_loopByKey0(e,r,i){let l,b;if(l=e[r])for(b in l)i(b)}_loopByKey1(e,r,i){let l,b;for(l in e)b=e[l],b[r]&&i(l)}_loopBy2Keys(e,r,i,l){let b,w,T;if((b=e[r])&&(w=b[i]))for(T in w)l(T)}_countInIndex(e,r,i,l){let w,T,H,b=0;r&&((w=e,e={})[r]=w[r]);for(const ue in e)if(T=e[ue]){i&&((w=T,T={})[i]=w[i]);for(const pe in T)(H=T[pe])&&(l?l in H&&b++:b+=Object.keys(H).length)}return b}_getGraphs(e){return"number"!=typeof(e=""===e?1:e&&(this._termToNumericId(e)||-1))?this._graphs:{[e]:this._graphs[e]}}_uniqueEntities(e){const r=Object.create(null);return i=>{i in r||(r[i]=!0,e(this._termFromId(this._entities[i],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,r,i,l){r||(l=e.graph,i=e.object,r=e.predicate,e=e.subject),l=l?this._termToNewNumericId(l):1;let b=this._graphs[l];return b||(b=this._graphs[l]={subjects:{},predicates:{},objects:{}},Object.freeze(b)),e=this._termToNewNumericId(e),r=this._termToNewNumericId(r),i=this._termToNewNumericId(i),!!this._addToIndex(b.subjects,e,r,i)&&(this._addToIndex(b.predicates,r,i,e),this._addToIndex(b.objects,i,e,r),this._size=null,!0)}addQuads(e){for(let r=0;r<e.length;r++)this.addQuad(e[r])}delete(e){return this.removeQuad(e),this}has(e,r,i,l){return e&&e.subject&&({subject:e,predicate:r,object:i,graph:l}=e),!this.readQuads(e,r,i,l).next().done}import(e){return e.on("data",r=>{this.addQuad(r)}),e}removeQuad(e,r,i,l){r||({subject:e,predicate:r,object:i,graph:l}=e),l=l?this._termToNumericId(l):1;const b=this._graphs;let w,T,H;if(!((e=e&&this._termToNumericId(e))&&(r=r&&this._termToNumericId(r))&&(i=i&&this._termToNumericId(i))&&(w=b[l])&&(T=w.subjects[e])&&(H=T[r])&&i in H))return!1;for(e in this._removeFromIndex(w.subjects,e,r,i),this._removeFromIndex(w.predicates,r,i,e),this._removeFromIndex(w.objects,i,e,r),null!==this._size&&this._size--,w.subjects)return!0;return delete b[l],!0}removeQuads(e){for(let r=0;r<e.length;r++)this.removeQuad(e[r])}remove(e){return e.on("data",r=>{this.removeQuad(r)}),e}removeMatches(e,r,i,l){const b=new be.Readable({objectMode:!0}),w=this.readQuads(e,r,i,l);return b._read=T=>{for(;--T>=0;){const{done:H,value:ue}=w.next();if(H)return void b.push(null);b.push(ue)}},this.remove(b)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,r,i,l){return[...this.readQuads(e,r,i,l)]}*readQuads(e,r,i,l){const b=this._getGraphs(l);let w,T,H,ue;if(!(e&&!(T=this._termToNumericId(e))||r&&!(H=this._termToNumericId(r))||i&&!(ue=this._termToNumericId(i))))for(const pe in b)(w=b[pe])&&(T?ue?yield*this._findInIndex(w.objects,ue,T,H,"object","subject","predicate",pe):yield*this._findInIndex(w.subjects,T,H,null,"subject","predicate","object",pe):H?yield*this._findInIndex(w.predicates,H,ue,null,"predicate","object","subject",pe):ue?yield*this._findInIndex(w.objects,ue,null,null,"object","subject","predicate",pe):yield*this._findInIndex(w.subjects,null,null,null,"subject","predicate","object",pe))}match(e,r,i,l){return new ze(this,e,r,i,l,{entityIndex:this._entityIndex})}countQuads(e,r,i,l){const b=this._getGraphs(l);let T,H,ue,pe,w=0;if(e&&!(H=this._termToNumericId(e))||r&&!(ue=this._termToNumericId(r))||i&&!(pe=this._termToNumericId(i)))return 0;for(const _e in b)(T=b[_e])&&(w+=e?i?this._countInIndex(T.objects,pe,H,ue):this._countInIndex(T.subjects,H,ue,pe):r?this._countInIndex(T.predicates,ue,pe,H):this._countInIndex(T.objects,pe,H,ue));return w}forEach(e,r,i,l,b){this.some(w=>(e(w,this),!1),r,i,l,b)}every(e,r,i,l,b){return!this.some(w=>!e(w,this),r,i,l,b)}some(e,r,i,l,b){for(const w of this.readQuads(r,i,l,b))if(e(w,this))return!0;return!1}getSubjects(e,r,i){const l=[];return this.forSubjects(b=>{l.push(b)},e,r,i),l}forSubjects(e,r,i,l){const b=this._getGraphs(l);let w,T,H;if(e=this._uniqueEntities(e),!(r&&!(T=this._termToNumericId(r))||i&&!(H=this._termToNumericId(i))))for(l in b)(w=b[l])&&(T?H?this._loopBy2Keys(w.predicates,T,H,e):this._loopByKey1(w.subjects,T,e):H?this._loopByKey0(w.objects,H,e):this._loop(w.subjects,e))}getPredicates(e,r,i){const l=[];return this.forPredicates(b=>{l.push(b)},e,r,i),l}forPredicates(e,r,i,l){const b=this._getGraphs(l);let w,T,H;if(e=this._uniqueEntities(e),!(r&&!(T=this._termToNumericId(r))||i&&!(H=this._termToNumericId(i))))for(l in b)(w=b[l])&&(T?H?this._loopBy2Keys(w.objects,H,T,e):this._loopByKey0(w.subjects,T,e):H?this._loopByKey1(w.predicates,H,e):this._loop(w.predicates,e))}getObjects(e,r,i){const l=[];return this.forObjects(b=>{l.push(b)},e,r,i),l}forObjects(e,r,i,l){const b=this._getGraphs(l);let w,T,H;if(e=this._uniqueEntities(e),!(r&&!(T=this._termToNumericId(r))||i&&!(H=this._termToNumericId(i))))for(l in b)(w=b[l])&&(T?H?this._loopBy2Keys(w.subjects,T,H,e):this._loopByKey1(w.objects,T,e):H?this._loopByKey0(w.predicates,H,e):this._loop(w.objects,e))}getGraphs(e,r,i){const l=[];return this.forGraphs(b=>{l.push(b)},e,r,i),l}forGraphs(e,r,i,l){for(const b in this._graphs)this.some(w=>(e(w.graph),!0),r,i,l,this._termFromId(this._entities[b]))}createBlankNode(e){return this._entityIndex.createBlankNode(e)}extractLists({remove:e=!1,ignoreErrors:r=!1}={}){const i={},l=r?()=>!0:(T,H)=>{throw new Error(`${T.value} ${H}`)},b=this.getQuads(null,R.rdf.rest,R.rdf.nil,null),w=e?[...b]:[];return b.forEach(T=>{const H=[];let pe,_e,ue=!1;const Re=T.graph;let Me=T.subject;for(;Me&&!ue;){const we=this.getQuads(null,null,Me,null),Le=this.getQuads(Me,null,null,null);let Oe,Qe=null,He=null,tt=null;for(let Ye=0;Ye<Le.length&&!ue;Ye++)Oe=Le[Ye],Oe.graph.equals(Re)?pe?ue=l(Me,"has non-list arcs out"):Oe.predicate.value===R.rdf.first?Qe?ue=l(Me,"has multiple rdf:first arcs"):w.push(Qe=Oe):Oe.predicate.value===R.rdf.rest?He?ue=l(Me,"has multiple rdf:rest arcs"):w.push(He=Oe):we.length?ue=l(Me,"can't be subject and object"):(pe=Oe,_e="subject"):ue=l(Me,"not confined to single graph");for(let Ye=0;Ye<we.length&&!ue;++Ye)Oe=we[Ye],pe?ue=l(Me,"can't have coreferences"):Oe.predicate.value===R.rdf.rest?tt?ue=l(Me,"has incoming rdf:rest arcs"):tt=Oe:(pe=Oe,_e="object");Qe?H.unshift(Qe.object):ue=l(Me,"has no list head"),Me=tt&&tt.subject}ue?e=!1:pe&&(i[pe[_e].value]=H)}),e&&this.removeQuads(w),i}addAll(e){if(e instanceof ze&&(e=e.filtered),Array.isArray(e))this.addQuads(e);else if(e instanceof ke&&e._entityIndex===this._entityIndex)0!==e._size&&(this._graphs=Pe(this._graphs,e._graphs),this._size=null);else for(const r of e)this.add(r);return this}contains(e){if(e instanceof ze&&(e=e.filtered),e===this)return!0;if(!(e instanceof ke)||this._entityIndex!==e._entityIndex)return e.every(ue=>this.has(ue));const r=this._graphs,i=e._graphs;let l,b,w,T,H;for(const ue in i){if(!(l=r[ue]))return!1;l=l.subjects;for(const pe in b=i[ue].subjects){if(!(w=l[pe]))return!1;for(const _e in T=b[pe]){if(!(H=w[_e]))return!1;for(const Re in T[_e])if(!(Re in H))return!1}}}return!0}deleteMatches(e,r,i,l){for(const b of this.match(e,r,i,l))this.removeQuad(b);return this}difference(e){if(e&&e instanceof ze&&(e=e.filtered),e===this)return new ke({entityIndex:this._entityIndex});if(e instanceof ke&&e._entityIndex===this._entityIndex){const r=new ke({entityIndex:this._entityIndex}),i=ve(this._graphs,e._graphs);return i&&(r._graphs=i,r._size=null),r}return this.filter(r=>!e.has(r))}equals(e){return e instanceof ze&&(e=e.filtered),e===this||this.size===e.size&&this.contains(e)}filter(e){const r=new ke({entityIndex:this._entityIndex});for(const i of this)e(i,this)&&r.add(i);return r}intersection(e){if(e instanceof ze&&(e=e.filtered),e===this){const r=new ke({entityIndex:this._entityIndex});return r._graphs=Pe(Object.create(null),this._graphs),r._size=this._size,r}if(e instanceof ke&&this._entityIndex===e._entityIndex){const r=new ke({entityIndex:this._entityIndex}),i=Ne(e._graphs,this._graphs);return i&&(r._graphs=i,r._size=null),r}return this.filter(r=>e.has(r))}map(e){const r=new ke({entityIndex:this._entityIndex});for(const i of this)r.add(e(i,this));return r}reduce(e,r){const i=this.readQuads();let l=void 0===r?i.next().value:r;for(const b of i)l=e(l,b,this);return l}toArray(){return this.getQuads()}toCanonical(){throw new Error("not implemented")}toStream(){return this.match()}toString(){return(new x).quadsToString(this)}union(e){const r=new ke({entityIndex:this._entityIndex});return r._graphs=Pe(Object.create(null),this._graphs),r._size=this._size,r.addAll(e),r}*[Symbol.iterator](){yield*this.readQuads()}}function Ue(s,e,r=0){const i=e[r];if(i&&!(i in s))return!1;let l=!1;for(const b in i?{[i]:s[i]}:s){const w=2===r?null:Ue(s[b],e,r+1);!1!==w&&(l=l||Object.create(null),l[b]=w)}return l}class ze extends be.Readable{constructor(e,r,i,l,b,w){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:r,predicate:i,object:l,graph:b,options:w})}get filtered(){if(!this._filtered){const{n3Store:e,graph:r,object:i,predicate:l,subject:b}=this,w=this._filtered=new ke({factory:e._factory,entityIndex:this.options.entityIndex});let T,H,ue;if(b&&!(T=w._termToNumericId(b))||l&&!(H=w._termToNumericId(l))||i&&!(ue=w._termToNumericId(i)))return w;const pe=e._getGraphs(r);for(const _e in pe){let Re,Me,we,Le;(Le=pe[_e])&&(!T&&H?(Me=Ue(Le.predicates,[H,ue,T]))&&(Re=Ue(Le.subjects,[T,H,ue]),we=Ue(Le.objects,[ue,T,H])):ue?(we=Ue(Le.objects,[ue,T,H]))&&(Re=Ue(Le.subjects,[T,H,ue]),Me=Ue(Le.predicates,[H,ue,T])):(Re=Ue(Le.subjects,[T,H,ue]))&&(Me=Ue(Le.predicates,[H,ue,T]),we=Ue(Le.objects,[ue,T,H])),Re&&(w._graphs[_e]={subjects:Re,predicates:Me,objects:we}))}w._size=null}return this._filtered}get size(){return this.filtered.size}_read(e){e>0&&!this[je]&&(this[je]=this[Symbol.iterator]());const r=this[je];for(;--e>=0;){const{done:i,value:l}=r.next();if(i)return void this.push(null);this.push(l)}}addAll(e){return this.filtered.addAll(e)}contains(e){return this.filtered.contains(e)}deleteMatches(e,r,i,l){return this.filtered.deleteMatches(e,r,i,l)}difference(e){return this.filtered.difference(e)}equals(e){return this.filtered.equals(e)}every(e,r,i,l,b){return this.filtered.every(e,r,i,l,b)}filter(e){return this.filtered.filter(e)}forEach(e,r,i,l,b){return this.filtered.forEach(e,r,i,l,b)}import(e){return this.filtered.import(e)}intersection(e){return this.filtered.intersection(e)}map(e){return this.filtered.map(e)}some(e,r,i,l,b){return this.filtered.some(e,r,i,l,b)}toCanonical(){return this.filtered.toCanonical()}toStream(){return this._filtered?this._filtered.toStream():this.n3Store.match(this.subject,this.predicate,this.object,this.graph)}union(e){return this._filtered?this._filtered.union(e):this.n3Store.match(this.subject,this.predicate,this.object,this.graph).addAll(e)}toArray(){return this._filtered?this._filtered.toArray():this.n3Store.getQuads(this.subject,this.predicate,this.object,this.graph)}reduce(e,r){return this.filtered.reduce(e,r)}toString(){return(new x).quadsToString(this)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,r,i,l){return new ze(this.filtered,e,r,i,l,this.options)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}class Ke{dataset(e){return new ke(e)}}function Ge(s){const e=[];for(const{subject:r,object:i}of s.match(null,p.namedNode("http://www.w3.org/2000/10/swap/log#implies"),null,p.defaultGraph())){const l=[...s.match(null,null,null,r)],b=[...s.match(null,null,null,i)];e.push({premise:l,conclusion:b})}return e}class Ve{constructor(e){this._store=e}_add(e,r,i,l,b){this._store._addToIndex(l.subjects,e,r,i)&&(this._store._addToIndex(l.predicates,r,i,e),this._store._addToIndex(l.objects,i,e,r),b())}_evaluatePremise(e,r,i,l=0){let b,w,T,H,ue;const[pe,_e,Re]=e.premise[l].value,Me=r[e.premise[l].content],we=!(T=pe.value);for(T in we?Me:{[T]:Me[T]})if(H=Me[T]){for(T in we&&(pe.value=Number(T)),b=!(T=_e.value),b?H:{[T]:H[T]})if(ue=H[T]){for(T in b&&(_e.value=Number(T)),w=!(T=Re.value),w?ue:{[T]:ue[T]})w&&(Re.value=Number(T)),l===e.premise.length-1?e.conclusion.forEach(Le=>{this._add(Le.subject.value,Le.predicate.value,Le.object.value,r,()=>{i(Le)})}):this._evaluatePremise(e,r,i,l+1);w&&(Re.value=null)}b&&(_e.value=null)}we&&(pe.value=null)}_evaluateRules(e,r,i){for(let l=0;l<e.length;l++)this._evaluatePremise(e[l],r,i)}_reasonGraphNaive(e,r){const i=[];function l(T){T.next&&T.next.forEach(H=>{i.push([T.subject.value,T.predicate.value,T.object.value,H])})}const b=T=>{T.forEach(H=>{this._add(H.subject.value,H.predicate.value,H.object.value,r,()=>{l(H)})})};let w;for(this._evaluateRules(e,r,l);void 0!==(w=i.pop());){const[T,H,ue,pe]=w,_e=pe.basePremise.subject.value;_e||(pe.basePremise.subject.value=T);const Re=pe.basePremise.predicate.value;Re||(pe.basePremise.predicate.value=H);const Me=pe.basePremise.object.value;Me||(pe.basePremise.object.value=ue),0===pe.premise.length?b(pe.conclusion):this._evaluatePremise(pe,r,l),_e||(pe.basePremise.subject.value=null),Re||(pe.basePremise.predicate.value=null),Me||(pe.basePremise.object.value=null)}}_createRule({premise:e,conclusion:r}){const i={},l=w=>"Variable"===w.termType?i[w.value]=i[w.value]||{}:{value:this._store._termToNewNumericId(w)},b=w=>({subject:l(w.subject),predicate:l(w.predicate),object:l(w.object)});return{premise:e.map(w=>b(w)),conclusion:r.map(w=>b(w)),variables:Object.values(i)}}reason(e){Array.isArray(e)||(e=Ge(e)),e=e.map(i=>this._createRule(i));for(const i of e)for(const l of e)for(let b=0;b<l.premise.length;b++){const w=l.premise[b];for(const T of i.conclusion){if(Ze(w.subject,T.subject)&&Ze(w.predicate,T.predicate)&&Ze(w.object,T.object)){const H=new Set,ue=[];w.subject.value=w.subject.value||1,w.object.value=w.object.value||1,w.predicate.value=w.predicate.value||1;for(let pe=0;pe<l.premise.length;pe++)pe!==b&&ue.push(Je(l.premise[pe],H));(T.next=T.next||[]).push({premise:ue,conclusion:l.conclusion,basePremise:w})}l.variables.forEach(H=>{H.value=null})}}for(const i of e){const l=new Set;i.premise=i.premise.map(b=>Je(b,l))}const r=this._store._getGraphs();for(const i in r)this._reasonGraphNaive(e,r[i]);this._store._size=null}}function Je({subject:s,predicate:e,object:r},i){const l=s.value||i.has(s)||(i.add(s),!1),b=e.value||i.has(e)||(i.add(e),!1),w=r.value||i.has(r)||(i.add(r),!1);return!l&&b?{content:"predicates",value:[e,r,s]}:w?{content:"objects",value:[r,s,e]}:{content:"subjects",value:[s,e,r]}}function Ze(s,e){return null===s.value&&(s.value=e.value),s.value===e.value}class qe extends be.Transform{constructor(e){super({decodeStrings:!0}),this._readableState.objectMode=!0;const r=new Ee(e);let i,l;const b={onQuad:(w,T)=>{w&&this.emit("error",w)||T&&this.push(T)},onPrefix:(w,T)=>{this.emit("prefix",w,T)}};e&&e.comments&&(b.onComment=w=>{this.emit("comment",w)}),r.parse({on:(w,T)=>{switch(w){case"data":i=T;break;case"end":l=T}}},b),this._transform=(w,T,H)=>{i(w),H()},this._flush=w=>{l(),w()}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),this}}class Xe extends be.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const r=this._writer=new x({write:(i,l,b)=>{this.push(i),b&&b()},end:i=>{this.push(null),i&&i()}},e);this._transform=(i,l,b)=>{r.addQuad(i,b)},this._flush=i=>{r.end(i)}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),e.on("prefix",(r,i)=>{this._writer.addPrefix(r,i)}),this}}const et={Lexer:B,Parser:Ee,Writer:x,Store:ke,StoreFactory:Ke,EntityIndex:We,StreamParser:qe,StreamWriter:Xe,Util:_,Reasoner:Ve,BaseIRI:ae,DataFactory:p,Term:E,NamedNode:v,Literal:K,BlankNode:de,Variable:ee,DefaultGraph:me,Quad:Y,Triple:Y,termFromId:U,termToId:te}},40573(re){var u,_,ne=re.exports={};function C(){throw new Error("setTimeout has not been defined")}function F(){throw new Error("clearTimeout has not been defined")}function j($){if(u===setTimeout)return setTimeout($,0);if((u===C||!u)&&setTimeout)return u=setTimeout,setTimeout($,0);try{return u($,0)}catch{try{return u.call(null,$,0)}catch{return u.call(this,$,0)}}}!function(){try{u="function"==typeof setTimeout?setTimeout:C}catch{u=C}try{_="function"==typeof clearTimeout?clearTimeout:F}catch{_=F}}();var L,R=[],c=!1,X=-1;function k(){!c||!L||(c=!1,L.length?R=L.concat(R):X=-1,R.length&&N())}function N(){if(!c){var $=j(k);c=!0;for(var V=R.length;V;){for(L=R,R=[];++X<V;)L&&L[X].run();X=-1,V=R.length}L=null,c=!1,function D($){if(_===clearTimeout)return clearTimeout($);if((_===F||!_)&&clearTimeout)return _=clearTimeout,clearTimeout($);try{return _($)}catch{try{return _.call(null,$)}catch{return _.call(this,$)}}}($)}}function z($,V){this.fun=$,this.array=V}function B(){}ne.nextTick=function($){var V=new Array(arguments.length-1);if(arguments.length>1)for(var q=1;q<arguments.length;q++)V[q-1]=arguments[q];R.push(new z($,V)),1===R.length&&!c&&j(N)},z.prototype.run=function(){this.fun.apply(null,this.array)},ne.title="browser",ne.browser=!0,ne.env={},ne.argv=[],ne.version="",ne.versions={},ne.on=B,ne.addListener=B,ne.once=B,ne.off=B,ne.removeListener=B,ne.removeAllListeners=B,ne.emit=B,ne.prependListener=B,ne.prependOnceListener=B,ne.listeners=function($){return[]},ne.binding=function($){throw new Error("process.binding is not supported")},ne.cwd=function(){return"/"},ne.chdir=function($){throw new Error("process.chdir is not supported")},ne.umask=function(){return 0}},93513(re,ne,u){var _=u(25172);re.exports=function C(F){var j={},D=!1;function R(c,L){return D=!0,L=new Promise(function(X){X(F[c](L))}),{done:!1,value:new _(L,1)}}return j[typeof Symbol<"u"&&Symbol.iterator||"@@iterator"]=function(){return this},j.next=function(c){return D?(D=!1,c):R("next",c)},"function"==typeof F.throw&&(j.throw=function(c){if(D)throw D=!1,c;return R("throw",c)}),"function"==typeof F.return&&(j.return=function(c){return D?(D=!1,c):R("return",c)}),j},re.exports.__esModule=!0,re.exports.default=re.exports},82881(re){function u(_){function C(F){if(Object(F)!==F)return Promise.reject(new TypeError(F+" is not an object."));var j=F.done;return Promise.resolve(F.value).then(function(D){return{value:D,done:j}})}return(u=function(j){this.s=j,this.n=j.next}).prototype={s:null,n:null,next:function(){return C(this.n.apply(this.s,arguments))},return:function(j){var D=this.s.return;return void 0===D?Promise.resolve({value:j,done:!0}):C(D.apply(this.s,arguments))},throw:function(j){var D=this.s.return;return void 0===D?Promise.reject(j):C(D.apply(this.s,arguments))}},new u(_)}re.exports=function ne(_){var C,F,j,D=2;for(typeof Symbol<"u"&&(F=Symbol.asyncIterator,j=Symbol.iterator);D--;){if(F&&null!=(C=_[F]))return C.call(_);if(j&&null!=(C=_[j]))return new u(C.call(_));F="@@asyncIterator",j="@@iterator"}throw new TypeError("Object is not async iterable")},re.exports.__esModule=!0,re.exports.default=re.exports}}]);