image-exporter
Version:
Easily download one or more DOM elements as images
2 lines • 260 kB
JavaScript
(()=>{var vX=Object.create;var{getPrototypeOf:xX,defineProperty:b1,getOwnPropertyNames:D4,getOwnPropertyDescriptor:gX}=Object,A4=Object.prototype.hasOwnProperty;var yX=(Q,J,$)=>{$=Q!=null?vX(xX(Q)):{};let X=J||!Q||!Q.__esModule?b1($,"default",{value:Q,enumerable:!0}):$;for(let K of D4(Q))if(!A4.call(X,K))b1(X,K,{get:()=>Q[K],enumerable:!0});return X},C4=new WeakMap,u0=(Q)=>{var J=C4.get(Q),$;if(J)return J;if(J=b1({},"__esModule",{value:!0}),Q&&typeof Q==="object"||typeof Q==="function")D4(Q).map((X)=>!A4.call(J,X)&&b1(J,X,{get:()=>Q[X],enumerable:!($=gX(Q,X))||$.enumerable}));return C4.set(Q,J),J},B0=(Q,J)=>()=>(J||Q((J={exports:{}}).exports,J),J.exports);var R8=(Q,J)=>{for(var $ in J)b1(Q,$,{get:J[$],enumerable:!0,configurable:!0,set:(X)=>J[$]=()=>X})};var R4=(Q,J)=>()=>(Q&&(J=Q(Q=0)),J);var M2={};R8(M2,{transcode:()=>fY,resolveObjectURL:()=>gY,kStringMaxLength:()=>W7,kMaxLength:()=>d1,isUtf8:()=>yY,isAscii:()=>hY,default:()=>_Y,constants:()=>BY,btoa:()=>KY,atob:()=>YY,INSPECT_MAX_BYTES:()=>Z7,File:()=>VY,Buffer:()=>y,Blob:()=>qY});function eK(Q){var J=Q.length;if(J%4>0)throw Error("Invalid string. Length must be a multiple of 4");var $=Q.indexOf("=");if($===-1)$=J;var X=$===J?0:4-$%4;return[$,X]}function QY(Q,J){return(Q+J)*3/4-J}function JY(Q){var J,$=eK(Q),X=$[0],K=$[1],Y=new Uint8Array(QY(X,K)),V=0,q=K>0?X-4:X,U;for(U=0;U<q;U+=4)J=n0[Q.charCodeAt(U)]<<18|n0[Q.charCodeAt(U+1)]<<12|n0[Q.charCodeAt(U+2)]<<6|n0[Q.charCodeAt(U+3)],Y[V++]=J>>16&255,Y[V++]=J>>8&255,Y[V++]=J&255;if(K===2)J=n0[Q.charCodeAt(U)]<<2|n0[Q.charCodeAt(U+1)]>>4,Y[V++]=J&255;if(K===1)J=n0[Q.charCodeAt(U)]<<10|n0[Q.charCodeAt(U+1)]<<4|n0[Q.charCodeAt(U+2)]>>2,Y[V++]=J>>8&255,Y[V++]=J&255;return Y}function $Y(Q){return Y2[Q>>18&63]+Y2[Q>>12&63]+Y2[Q>>6&63]+Y2[Q&63]}function XY(Q,J,$){var X,K=[];for(var Y=J;Y<$;Y+=3)X=(Q[Y]<<16&16711680)+(Q[Y+1]<<8&65280)+(Q[Y+2]&255),K.push($Y(X));return K.join("")}function V7(Q){var J,$=Q.length,X=$%3,K=[],Y=16383;for(var V=0,q=$-X;V<q;V+=Y)K.push(XY(Q,V,V+Y>q?q:V+Y));if(X===1)J=Q[$-1],K.push(Y2[J>>2]+Y2[J<<4&63]+"==");else if(X===2)J=(Q[$-2]<<8)+Q[$-1],K.push(Y2[J>>10]+Y2[J>>4&63]+Y2[J<<2&63]+"=");return K.join("")}function E6(Q,J,$,X,K){var Y,V,q=K*8-X-1,U=(1<<q)-1,G=U>>1,B=-7,j=$?K-1:0,W=$?-1:1,H=Q[J+j];j+=W,Y=H&(1<<-B)-1,H>>=-B,B+=q;for(;B>0;Y=Y*256+Q[J+j],j+=W,B-=8);V=Y&(1<<-B)-1,Y>>=-B,B+=X;for(;B>0;V=V*256+Q[J+j],j+=W,B-=8);if(Y===0)Y=1-G;else if(Y===U)return V?NaN:(H?-1:1)*(1/0);else V=V+Math.pow(2,X),Y=Y-G;return(H?-1:1)*V*Math.pow(2,Y-X)}function z7(Q,J,$,X,K,Y){var V,q,U,G=Y*8-K-1,B=(1<<G)-1,j=B>>1,W=K===23?Math.pow(2,-24)-Math.pow(2,-77):0,H=X?0:Y-1,S=X?1:-1,A=J<0||J===0&&1/J<0?1:0;if(J=Math.abs(J),isNaN(J)||J===1/0)q=isNaN(J)?1:0,V=B;else{if(V=Math.floor(Math.log(J)/Math.LN2),J*(U=Math.pow(2,-V))<1)V--,U*=2;if(V+j>=1)J+=W/U;else J+=W*Math.pow(2,1-j);if(J*U>=2)V++,U/=2;if(V+j>=B)q=0,V=B;else if(V+j>=1)q=(J*U-1)*Math.pow(2,K),V=V+j;else q=J*Math.pow(2,j-1)*Math.pow(2,K),V=0}for(;K>=8;Q[$+H]=q&255,H+=S,q/=256,K-=8);V=V<<K|q,G+=K;for(;G>0;Q[$+H]=V&255,H+=S,V/=256,G-=8);Q[$+H-S]|=A*128}function P2(Q){if(Q>d1)throw RangeError('The value "'+Q+'" is invalid for option "size"');let J=new Uint8Array(Q);return Object.setPrototypeOf(J,y.prototype),J}function u8(Q,J,$){return class extends ${constructor(){super();Object.defineProperty(this,"message",{value:J.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Q}]`,this.stack,delete this.name}get code(){return Q}set code(X){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:X,writable:!0})}toString(){return`${this.name} [${Q}]: ${this.message}`}}}function y(Q,J,$){if(typeof Q==="number"){if(typeof J==="string")throw TypeError('The "string" argument must be of type string. Received type number');return p8(Q)}return H7(Q,J,$)}function H7(Q,J,$){if(typeof Q==="string")return ZY(Q,J);if(ArrayBuffer.isView(Q))return WY(Q);if(Q==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if(V2(Q,ArrayBuffer)||Q&&V2(Q.buffer,ArrayBuffer))return _8(Q,J,$);if(typeof SharedArrayBuffer<"u"&&(V2(Q,SharedArrayBuffer)||Q&&V2(Q.buffer,SharedArrayBuffer)))return _8(Q,J,$);if(typeof Q==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let X=Q.valueOf&&Q.valueOf();if(X!=null&&X!==Q)return y.from(X,J,$);let K=HY(Q);if(K)return K;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]==="function")return y.from(Q[Symbol.toPrimitive]("string"),J,$);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}function j7(Q){if(typeof Q!=="number")throw TypeError('"size" argument must be of type number');else if(Q<0)throw RangeError('The value "'+Q+'" is invalid for option "size"')}function zY(Q,J,$){if(j7(Q),Q<=0)return P2(Q);if(J!==void 0)return typeof $==="string"?P2(Q).fill(J,$):P2(Q).fill(J);return P2(Q)}function p8(Q){return j7(Q),P2(Q<0?0:c8(Q)|0)}function ZY(Q,J){if(typeof J!=="string"||J==="")J="utf8";if(!y.isEncoding(J))throw TypeError("Unknown encoding: "+J);let $=P7(Q,J)|0,X=P2($),K=X.write(Q,J);if(K!==$)X=X.slice(0,K);return X}function f8(Q){let J=Q.length<0?0:c8(Q.length)|0,$=P2(J);for(let X=0;X<J;X+=1)$[X]=Q[X]&255;return $}function WY(Q){if(V2(Q,Uint8Array)){let J=new Uint8Array(Q);return _8(J.buffer,J.byteOffset,J.byteLength)}return f8(Q)}function _8(Q,J,$){if(J<0||Q.byteLength<J)throw RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<J+($||0))throw RangeError('"length" is outside of buffer bounds');let X;if(J===void 0&&$===void 0)X=new Uint8Array(Q);else if($===void 0)X=new Uint8Array(Q,J);else X=new Uint8Array(Q,J,$);return Object.setPrototypeOf(X,y.prototype),X}function HY(Q){if(y.isBuffer(Q)){let J=c8(Q.length)|0,$=P2(J);if($.length===0)return $;return Q.copy($,0,0,J),$}if(Q.length!==void 0){if(typeof Q.length!=="number"||Number.isNaN(Q.length))return P2(0);return f8(Q)}if(Q.type==="Buffer"&&Array.isArray(Q.data))return f8(Q.data)}function c8(Q){if(Q>=d1)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d1.toString(16)+" bytes");return Q|0}function P7(Q,J){if(y.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||V2(Q,ArrayBuffer))return Q.byteLength;if(typeof Q!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);let $=Q.length,X=arguments.length>2&&arguments[2]===!0;if(!X&&$===0)return 0;let K=!1;for(;;)switch(J){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return b8(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return D7(Q).length;default:if(K)return X?-1:b8(Q).length;J=(""+J).toLowerCase(),K=!0}}function jY(Q,J,$){let X=!1;if(J===void 0||J<0)J=0;if(J>this.length)return"";if($===void 0||$>this.length)$=this.length;if($<=0)return"";if($>>>=0,J>>>=0,$<=J)return"";if(!Q)Q="utf8";while(!0)switch(Q){case"hex":return DY(this,J,$);case"utf8":case"utf-8":return L7(this,J,$);case"ascii":return OY(this,J,$);case"latin1":case"binary":return CY(this,J,$);case"base64":return IY(this,J,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return AY(this,J,$);default:if(X)throw TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),X=!0}}function i2(Q,J,$){let X=Q[J];Q[J]=Q[$],Q[$]=X}function M7(Q,J,$,X,K){if(Q.length===0)return-1;if(typeof $==="string")X=$,$=0;else if($>2147483647)$=2147483647;else if($<-2147483648)$=-2147483648;if($=+$,Number.isNaN($))$=K?0:Q.length-1;if($<0)$=Q.length+$;if($>=Q.length)if(K)return-1;else $=Q.length-1;else if($<0)if(K)$=0;else return-1;if(typeof J==="string")J=y.from(J,X);if(y.isBuffer(J)){if(J.length===0)return-1;return B7(Q,J,$,X,K)}else if(typeof J==="number"){if(J=J&255,typeof Uint8Array.prototype.indexOf==="function")if(K)return Uint8Array.prototype.indexOf.call(Q,J,$);else return Uint8Array.prototype.lastIndexOf.call(Q,J,$);return B7(Q,[J],$,X,K)}throw TypeError("val must be string, number or Buffer")}function B7(Q,J,$,X,K){let Y=1,V=Q.length,q=J.length;if(X!==void 0){if(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le"){if(Q.length<2||J.length<2)return-1;Y=2,V/=2,q/=2,$/=2}}function U(B,j){if(Y===1)return B[j];else return B.readUInt16BE(j*Y)}let G;if(K){let B=-1;for(G=$;G<V;G++)if(U(Q,G)===U(J,B===-1?0:G-B)){if(B===-1)B=G;if(G-B+1===q)return B*Y}else{if(B!==-1)G-=G-B;B=-1}}else{if($+q>V)$=V-q;for(G=$;G>=0;G--){let B=!0;for(let j=0;j<q;j++)if(U(Q,G+j)!==U(J,j)){B=!1;break}if(B)return G}}return-1}function PY(Q,J,$,X){$=Number($)||0;let K=Q.length-$;if(!X)X=K;else if(X=Number(X),X>K)X=K;let Y=J.length;if(X>Y/2)X=Y/2;let V;for(V=0;V<X;++V){let q=parseInt(J.substr(V*2,2),16);if(Number.isNaN(q))return V;Q[$+V]=q}return V}function MY(Q,J,$,X){return S6(b8(J,Q.length-$),Q,$,X)}function LY(Q,J,$,X){return S6(EY(J),Q,$,X)}function FY(Q,J,$,X){return S6(D7(J),Q,$,X)}function wY(Q,J,$,X){return S6(SY(J,Q.length-$),Q,$,X)}function IY(Q,J,$){if(J===0&&$===Q.length)return V7(Q);else return V7(Q.slice(J,$))}function L7(Q,J,$){$=Math.min(Q.length,$);let X=[],K=J;while(K<$){let Y=Q[K],V=null,q=Y>239?4:Y>223?3:Y>191?2:1;if(K+q<=$){let U,G,B,j;switch(q){case 1:if(Y<128)V=Y;break;case 2:if(U=Q[K+1],(U&192)===128){if(j=(Y&31)<<6|U&63,j>127)V=j}break;case 3:if(U=Q[K+1],G=Q[K+2],(U&192)===128&&(G&192)===128){if(j=(Y&15)<<12|(U&63)<<6|G&63,j>2047&&(j<55296||j>57343))V=j}break;case 4:if(U=Q[K+1],G=Q[K+2],B=Q[K+3],(U&192)===128&&(G&192)===128&&(B&192)===128){if(j=(Y&15)<<18|(U&63)<<12|(G&63)<<6|B&63,j>65535&&j<1114112)V=j}}}if(V===null)V=65533,q=1;else if(V>65535)V-=65536,X.push(V>>>10&1023|55296),V=56320|V&1023;X.push(V),K+=q}return NY(X)}function NY(Q){let J=Q.length;if(J<=G7)return String.fromCharCode.apply(String,Q);let $="",X=0;while(X<J)$+=String.fromCharCode.apply(String,Q.slice(X,X+=G7));return $}function OY(Q,J,$){let X="";$=Math.min(Q.length,$);for(let K=J;K<$;++K)X+=String.fromCharCode(Q[K]&127);return X}function CY(Q,J,$){let X="";$=Math.min(Q.length,$);for(let K=J;K<$;++K)X+=String.fromCharCode(Q[K]);return X}function DY(Q,J,$){let X=Q.length;if(!J||J<0)J=0;if(!$||$<0||$>X)$=X;let K="";for(let Y=J;Y<$;++Y)K+=vY[Q[Y]];return K}function AY(Q,J,$){let X=Q.slice(J,$),K="";for(let Y=0;Y<X.length-1;Y+=2)K+=String.fromCharCode(X[Y]+X[Y+1]*256);return K}function T0(Q,J,$){if(Q%1!==0||Q<0)throw RangeError("offset is not uint");if(Q+J>$)throw RangeError("Trying to access beyond buffer length")}function f0(Q,J,$,X,K,Y){if(!y.isBuffer(Q))throw TypeError('"buffer" argument must be a Buffer instance');if(J>K||J<Y)throw RangeError('"value" argument is out of bounds');if($+X>Q.length)throw RangeError("Index out of range")}function F7(Q,J,$,X,K){C7(J,X,K,Q,$,7);let Y=Number(J&BigInt(4294967295));Q[$++]=Y,Y=Y>>8,Q[$++]=Y,Y=Y>>8,Q[$++]=Y,Y=Y>>8,Q[$++]=Y;let V=Number(J>>BigInt(32)&BigInt(4294967295));return Q[$++]=V,V=V>>8,Q[$++]=V,V=V>>8,Q[$++]=V,V=V>>8,Q[$++]=V,$}function w7(Q,J,$,X,K){C7(J,X,K,Q,$,7);let Y=Number(J&BigInt(4294967295));Q[$+7]=Y,Y=Y>>8,Q[$+6]=Y,Y=Y>>8,Q[$+5]=Y,Y=Y>>8,Q[$+4]=Y;let V=Number(J>>BigInt(32)&BigInt(4294967295));return Q[$+3]=V,V=V>>8,Q[$+2]=V,V=V>>8,Q[$+1]=V,V=V>>8,Q[$]=V,$+8}function I7(Q,J,$,X,K,Y){if($+X>Q.length)throw RangeError("Index out of range");if($<0)throw RangeError("Index out of range")}function N7(Q,J,$,X,K){if(J=+J,$=$>>>0,!K)I7(Q,J,$,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return z7(Q,J,$,X,23,4),$+4}function O7(Q,J,$,X,K){if(J=+J,$=$>>>0,!K)I7(Q,J,$,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return z7(Q,J,$,X,52,8),$+8}function U7(Q){let J="",$=Q.length,X=Q[0]==="-"?1:0;for(;$>=X+4;$-=3)J=`_${Q.slice($-3,$)}${J}`;return`${Q.slice(0,$)}${J}`}function RY(Q,J,$){if(H1(J,"offset"),Q[J]===void 0||Q[J+$]===void 0)l1(J,Q.length-($+1))}function C7(Q,J,$,X,K,Y){if(Q>$||Q<J){let V=typeof J==="bigint"?"n":"",q;if(Y>3)if(J===0||J===BigInt(0))q=`>= 0${V} and < 2${V} ** ${(Y+1)*8}${V}`;else q=`>= -(2${V} ** ${(Y+1)*8-1}${V}) and < 2 ** ${(Y+1)*8-1}${V}`;else q=`>= ${J}${V} and <= ${$}${V}`;throw new h8("value",q,Q)}RY(X,K,Y)}function H1(Q,J){if(typeof Q!=="number")throw new UY(J,"number",Q)}function l1(Q,J,$){if(Math.floor(Q)!==Q)throw H1(Q,$),new h8($||"offset","an integer",Q);if(J<0)throw new GY;throw new h8($||"offset",`>= ${$?1:0} and <= ${J}`,Q)}function kY(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace(TY,""),Q.length<2)return"";while(Q.length%4!==0)Q=Q+"=";return Q}function b8(Q,J){J=J||1/0;let $,X=Q.length,K=null,Y=[];for(let V=0;V<X;++V){if($=Q.charCodeAt(V),$>55295&&$<57344){if(!K){if($>56319){if((J-=3)>-1)Y.push(239,191,189);continue}else if(V+1===X){if((J-=3)>-1)Y.push(239,191,189);continue}K=$;continue}if($<56320){if((J-=3)>-1)Y.push(239,191,189);K=$;continue}$=(K-55296<<10|$-56320)+65536}else if(K){if((J-=3)>-1)Y.push(239,191,189)}if(K=null,$<128){if((J-=1)<0)break;Y.push($)}else if($<2048){if((J-=2)<0)break;Y.push($>>6|192,$&63|128)}else if($<65536){if((J-=3)<0)break;Y.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((J-=4)<0)break;Y.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw Error("Invalid code point")}return Y}function EY(Q){let J=[];for(let $=0;$<Q.length;++$)J.push(Q.charCodeAt($)&255);return J}function SY(Q,J){let $,X,K,Y=[];for(let V=0;V<Q.length;++V){if((J-=2)<0)break;$=Q.charCodeAt(V),X=$>>8,K=$%256,Y.push(K),Y.push(X)}return Y}function D7(Q){return JY(kY(Q))}function S6(Q,J,$,X){let K;for(K=0;K<X;++K){if(K+$>=J.length||K>=Q.length)break;J[K+$]=Q[K]}return K}function V2(Q,J){return Q instanceof J||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===J.name}function R2(Q){return typeof BigInt>"u"?xY:Q}function xY(){throw Error("BigInt not supported")}function m8(Q){return()=>{throw Error(Q+" is not implemented for node:buffer browser polyfill")}}var Y2,n0,y8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l2,Y7,q7,Z7=50,d1=2147483647,W7=536870888,KY,YY,VY,qY,BY,GY,UY,h8,G7=4096,TY,vY,gY,yY,hY=(Q)=>{for(let J of Q)if(J.charCodeAt(0)>127)return!1;return!0},fY,_Y;var L2=R4(()=>{Y2=[],n0=[];for(l2=0,Y7=y8.length;l2<Y7;++l2)Y2[l2]=y8[l2],n0[y8.charCodeAt(l2)]=l2;n0[45]=62;n0[95]=63;q7=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,KY=globalThis.btoa,YY=globalThis.atob,VY=globalThis.File,qY=globalThis.Blob,BY={MAX_LENGTH:d1,MAX_STRING_LENGTH:W7};GY=u8("ERR_BUFFER_OUT_OF_BOUNDS",function(Q){if(Q)return`${Q} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),UY=u8("ERR_INVALID_ARG_TYPE",function(Q,J){return`The "${Q}" argument must be of type number. Received type ${typeof J}`},TypeError),h8=u8("ERR_OUT_OF_RANGE",function(Q,J,$){let X=`The value of "${Q}" is out of range.`,K=$;if(Number.isInteger($)&&Math.abs($)>4294967296)K=U7(String($));else if(typeof $==="bigint"){if(K=String($),$>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))K=U7(K);K+="n"}return X+=` It must be ${J}. Received ${K}`,X},RangeError);Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(!y.isBuffer(this))return;return this.buffer}});Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(!y.isBuffer(this))return;return this.byteOffset}});y.poolSize=8192;y.from=function(Q,J,$){return H7(Q,J,$)};Object.setPrototypeOf(y.prototype,Uint8Array.prototype);Object.setPrototypeOf(y,Uint8Array);y.alloc=function(Q,J,$){return zY(Q,J,$)};y.allocUnsafe=function(Q){return p8(Q)};y.allocUnsafeSlow=function(Q){return p8(Q)};y.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==y.prototype};y.compare=function(Q,J){if(V2(Q,Uint8Array))Q=y.from(Q,Q.offset,Q.byteLength);if(V2(J,Uint8Array))J=y.from(J,J.offset,J.byteLength);if(!y.isBuffer(Q)||!y.isBuffer(J))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===J)return 0;let $=Q.length,X=J.length;for(let K=0,Y=Math.min($,X);K<Y;++K)if(Q[K]!==J[K]){$=Q[K],X=J[K];break}if($<X)return-1;if(X<$)return 1;return 0};y.isEncoding=function(Q){switch(String(Q).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}};y.concat=function(Q,J){if(!Array.isArray(Q))throw TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return y.alloc(0);let $;if(J===void 0){J=0;for($=0;$<Q.length;++$)J+=Q[$].length}let X=y.allocUnsafe(J),K=0;for($=0;$<Q.length;++$){let Y=Q[$];if(V2(Y,Uint8Array))if(K+Y.length>X.length){if(!y.isBuffer(Y))Y=y.from(Y);Y.copy(X,K)}else Uint8Array.prototype.set.call(X,Y,K);else if(!y.isBuffer(Y))throw TypeError('"list" argument must be an Array of Buffers');else Y.copy(X,K);K+=Y.length}return X};y.byteLength=P7;y.prototype._isBuffer=!0;y.prototype.swap16=function(){let Q=this.length;if(Q%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let J=0;J<Q;J+=2)i2(this,J,J+1);return this};y.prototype.swap32=function(){let Q=this.length;if(Q%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let J=0;J<Q;J+=4)i2(this,J,J+3),i2(this,J+1,J+2);return this};y.prototype.swap64=function(){let Q=this.length;if(Q%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let J=0;J<Q;J+=8)i2(this,J,J+7),i2(this,J+1,J+6),i2(this,J+2,J+5),i2(this,J+3,J+4);return this};y.prototype.toString=function(){let Q=this.length;if(Q===0)return"";if(arguments.length===0)return L7(this,0,Q);return jY.apply(this,arguments)};y.prototype.toLocaleString=y.prototype.toString;y.prototype.equals=function(Q){if(!y.isBuffer(Q))throw TypeError("Argument must be a Buffer");if(this===Q)return!0;return y.compare(this,Q)===0};y.prototype.inspect=function(){let Q="",J=Z7;if(Q=this.toString("hex",0,J).replace(/(.{2})/g,"$1 ").trim(),this.length>J)Q+=" ... ";return"<Buffer "+Q+">"};if(q7)y.prototype[q7]=y.prototype.inspect;y.prototype.compare=function(Q,J,$,X,K){if(V2(Q,Uint8Array))Q=y.from(Q,Q.offset,Q.byteLength);if(!y.isBuffer(Q))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(J===void 0)J=0;if($===void 0)$=Q?Q.length:0;if(X===void 0)X=0;if(K===void 0)K=this.length;if(J<0||$>Q.length||X<0||K>this.length)throw RangeError("out of range index");if(X>=K&&J>=$)return 0;if(X>=K)return-1;if(J>=$)return 1;if(J>>>=0,$>>>=0,X>>>=0,K>>>=0,this===Q)return 0;let Y=K-X,V=$-J,q=Math.min(Y,V),U=this.slice(X,K),G=Q.slice(J,$);for(let B=0;B<q;++B)if(U[B]!==G[B]){Y=U[B],V=G[B];break}if(Y<V)return-1;if(V<Y)return 1;return 0};y.prototype.includes=function(Q,J,$){return this.indexOf(Q,J,$)!==-1};y.prototype.indexOf=function(Q,J,$){return M7(this,Q,J,$,!0)};y.prototype.lastIndexOf=function(Q,J,$){return M7(this,Q,J,$,!1)};y.prototype.write=function(Q,J,$,X){if(J===void 0)X="utf8",$=this.length,J=0;else if($===void 0&&typeof J==="string")X=J,$=this.length,J=0;else if(isFinite(J))if(J=J>>>0,isFinite($)){if($=$>>>0,X===void 0)X="utf8"}else X=$,$=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let K=this.length-J;if($===void 0||$>K)$=K;if(Q.length>0&&($<0||J<0)||J>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!X)X="utf8";let Y=!1;for(;;)switch(X){case"hex":return PY(this,Q,J,$);case"utf8":case"utf-8":return MY(this,Q,J,$);case"ascii":case"latin1":case"binary":return LY(this,Q,J,$);case"base64":return FY(this,Q,J,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wY(this,Q,J,$);default:if(Y)throw TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),Y=!0}};y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};y.prototype.slice=function(Q,J){let $=this.length;if(Q=~~Q,J=J===void 0?$:~~J,Q<0){if(Q+=$,Q<0)Q=0}else if(Q>$)Q=$;if(J<0){if(J+=$,J<0)J=0}else if(J>$)J=$;if(J<Q)J=Q;let X=this.subarray(Q,J);return Object.setPrototypeOf(X,y.prototype),X};y.prototype.readUintLE=y.prototype.readUIntLE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)T0(Q,J,this.length);let X=this[Q],K=1,Y=0;while(++Y<J&&(K*=256))X+=this[Q+Y]*K;return X};y.prototype.readUintBE=y.prototype.readUIntBE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)T0(Q,J,this.length);let X=this[Q+--J],K=1;while(J>0&&(K*=256))X+=this[Q+--J]*K;return X};y.prototype.readUint8=y.prototype.readUInt8=function(Q,J){if(Q=Q>>>0,!J)T0(Q,1,this.length);return this[Q]};y.prototype.readUint16LE=y.prototype.readUInt16LE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,2,this.length);return this[Q]|this[Q+1]<<8};y.prototype.readUint16BE=y.prototype.readUInt16BE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,2,this.length);return this[Q]<<8|this[Q+1]};y.prototype.readUint32LE=y.prototype.readUInt32LE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,4,this.length);return(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216};y.prototype.readUint32BE=y.prototype.readUInt32BE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,4,this.length);return this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])};y.prototype.readBigUInt64LE=R2(function(Q){Q=Q>>>0,H1(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)l1(Q,this.length-8);let X=J+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216,K=this[++Q]+this[++Q]*256+this[++Q]*65536+$*16777216;return BigInt(X)+(BigInt(K)<<BigInt(32))});y.prototype.readBigUInt64BE=R2(function(Q){Q=Q>>>0,H1(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)l1(Q,this.length-8);let X=J*16777216+this[++Q]*65536+this[++Q]*256+this[++Q],K=this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+$;return(BigInt(X)<<BigInt(32))+BigInt(K)});y.prototype.readIntLE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)T0(Q,J,this.length);let X=this[Q],K=1,Y=0;while(++Y<J&&(K*=256))X+=this[Q+Y]*K;if(K*=128,X>=K)X-=Math.pow(2,8*J);return X};y.prototype.readIntBE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)T0(Q,J,this.length);let X=J,K=1,Y=this[Q+--X];while(X>0&&(K*=256))Y+=this[Q+--X]*K;if(K*=128,Y>=K)Y-=Math.pow(2,8*J);return Y};y.prototype.readInt8=function(Q,J){if(Q=Q>>>0,!J)T0(Q,1,this.length);if(!(this[Q]&128))return this[Q];return(255-this[Q]+1)*-1};y.prototype.readInt16LE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,2,this.length);let $=this[Q]|this[Q+1]<<8;return $&32768?$|4294901760:$};y.prototype.readInt16BE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,2,this.length);let $=this[Q+1]|this[Q]<<8;return $&32768?$|4294901760:$};y.prototype.readInt32LE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,4,this.length);return this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24};y.prototype.readInt32BE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,4,this.length);return this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]};y.prototype.readBigInt64LE=R2(function(Q){Q=Q>>>0,H1(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)l1(Q,this.length-8);let X=this[Q+4]+this[Q+5]*256+this[Q+6]*65536+($<<24);return(BigInt(X)<<BigInt(32))+BigInt(J+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216)});y.prototype.readBigInt64BE=R2(function(Q){Q=Q>>>0,H1(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)l1(Q,this.length-8);let X=(J<<24)+this[++Q]*65536+this[++Q]*256+this[++Q];return(BigInt(X)<<BigInt(32))+BigInt(this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+$)});y.prototype.readFloatLE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,4,this.length);return E6(this,Q,!0,23,4)};y.prototype.readFloatBE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,4,this.length);return E6(this,Q,!1,23,4)};y.prototype.readDoubleLE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,8,this.length);return E6(this,Q,!0,52,8)};y.prototype.readDoubleBE=function(Q,J){if(Q=Q>>>0,!J)T0(Q,8,this.length);return E6(this,Q,!1,52,8)};y.prototype.writeUintLE=y.prototype.writeUIntLE=function(Q,J,$,X){if(Q=+Q,J=J>>>0,$=$>>>0,!X){let V=Math.pow(2,8*$)-1;f0(this,Q,J,$,V,0)}let K=1,Y=0;this[J]=Q&255;while(++Y<$&&(K*=256))this[J+Y]=Q/K&255;return J+$};y.prototype.writeUintBE=y.prototype.writeUIntBE=function(Q,J,$,X){if(Q=+Q,J=J>>>0,$=$>>>0,!X){let V=Math.pow(2,8*$)-1;f0(this,Q,J,$,V,0)}let K=$-1,Y=1;this[J+K]=Q&255;while(--K>=0&&(Y*=256))this[J+K]=Q/Y&255;return J+$};y.prototype.writeUint8=y.prototype.writeUInt8=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,1,255,0);return this[J]=Q&255,J+1};y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,2,65535,0);return this[J]=Q&255,this[J+1]=Q>>>8,J+2};y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,2,65535,0);return this[J]=Q>>>8,this[J+1]=Q&255,J+2};y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,4,4294967295,0);return this[J+3]=Q>>>24,this[J+2]=Q>>>16,this[J+1]=Q>>>8,this[J]=Q&255,J+4};y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,4,4294967295,0);return this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255,J+4};y.prototype.writeBigUInt64LE=R2(function(Q,J=0){return F7(this,Q,J,BigInt(0),BigInt("0xffffffffffffffff"))});y.prototype.writeBigUInt64BE=R2(function(Q,J=0){return w7(this,Q,J,BigInt(0),BigInt("0xffffffffffffffff"))});y.prototype.writeIntLE=function(Q,J,$,X){if(Q=+Q,J=J>>>0,!X){let q=Math.pow(2,8*$-1);f0(this,Q,J,$,q-1,-q)}let K=0,Y=1,V=0;this[J]=Q&255;while(++K<$&&(Y*=256)){if(Q<0&&V===0&&this[J+K-1]!==0)V=1;this[J+K]=(Q/Y>>0)-V&255}return J+$};y.prototype.writeIntBE=function(Q,J,$,X){if(Q=+Q,J=J>>>0,!X){let q=Math.pow(2,8*$-1);f0(this,Q,J,$,q-1,-q)}let K=$-1,Y=1,V=0;this[J+K]=Q&255;while(--K>=0&&(Y*=256)){if(Q<0&&V===0&&this[J+K+1]!==0)V=1;this[J+K]=(Q/Y>>0)-V&255}return J+$};y.prototype.writeInt8=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,1,127,-128);if(Q<0)Q=255+Q+1;return this[J]=Q&255,J+1};y.prototype.writeInt16LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,2,32767,-32768);return this[J]=Q&255,this[J+1]=Q>>>8,J+2};y.prototype.writeInt16BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,2,32767,-32768);return this[J]=Q>>>8,this[J+1]=Q&255,J+2};y.prototype.writeInt32LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,4,2147483647,-2147483648);return this[J]=Q&255,this[J+1]=Q>>>8,this[J+2]=Q>>>16,this[J+3]=Q>>>24,J+4};y.prototype.writeInt32BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)f0(this,Q,J,4,2147483647,-2147483648);if(Q<0)Q=4294967295+Q+1;return this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255,J+4};y.prototype.writeBigInt64LE=R2(function(Q,J=0){return F7(this,Q,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});y.prototype.writeBigInt64BE=R2(function(Q,J=0){return w7(this,Q,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});y.prototype.writeFloatLE=function(Q,J,$){return N7(this,Q,J,!0,$)};y.prototype.writeFloatBE=function(Q,J,$){return N7(this,Q,J,!1,$)};y.prototype.writeDoubleLE=function(Q,J,$){return O7(this,Q,J,!0,$)};y.prototype.writeDoubleBE=function(Q,J,$){return O7(this,Q,J,!1,$)};y.prototype.copy=function(Q,J,$,X){if(!y.isBuffer(Q))throw TypeError("argument should be a Buffer");if(!$)$=0;if(!X&&X!==0)X=this.length;if(J>=Q.length)J=Q.length;if(!J)J=0;if(X>0&&X<$)X=$;if(X===$)return 0;if(Q.length===0||this.length===0)return 0;if(J<0)throw RangeError("targetStart out of bounds");if($<0||$>=this.length)throw RangeError("Index out of range");if(X<0)throw RangeError("sourceEnd out of bounds");if(X>this.length)X=this.length;if(Q.length-J<X-$)X=Q.length-J+$;let K=X-$;if(this===Q&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(J,$,X);else Uint8Array.prototype.set.call(Q,this.subarray($,X),J);return K};y.prototype.fill=function(Q,J,$,X){if(typeof Q==="string"){if(typeof J==="string")X=J,J=0,$=this.length;else if(typeof $==="string")X=$,$=this.length;if(X!==void 0&&typeof X!=="string")throw TypeError("encoding must be a string");if(typeof X==="string"&&!y.isEncoding(X))throw TypeError("Unknown encoding: "+X);if(Q.length===1){let Y=Q.charCodeAt(0);if(X==="utf8"&&Y<128||X==="latin1")Q=Y}}else if(typeof Q==="number")Q=Q&255;else if(typeof Q==="boolean")Q=Number(Q);if(J<0||this.length<J||this.length<$)throw RangeError("Out of range index");if($<=J)return this;if(J=J>>>0,$=$===void 0?this.length:$>>>0,!Q)Q=0;let K;if(typeof Q==="number")for(K=J;K<$;++K)this[K]=Q;else{let Y=y.isBuffer(Q)?Q:y.from(Q,X),V=Y.length;if(V===0)throw TypeError('The value "'+Q+'" is invalid for argument "value"');for(K=0;K<$-J;++K)this[K+J]=Y[K%V]}return this};TY=/[^+/0-9A-Za-z-_]/g;vY=function(){let Q=Array(256);for(let J=0;J<16;++J){let $=J*16;for(let X=0;X<16;++X)Q[$+X]="0123456789abcdef"[J]+"0123456789abcdef"[X]}return Q}();gY=m8("resolveObjectURL"),yY=m8("isUtf8"),fY=m8("transcode"),_Y=y});var n1={};R8(n1,{setMaxListeners:()=>h7,once:()=>g7,listenerCount:()=>f7,init:()=>T2,getMaxListeners:()=>b7,getEventListeners:()=>y7,default:()=>nY,captureRejectionSymbol:()=>E7,addAbortListener:()=>u7,EventEmitter:()=>T2});function S7(Q,J){var{_events:$}=Q;if(J[0]??=Error("Unhandled error."),!$)throw J[0];var X=$[k7];if(X)for(var K of R7.call(X))K.apply(Q,J);var Y=$.error;if(!Y)throw J[0];for(var K of R7.call(Y))K.apply(Q,J);return!0}function pY(Q,J,$,X){J.then(void 0,function(K){queueMicrotask(()=>cY(Q,K,$,X))})}function cY(Q,J,$,X){if(typeof Q[A7]==="function")Q[A7](J,$,...X);else try{Q[n2]=!1,Q.emit("error",J)}finally{Q[n2]=!0}}function v7(Q,J,$){$.warned=!0;let X=Error(`Possible EventEmitter memory leak detected. ${$.length} ${String(J)} listeners added to [${Q.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);X.name="MaxListenersExceededWarning",X.emitter=Q,X.type=J,X.count=$.length,console.warn(X)}function x7(Q,J,...$){this.removeListener(Q,J),J.apply(this,$)}function g7(Q,J,$){var X=$?.signal;if(_7(X,"options.signal"),X?.aborted)throw new d8(void 0,{cause:X?.reason});let{resolve:K,reject:Y,promise:V}=$newPromiseCapability(Promise),q=(B)=>{if(Q.removeListener(J,U),X!=null)v6(X,"abort",G);Y(B)},U=(...B)=>{if(typeof Q.removeListener==="function")Q.removeListener("error",q);if(X!=null)v6(X,"abort",G);K(B)};if(T7(Q,J,U,{once:!0}),J!=="error"&&typeof Q.once==="function")Q.once("error",q);function G(){v6(Q,J,U),v6(Q,"error",q),Y(new d8(void 0,{cause:X?.reason}))}if(X!=null)T7(X,"abort",G,{once:!0});return V}function y7(Q,J){return Q.listeners(J)}function h7(Q,...J){i8(Q,"setMaxListeners",0);var $;if(J&&($=J.length))for(let X=0;X<$;X++)J[X].setMaxListeners(Q);else r2=Q}function f7(Q,J){return Q.listenerCount(J)}function v6(Q,J,$,X){if(typeof Q.removeListener==="function")Q.removeListener(J,$);else Q.removeEventListener(J,$,X)}function T7(Q,J,$,X){if(typeof Q.on==="function")if(X.once)Q.once(J,$);else Q.on(J,$);else Q.addEventListener(J,$,X)}function j1(Q,J,$){let X=TypeError(`The "${Q}" argument must be of type ${J}. Received ${$}`);return X.code="ERR_INVALID_ARG_TYPE",X}function lY(Q,J,$){let X=RangeError(`The "${Q}" argument is out of range. It must be ${J}. Received ${$}`);return X.code="ERR_OUT_OF_RANGE",X}function _7(Q,J){if(Q!==void 0&&(Q===null||typeof Q!=="object"||!("aborted"in Q)))throw j1(J,"AbortSignal",Q)}function i8(Q,J,$,X){if(typeof Q!=="number")throw j1(J,"number",Q);if($!=null&&Q<$||X!=null&&Q>X||($!=null||X!=null)&&Number.isNaN(Q))throw lY(J,`${$!=null?`>= ${$}`:""}${$!=null&&X!=null?" && ":""}${X!=null?`<= ${X}`:""}`,Q)}function i1(Q){if(typeof Q!=="function")throw TypeError("The listener must be a function")}function iY(Q,J){if(typeof Q!=="boolean")throw j1(J,"boolean",Q)}function b7(Q){return Q?._maxListeners??r2}function u7(Q,J){if(Q===void 0)throw j1("signal","AbortSignal",Q);if(_7(Q,"signal"),typeof J!=="function")throw j1("listener","function",J);let $;if(Q.aborted)queueMicrotask(()=>J());else Q.addEventListener("abort",J,{__proto__:null,once:!0}),$=()=>{Q.removeEventListener("abort",J)};return{__proto__:null,[Symbol.dispose](){$?.()}}}var l8,n2,k7,bY,uY,A7,E7,R7,r2=10,T2=function(Q){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[n2]=Q?.captureRejections?Boolean(Q?.captureRejections):w0[n2])this.emit=dY},w0,mY=function(Q,...J){if(Q==="error")return S7(this,J);var{_events:$}=this;if($===void 0)return!1;var X=$[Q];if(X===void 0)return!1;let K=X.length>1?X.slice():X;for(let Y=0,{length:V}=K;Y<V;Y++){let q=K[Y];switch(J.length){case 0:q.call(this);break;case 1:q.call(this,J[0]);break;case 2:q.call(this,J[0],J[1]);break;case 3:q.call(this,J[0],J[1],J[2]);break;default:q.apply(this,J);break}}return!0},dY=function(Q,...J){if(Q==="error")return S7(this,J);var{_events:$}=this;if($===void 0)return!1;var X=$[Q];if(X===void 0)return!1;let K=X.length>1?X.slice():X;for(let Y=0,{length:V}=K;Y<V;Y++){let q=K[Y],U;switch(J.length){case 0:U=q.call(this);break;case 1:U=q.call(this,J[0]);break;case 2:U=q.call(this,J[0],J[1]);break;case 3:U=q.call(this,J[0],J[1],J[2]);break;default:U=q.apply(this,J);break}if(U!==void 0&&typeof U?.then==="function"&&U.then===Promise.prototype.then)pY(this,U,Q,J)}return!0},d8,nY;var r1=R4(()=>{l8=Symbol.for,n2=Symbol("kCapture"),k7=l8("events.errorMonitor"),bY=Symbol("events.maxEventTargetListeners"),uY=Symbol("events.maxEventTargetListenersWarned"),A7=l8("nodejs.rejection"),E7=l8("nodejs.rejection"),R7=Array.prototype.slice,w0=T2.prototype={};w0._events=void 0;w0._eventsCount=0;w0._maxListeners=void 0;w0.setMaxListeners=function(Q){return i8(Q,"setMaxListeners",0),this._maxListeners=Q,this};w0.constructor=T2;w0.getMaxListeners=function(){return this?._maxListeners??r2};w0.emit=mY;w0.addListener=function(Q,J){i1(J);var $=this._events;if(!$)$=this._events={__proto__:null},this._eventsCount=0;else if($.newListener)this.emit("newListener",Q,J.listener??J);var X=$[Q];if(!X)$[Q]=[J],this._eventsCount++;else{X.push(J);var K=this._maxListeners??r2;if(K>0&&X.length>K&&!X.warned)v7(this,Q,X)}return this};w0.on=w0.addListener;w0.prependListener=function(Q,J){i1(J);var $=this._events;if(!$)$=this._events={__proto__:null},this._eventsCount=0;else if($.newListener)this.emit("newListener",Q,J.listener??J);var X=$[Q];if(!X)$[Q]=[J],this._eventsCount++;else{X.unshift(J);var K=this._maxListeners??r2;if(K>0&&X.length>K&&!X.warned)v7(this,Q,X)}return this};w0.once=function(Q,J){i1(J);let $=x7.bind(this,Q,J);return $.listener=J,this.addListener(Q,$),this};w0.prependOnceListener=function(Q,J){i1(J);let $=x7.bind(this,Q,J);return $.listener=J,this.prependListener(Q,$),this};w0.removeListener=function(Q,J){i1(J);var{_events:$}=this;if(!$)return this;var X=$[Q];if(!X)return this;var K=X.length;let Y=-1;for(let V=K-1;V>=0;V--)if(X[V]===J||X[V].listener===J){Y=V;break}if(Y<0)return this;if(Y===0)X.shift();else X.splice(Y,1);if(X.length===0)delete $[Q],this._eventsCount--;return this};w0.off=w0.removeListener;w0.removeAllListeners=function(Q){var{_events:J}=this;if(Q&&J){if(J[Q])delete J[Q],this._eventsCount--}else this._events={__proto__:null};return this};w0.listeners=function(Q){var{_events:J}=this;if(!J)return[];var $=J[Q];if(!$)return[];return $.map((X)=>X.listener??X)};w0.rawListeners=function(Q){var{_events:J}=this;if(!J)return[];var $=J[Q];if(!$)return[];return $.slice()};w0.listenerCount=function(Q){var{_events:J}=this;if(!J)return 0;return J[Q]?.length??0};w0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};w0[n2]=!1;d8=class d8 extends Error{constructor(Q="The operation was aborted",J=void 0){if(J!==void 0&&typeof J!=="object")throw j1("options","Object",J);super(Q,J);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(T2,{captureRejections:{get(){return w0[n2]},set(Q){iY(Q,"EventEmitter.captureRejections"),w0[n2]=Q},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return r2},set:(Q)=>{i8(Q,"defaultMaxListeners",0),r2=Q}},kMaxEventTargetListeners:{value:bY,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:uY,enumerable:!1,configurable:!1,writable:!1}});Object.assign(T2,{once:g7,getEventListeners:y7,getMaxListeners:b7,setMaxListeners:h7,EventEmitter:T2,usingDomains:!1,captureRejectionSymbol:E7,errorMonitor:k7,addAbortListener:u7,init:T2,listenerCount:f7});nY=T2});var a8=B0((TB,r7)=>{var M0=(Q,J)=>()=>(J||Q((J={exports:{}}).exports,J),J.exports),N0=M0((Q,J)=>{class $ extends Error{constructor(X){if(!Array.isArray(X))throw TypeError(`Expected input to be an Array, got ${typeof X}`);let K="";for(let Y=0;Y<X.length;Y++)K+=` ${X[Y].stack}
`;super(K);this.name="AggregateError",this.errors=X}}J.exports={AggregateError:$,ArrayIsArray(X){return Array.isArray(X)},ArrayPrototypeIncludes(X,K){return X.includes(K)},ArrayPrototypeIndexOf(X,K){return X.indexOf(K)},ArrayPrototypeJoin(X,K){return X.join(K)},ArrayPrototypeMap(X,K){return X.map(K)},ArrayPrototypePop(X,K){return X.pop(K)},ArrayPrototypePush(X,K){return X.push(K)},ArrayPrototypeSlice(X,K,Y){return X.slice(K,Y)},Error,FunctionPrototypeCall(X,K,...Y){return X.call(K,...Y)},FunctionPrototypeSymbolHasInstance(X,K){return Function.prototype[Symbol.hasInstance].call(X,K)},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(X,K){return Object.defineProperties(X,K)},ObjectDefineProperty(X,K,Y){return Object.defineProperty(X,K,Y)},ObjectGetOwnPropertyDescriptor(X,K){return Object.getOwnPropertyDescriptor(X,K)},ObjectKeys(X){return Object.keys(X)},ObjectSetPrototypeOf(X,K){return Object.setPrototypeOf(X,K)},Promise,PromisePrototypeCatch(X,K){return X.catch(K)},PromisePrototypeThen(X,K,Y){return X.then(K,Y)},PromiseReject(X){return Promise.reject(X)},PromiseResolve(X){return Promise.resolve(X)},ReflectApply:Reflect.apply,RegExpPrototypeTest(X,K){return X.test(K)},SafeSet:Set,String,StringPrototypeSlice(X,K,Y){return X.slice(K,Y)},StringPrototypeToLowerCase(X){return X.toLowerCase()},StringPrototypeToUpperCase(X){return X.toUpperCase()},StringPrototypeTrim(X){return X.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(X,K,Y){return X.set(K,Y)},Boolean,Uint8Array}}),p7=M0((Q,J)=>{J.exports={format($,...X){return $.replace(/%([sdifj])/g,function(...[K,Y]){let V=X.shift();if(Y==="f")return V.toFixed(6);else if(Y==="j")return JSON.stringify(V);else if(Y==="s"&&typeof V==="object")return`${V.constructor!==Object?V.constructor.name:""} {}`.trim();else return V.toString()})},inspect($){switch(typeof $){case"string":if($.includes("'")){if(!$.includes('"'))return`"${$}"`;else if(!$.includes("`")&&!$.includes("${"))return`\`${$}\``}return`'${$}'`;case"number":if(isNaN($))return"NaN";else if(Object.is($,-0))return String($);return $;case"bigint":return`${String($)}n`;case"boolean":case"undefined":return String($);case"object":return"{}"}}}}),x0=M0((Q,J)=>{var{format:$,inspect:X}=p7(),{AggregateError:K}=N0(),Y=globalThis.AggregateError||K,V=Symbol("kIsNodeError"),q=["string","function","number","object","Function","Object","boolean","bigint","symbol"],U=/^([A-Z][a-z0-9]*)+$/,G={};function B(F,z){if(!F)throw new G.ERR_INTERNAL_ASSERTION(z)}function j(F){let z="",P=F.length,L=F[0]==="-"?1:0;for(;P>=L+4;P-=3)z=`_${F.slice(P-3,P)}${z}`;return`${F.slice(0,P)}${z}`}function W(F,z,P){if(typeof z==="function")return B(z.length<=P.length,`Code: ${F}; The provided arguments length (${P.length}) does not match the required ones (${z.length}).`),z(...P);let L=(z.match(/%[dfijoOs]/g)||[]).length;if(B(L===P.length,`Code: ${F}; The provided arguments length (${P.length}) does not match the required ones (${L}).`),P.length===0)return z;return $(z,...P)}function H(F,z,P){if(!P)P=Error;class L extends P{constructor(...N){super(W(F,z,N))}toString(){return`${this.name} [${F}]: ${this.message}`}}Object.defineProperties(L.prototype,{name:{value:P.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${F}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),L.prototype.code=F,L.prototype[V]=!0,G[F]=L}function S(F){let z="__node_internal_"+F.name;return Object.defineProperty(F,"name",{value:z}),F}function A(F,z){if(F&&z&&F!==z){if(Array.isArray(z.errors))return z.errors.push(F),z;let P=new Y([z,F],z.message);return P.code=z.code,P}return F||z}class w extends Error{constructor(F="The operation was aborted",z=void 0){if(z!==void 0&&typeof z!=="object")throw new G.ERR_INVALID_ARG_TYPE("options","Object",z);super(F,z);this.code="ABORT_ERR",this.name="AbortError"}}H("ERR_ASSERTION","%s",Error),H("ERR_INVALID_ARG_TYPE",(F,z,P)=>{if(B(typeof F==="string","'name' must be a string"),!Array.isArray(z))z=[z];let L="The ";if(F.endsWith(" argument"))L+=`${F} `;else L+=`"${F}" ${F.includes(".")?"property":"argument"} `;L+="must be ";let N=[],x=[],d=[];for(let _ of z)if(B(typeof _==="string","All expected entries have to be of type string"),q.includes(_))N.push(_.toLowerCase());else if(U.test(_))x.push(_);else B(_!=="object",'The value "object" should be written as "Object"'),d.push(_);if(x.length>0){let _=N.indexOf("object");if(_!==-1)N.splice(N,_,1),x.push("Object")}if(N.length>0){switch(N.length){case 1:L+=`of type ${N[0]}`;break;case 2:L+=`one of type ${N[0]} or ${N[1]}`;break;default:{let _=N.pop();L+=`one of type ${N.join(", ")}, or ${_}`}}if(x.length>0||d.length>0)L+=" or "}if(x.length>0){switch(x.length){case 1:L+=`an instance of ${x[0]}`;break;case 2:L+=`an instance of ${x[0]} or ${x[1]}`;break;default:{let _=x.pop();L+=`an instance of ${x.join(", ")}, or ${_}`}}if(d.length>0)L+=" or "}switch(d.length){case 0:break;case 1:if(d[0].toLowerCase()!==d[0])L+="an ";L+=`${d[0]}`;break;case 2:L+=`one of ${d[0]} or ${d[1]}`;break;default:{let _=d.pop();L+=`one of ${d.join(", ")}, or ${_}`}}if(P==null)L+=`. Received ${P}`;else if(typeof P==="function"&&P.name)L+=`. Received function ${P.name}`;else if(typeof P==="object"){var i;if((i=P.constructor)!==null&&i!==void 0&&i.name)L+=`. Received an instance of ${P.constructor.name}`;else{let _=X(P,{depth:-1});L+=`. Received ${_}`}}else{let _=X(P,{colors:!1});if(_.length>25)_=`${_.slice(0,25)}...`;L+=`. Received type ${typeof P} (${_})`}return L},TypeError),H("ERR_INVALID_ARG_VALUE",(F,z,P="is invalid")=>{let L=X(z);if(L.length>128)L=L.slice(0,128)+"...";return`The ${F.includes(".")?"property":"argument"} '${F}' ${P}. Received ${L}`},TypeError),H("ERR_INVALID_RETURN_VALUE",(F,z,P)=>{var L;let N=P!==null&&P!==void 0&&(L=P.constructor)!==null&&L!==void 0&&L.name?`instance of ${P.constructor.name}`:`type ${typeof P}`;return`Expected ${F} to be returned from the "${z}" function but got ${N}.`},TypeError),H("ERR_MISSING_ARGS",(...F)=>{B(F.length>0,"At least one arg needs to be specified");let z,P=F.length;switch(F=(Array.isArray(F)?F:[F]).map((L)=>`"${L}"`).join(" or "),P){case 1:z+=`The ${F[0]} argument`;break;case 2:z+=`The ${F[0]} and ${F[1]} arguments`;break;default:{let L=F.pop();z+=`The ${F.join(", ")}, and ${L} arguments`}break}return`${z} must be specified`},TypeError),H("ERR_OUT_OF_RANGE",(F,z,P)=>{B(z,'Missing "range" argument');let L;if(Number.isInteger(P)&&Math.abs(P)>4294967296)L=j(String(P));else if(typeof P==="bigint"){L=String(P);let N=BigInt(2)**BigInt(32);if(P>N||P<-N)L=j(L);L+="n"}else L=X(P);return`The value of "${F}" is out of range. It must be ${z}. Received ${L}`},RangeError),H("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),H("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),H("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),H("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),H("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),H("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),H("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),H("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),H("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),H("ERR_STREAM_WRITE_AFTER_END","write after end",Error),H("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),J.exports={AbortError:w,aggregateTwoErrors:S(A),hideStackFrames:S,codes:G}}),rY=M0((Q,J)=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=new WeakMap,X=new WeakMap;function K(v){let k=$.get(v);return console.assert(k!=null,"'this' is expected an Event object, but got",v),k}function Y(v){if(v.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",v.passiveListener);return}if(!v.event.cancelable)return;if(v.canceled=!0,typeof v.event.preventDefault==="function")v.event.preventDefault()}function V(v,k){$.set(this,{eventTarget:v,event:k,eventPhase:2,currentTarget:v,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:k.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let O=Object.keys(k);for(let E=0;E<O.length;++E){let g=O[E];if(!(g in this))Object.defineProperty(this,g,q(g))}}if(V.prototype={get type(){return K(this).event.type},get target(){return K(this).eventTarget},get currentTarget(){return K(this).currentTarget},composedPath(){let v=K(this).currentTarget;if(v==null)return[];return[v]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return K(this).eventPhase},stopPropagation(){let v=K(this);if(v.stopped=!0,typeof v.event.stopPropagation==="function")v.event.stopPropagation()},stopImmediatePropagation(){let v=K(this);if(v.stopped=!0,v.immediateStopped=!0,typeof v.event.stopImmediatePropagation==="function")v.event.stopImmediatePropagation()},get bubbles(){return Boolean(K(this).event.bubbles)},get cancelable(){return Boolean(K(this).event.cancelable)},preventDefault(){Y(K(this))},get defaultPrevented(){return K(this).canceled},get composed(){return Boolean(K(this).event.composed)},get timeStamp(){return K(this).timeStamp},get srcElement(){return K(this).eventTarget},get cancelBubble(){return K(this).stopped},set cancelBubble(v){if(!v)return;let k=K(this);if(k.stopped=!0,typeof k.event.cancelBubble==="boolean")k.event.cancelBubble=!0},get returnValue(){return!K(this).canceled},set returnValue(v){if(!v)Y(K(this))},initEvent(){}},Object.defineProperty(V.prototype,"constructor",{value:V,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(V.prototype,window.Event.prototype),X.set(window.Event.prototype,V);function q(v){return{get(){return K(this).event[v]},set(k){K(this).event[v]=k},configurable:!0,enumerable:!0}}function U(v){return{value(){let k=K(this).event;return k[v].apply(k,arguments)},configurable:!0,enumerable:!0}}function G(v,k){let O=Object.keys(k);if(O.length===0)return v;function E(g,T){v.call(this,g,T)}E.prototype=Object.create(v.prototype,{constructor:{value:E,configurable:!0,writable:!0}});for(let g=0;g<O.length;++g){let T=O[g];if(!(T in v.prototype)){let o=typeof Object.getOwnPropertyDescriptor(k,T).value==="function";Object.defineProperty(E.prototype,T,o?U(T):q(T))}}return E}function B(v){if(v==null||v===Object.prototype)return V;let k=X.get(v);if(k==null)k=G(B(Object.getPrototypeOf(v)),v),X.set(v,k);return k}function j(v,k){return new(B(Object.getPrototypeOf(k)))(v,k)}function W(v){return K(v).immediateStopped}function H(v,k){K(v).eventPhase=k}function S(v,k){K(v).currentTarget=k}function A(v,k){K(v).passiveListener=k}var w=new WeakMap,F=1,z=2,P=3;function L(v){return v!==null&&typeof v==="object"}function N(v){let k=w.get(v);if(k==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return k}function x(v){return{get(){let k=N(this).get(v);while(k!=null){if(k.listenerType===P)return k.listener;k=k.next}return null},set(k){if(typeof k!=="function"&&!L(k))k=null;let O=N(this),E=null,g=O.get(v);while(g!=null){if(g.listenerType===P)if(E!==null)E.next=g.next;else if(g.next!==null)O.set(v,g.next);else O.delete(v);else E=g;g=g.next}if(k!==null){let T={listener:k,listenerType:P,passive:!1,once:!1,next:null};if(E===null)O.set(v,T);else E.next=T}},configurable:!0,enumerable:!0}}function d(v,k){Object.defineProperty(v,`on${k}`,x(k))}function i(v){function k(){_.call(this)}k.prototype=Object.create(_.prototype,{constructor:{value:k,configurable:!0,writable:!0}});for(let O=0;O<v.length;++O)d(k.prototype,v[O]);return k}function _(){if(this instanceof _){w.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return i(arguments[0]);if(arguments.length>0){let v=Array(arguments.length);for(let k=0;k<arguments.length;++k)v[k]=arguments[k];return i(v)}throw TypeError("Cannot call a class as a function")}if(_.prototype={addEventListener(v,k,O){if(k==null)return;if(typeof k!=="function"&&!L(k))throw TypeError("'listener' should be a function or an object.");let E=N(this),g=L(O),T=(g?Boolean(O.capture):Boolean(O))?F:z,o={listener:k,listenerType:T,passive:g&&Boolean(O.passive),once:g&&Boolean(O.once),next:null},e=E.get(v);if(e===void 0){E.set(v,o);return}let X0=null;while(e!=null){if(e.listener===k&&e.listenerType===T)return;X0=e,e=e.next}X0.next=o},removeEventListener(v,k,O){if(k==null)return;let E=N(this),g=(L(O)?Boolean(O.capture):Boolean(O))?F:z,T=null,o=E.get(v);while(o!=null){if(o.listener===k&&o.listenerType===g){if(T!==null