UNPKG

libnemo

Version:

Nano cryptocurrency wallet library.

8 lines 320 kB
var Uu=Object.create;var Bi=Object.defineProperty;var Tu=Object.getOwnPropertyDescriptor;var Pu=Object.getOwnPropertyNames;var Ru=Object.getPrototypeOf,Nu=Object.prototype.hasOwnProperty;var Fu=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ku=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Pu(e))!Nu.call(r,i)&&i!==t&&Bi(r,i,{get:()=>e[i],enumerable:!(n=Tu(e,i))||n.enumerable});return r};var nn=(r,e,t)=>(t=r!=null?Uu(Ru(r)):{},ku(e||!r||!r.__esModule?Bi(t,"default",{value:r,enumerable:!0}):t,r));var Ci=w(ir=>{"use strict";a();ir.byteLength=Ou;ir.toByteArray=Qu;ir.fromByteArray=$u;var Ie=[],fe=[],Lu=typeof Uint8Array<"u"?Uint8Array:Array,on="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Je=0,Si=on.length;Je<Si;++Je)Ie[Je]=on[Je],fe[on.charCodeAt(Je)]=Je;var Je,Si;fe[45]=62;fe[95]=63;function Di(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function Ou(r){var e=Di(r),t=e[0],n=e[1];return(t+n)*3/4-n}function _u(r,e,t){return(e+t)*3/4-t}function Qu(r){var e,t=Di(r),n=t[0],i=t[1],o=new Lu(_u(r,n,i)),v=0,s=i>0?n-4:n,u;for(u=0;u<s;u+=4)e=fe[r.charCodeAt(u)]<<18|fe[r.charCodeAt(u+1)]<<12|fe[r.charCodeAt(u+2)]<<6|fe[r.charCodeAt(u+3)],o[v++]=e>>16&255,o[v++]=e>>8&255,o[v++]=e&255;return i===2&&(e=fe[r.charCodeAt(u)]<<2|fe[r.charCodeAt(u+1)]>>4,o[v++]=e&255),i===1&&(e=fe[r.charCodeAt(u)]<<10|fe[r.charCodeAt(u+1)]<<4|fe[r.charCodeAt(u+2)]>>2,o[v++]=e>>8&255,o[v++]=e&255),o}function Mu(r){return Ie[r>>18&63]+Ie[r>>12&63]+Ie[r>>6&63]+Ie[r&63]}function Gu(r,e,t){for(var n,i=[],o=e;o<t;o+=3)n=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),i.push(Mu(n));return i.join("")}function $u(r){for(var e,t=r.length,n=t%3,i=[],o=16383,v=0,s=t-n;v<s;v+=o)i.push(Gu(r,v,v+o>s?s:v+o));return n===1?(e=r[t-1],i.push(Ie[e>>2]+Ie[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(Ie[e>>10]+Ie[e>>4&63]+Ie[e<<2&63]+"=")),i.join("")}});var Ui=w(vn=>{a();/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */vn.read=function(r,e,t,n,i){var o,v,s=i*8-n-1,u=(1<<s)-1,c=u>>1,f=-7,p=t?i-1:0,g=t?-1:1,d=r[e+p];for(p+=g,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=o*256+r[e+p],p+=g,f-=8);for(v=o&(1<<-f)-1,o>>=-f,f+=n;f>0;v=v*256+r[e+p],p+=g,f-=8);if(o===0)o=1-c;else{if(o===u)return v?NaN:(d?-1:1)*(1/0);v=v+Math.pow(2,n),o=o-c}return(d?-1:1)*v*Math.pow(2,o-n)};vn.write=function(r,e,t,n,i,o){var v,s,u,c=o*8-i-1,f=(1<<c)-1,p=f>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,I=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,v=f):(v=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-v))<1&&(v--,u*=2),v+p>=1?e+=g/u:e+=g*Math.pow(2,1-p),e*u>=2&&(v++,u/=2),v+p>=f?(s=0,v=f):v+p>=1?(s=(e*u-1)*Math.pow(2,i),v=v+p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),v=0));i>=8;r[t+d]=s&255,d+=I,s/=256,i-=8);for(v=v<<i|s,c+=i;c>0;r[t+d]=v&255,d+=I,v/=256,c-=8);r[t+d-I]|=E*128}});var Hi=w(gt=>{"use strict";a();/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */var sn=Ci(),xt=Ui(),Ti=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;gt.Buffer=x;gt.SlowBuffer=Ku;gt.INSPECT_MAX_BYTES=50;var or=2147483647;gt.kMaxLength=or;x.TYPED_ARRAY_SUPPORT=Vu();!x.TYPED_ARRAY_SUPPORT&&typeof console<"u";function Vu(){try{let r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(x.prototype,"parent",{enumerable:!0,get:function(){if(x.isBuffer(this))return this.buffer}});Object.defineProperty(x.prototype,"offset",{enumerable:!0,get:function(){if(x.isBuffer(this))return this.byteOffset}});function Te(r){if(r>or)throw new RangeError('The value "'+r+'" is invalid for option "size"');let e=new Uint8Array(r);return Object.setPrototypeOf(e,x.prototype),e}function x(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return fn(r)}return Fi(r,e,t)}x.poolSize=8192;function Fi(r,e,t){if(typeof r=="string")return Yu(r,e);if(ArrayBuffer.isView(r))return Hu(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(be(r,ArrayBuffer)||r&&be(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(be(r,SharedArrayBuffer)||r&&be(r.buffer,SharedArrayBuffer)))return an(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return x.from(n,e,t);let i=qu(r);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return x.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}x.from=function(r,e,t){return Fi(r,e,t)};Object.setPrototypeOf(x.prototype,Uint8Array.prototype);Object.setPrototypeOf(x,Uint8Array);function ki(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function zu(r,e,t){return ki(r),r<=0?Te(r):e!==void 0?typeof t=="string"?Te(r).fill(e,t):Te(r).fill(e):Te(r)}x.alloc=function(r,e,t){return zu(r,e,t)};function fn(r){return ki(r),Te(r<0?0:ln(r)|0)}x.allocUnsafe=function(r){return fn(r)};x.allocUnsafeSlow=function(r){return fn(r)};function Yu(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!x.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let t=Li(r,e)|0,n=Te(t),i=n.write(r,e);return i!==t&&(n=n.slice(0,i)),n}function un(r){let e=r.length<0?0:ln(r.length)|0,t=Te(e);for(let n=0;n<e;n+=1)t[n]=r[n]&255;return t}function Hu(r){if(be(r,Uint8Array)){let e=new Uint8Array(r);return an(e.buffer,e.byteOffset,e.byteLength)}return un(r)}function an(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(r):t===void 0?n=new Uint8Array(r,e):n=new Uint8Array(r,e,t),Object.setPrototypeOf(n,x.prototype),n}function qu(r){if(x.isBuffer(r)){let e=ln(r.length)|0,t=Te(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||pn(r.length)?Te(0):un(r);if(r.type==="Buffer"&&Array.isArray(r.data))return un(r.data)}function ln(r){if(r>=or)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or.toString(16)+" bytes");return r|0}function Ku(r){return+r!=r&&(r=0),x.alloc(+r)}x.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==x.prototype};x.compare=function(e,t){if(be(e,Uint8Array)&&(e=x.from(e,e.offset,e.byteLength)),be(t,Uint8Array)&&(t=x.from(t,t.offset,t.byteLength)),!x.isBuffer(e)||!x.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let o=0,v=Math.min(n,i);o<v;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0};x.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};x.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return x.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let i=x.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){let v=e[n];if(be(v,Uint8Array))o+v.length>i.length?(x.isBuffer(v)||(v=x.from(v)),v.copy(i,o)):Uint8Array.prototype.set.call(i,v,o);else if(x.isBuffer(v))v.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=v.length}return i};function Li(r,e){if(x.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||be(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let t=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return cn(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Yi(r).length;default:if(i)return n?-1:cn(r).length;e=(""+e).toLowerCase(),i=!0}}x.byteLength=Li;function Wu(r,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return oa(this,e,t);case"utf8":case"utf-8":return _i(this,e,t);case"ascii":return na(this,e,t);case"latin1":case"binary":return ia(this,e,t);case"base64":return ta(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return va(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}x.prototype._isBuffer=!0;function Ze(r,e,t){let n=r[e];r[e]=r[t],r[t]=n}x.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)Ze(this,t,t+1);return this};x.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)Ze(this,t,t+3),Ze(this,t+1,t+2);return this};x.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)Ze(this,t,t+7),Ze(this,t+1,t+6),Ze(this,t+2,t+5),Ze(this,t+3,t+4);return this};x.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?_i(this,0,e):Wu.apply(this,arguments)};x.prototype.toLocaleString=x.prototype.toString;x.prototype.equals=function(e){if(!x.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:x.compare(this,e)===0};x.prototype.inspect=function(){let e="",t=gt.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"};Ti&&(x.prototype[Ti]=x.prototype.inspect);x.prototype.compare=function(e,t,n,i,o){if(be(e,Uint8Array)&&(e=x.from(e,e.offset,e.byteLength)),!x.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;let v=o-i,s=n-t,u=Math.min(v,s),c=this.slice(i,o),f=e.slice(t,n);for(let p=0;p<u;++p)if(c[p]!==f[p]){v=c[p],s=f[p];break}return v<s?-1:s<v?1:0};function Oi(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,pn(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=x.from(e,n)),x.isBuffer(e))return e.length===0?-1:Pi(r,e,t,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Pi(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Pi(r,e,t,n,i){let o=1,v=r.length,s=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;o=2,v/=2,s/=2,t/=2}function u(f,p){return o===1?f[p]:f.readUInt16BE(p*o)}let c;if(i){let f=-1;for(c=t;c<v;c++)if(u(r,c)===u(e,f===-1?0:c-f)){if(f===-1&&(f=c),c-f+1===s)return f*o}else f!==-1&&(c-=c-f),f=-1}else for(t+s>v&&(t=v-s),c=t;c>=0;c--){let f=!0;for(let p=0;p<s;p++)if(u(r,c+p)!==u(e,p)){f=!1;break}if(f)return c}return-1}x.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};x.prototype.indexOf=function(e,t,n){return Oi(this,e,t,n,!0)};x.prototype.lastIndexOf=function(e,t,n){return Oi(this,e,t,n,!1)};function ju(r,e,t,n){t=Number(t)||0;let i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let o=e.length;n>o/2&&(n=o/2);let v;for(v=0;v<n;++v){let s=parseInt(e.substr(v*2,2),16);if(pn(s))return v;r[t+v]=s}return v}function Xu(r,e,t,n){return vr(cn(e,r.length-t),r,t,n)}function Ju(r,e,t,n){return vr(ca(e),r,t,n)}function Zu(r,e,t,n){return vr(Yi(e),r,t,n)}function ea(r,e,t,n){return vr(fa(e,r.length-t),r,t,n)}x.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-t;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let v=!1;for(;;)switch(i){case"hex":return ju(this,e,t,n);case"utf8":case"utf-8":return Xu(this,e,t,n);case"ascii":case"latin1":case"binary":return Ju(this,e,t,n);case"base64":return Zu(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ea(this,e,t,n);default:if(v)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),v=!0}};x.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ta(r,e,t){return e===0&&t===r.length?sn.fromByteArray(r):sn.fromByteArray(r.slice(e,t))}function _i(r,e,t){t=Math.min(r.length,t);let n=[],i=e;for(;i<t;){let o=r[i],v=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=t){let u,c,f,p;switch(s){case 1:o<128&&(v=o);break;case 2:u=r[i+1],(u&192)===128&&(p=(o&31)<<6|u&63,p>127&&(v=p));break;case 3:u=r[i+1],c=r[i+2],(u&192)===128&&(c&192)===128&&(p=(o&15)<<12|(u&63)<<6|c&63,p>2047&&(p<55296||p>57343)&&(v=p));break;case 4:u=r[i+1],c=r[i+2],f=r[i+3],(u&192)===128&&(c&192)===128&&(f&192)===128&&(p=(o&15)<<18|(u&63)<<12|(c&63)<<6|f&63,p>65535&&p<1114112&&(v=p))}}v===null?(v=65533,s=1):v>65535&&(v-=65536,n.push(v>>>10&1023|55296),v=56320|v&1023),n.push(v),i+=s}return ra(n)}var Ri=4096;function ra(r){let e=r.length;if(e<=Ri)return String.fromCharCode.apply(String,r);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Ri));return t}function na(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function ia(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function oa(r,e,t){let n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let i="";for(let o=e;o<t;++o)i+=la[r[o]];return i}function va(r,e,t){let n=r.slice(e,t),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}x.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,x.prototype),i};function q(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}x.prototype.readUintLE=x.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||q(e,t,this.length);let i=this[e],o=1,v=0;for(;++v<t&&(o*=256);)i+=this[e+v]*o;return i};x.prototype.readUintBE=x.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||q(e,t,this.length);let i=this[e+--t],o=1;for(;t>0&&(o*=256);)i+=this[e+--t]*o;return i};x.prototype.readUint8=x.prototype.readUInt8=function(e,t){return e=e>>>0,t||q(e,1,this.length),this[e]};x.prototype.readUint16LE=x.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||q(e,2,this.length),this[e]|this[e+1]<<8};x.prototype.readUint16BE=x.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||q(e,2,this.length),this[e]<<8|this[e+1]};x.prototype.readUint32LE=x.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};x.prototype.readUint32BE=x.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||q(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};x.prototype.readBigUInt64LE=$e(function(e){e=e>>>0,dt(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Ot(e,this.length-8);let i=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<<BigInt(32))});x.prototype.readBigUInt64BE=$e(function(e){e=e>>>0,dt(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Ot(e,this.length-8);let i=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});x.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||q(e,t,this.length);let i=this[e],o=1,v=0;for(;++v<t&&(o*=256);)i+=this[e+v]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};x.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||q(e,t,this.length);let i=t,o=1,v=this[e+--i];for(;i>0&&(o*=256);)v+=this[e+--i]*o;return o*=128,v>=o&&(v-=Math.pow(2,8*t)),v};x.prototype.readInt8=function(e,t){return e=e>>>0,t||q(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};x.prototype.readInt16LE=function(e,t){e=e>>>0,t||q(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};x.prototype.readInt16BE=function(e,t){e=e>>>0,t||q(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};x.prototype.readInt32LE=function(e,t){return e=e>>>0,t||q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};x.prototype.readInt32BE=function(e,t){return e=e>>>0,t||q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};x.prototype.readBigInt64LE=$e(function(e){e=e>>>0,dt(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Ot(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});x.prototype.readBigInt64BE=$e(function(e){e=e>>>0,dt(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Ot(e,this.length-8);let i=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});x.prototype.readFloatLE=function(e,t){return e=e>>>0,t||q(e,4,this.length),xt.read(this,e,!0,23,4)};x.prototype.readFloatBE=function(e,t){return e=e>>>0,t||q(e,4,this.length),xt.read(this,e,!1,23,4)};x.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||q(e,8,this.length),xt.read(this,e,!0,52,8)};x.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||q(e,8,this.length),xt.read(this,e,!1,52,8)};function ne(r,e,t,n,i,o){if(!x.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}x.prototype.writeUintLE=x.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;ne(this,e,t,n,s,0)}let o=1,v=0;for(this[t]=e&255;++v<n&&(o*=256);)this[t+v]=e/o&255;return t+n};x.prototype.writeUintBE=x.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;ne(this,e,t,n,s,0)}let o=n-1,v=1;for(this[t+o]=e&255;--o>=0&&(v*=256);)this[t+o]=e/v&255;return t+n};x.prototype.writeUint8=x.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,1,255,0),this[t]=e&255,t+1};x.prototype.writeUint16LE=x.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};x.prototype.writeUint16BE=x.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};x.prototype.writeUint32LE=x.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};x.prototype.writeUint32BE=x.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Qi(r,e,t,n,i){zi(e,n,i,r,t,7);let o=Number(e&BigInt(4294967295));r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o;let v=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=v,v=v>>8,r[t++]=v,v=v>>8,r[t++]=v,v=v>>8,r[t++]=v,t}function Mi(r,e,t,n,i){zi(e,n,i,r,t,7);let o=Number(e&BigInt(4294967295));r[t+7]=o,o=o>>8,r[t+6]=o,o=o>>8,r[t+5]=o,o=o>>8,r[t+4]=o;let v=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=v,v=v>>8,r[t+2]=v,v=v>>8,r[t+1]=v,v=v>>8,r[t]=v,t+8}x.prototype.writeBigUInt64LE=$e(function(e,t=0){return Qi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});x.prototype.writeBigUInt64BE=$e(function(e,t=0){return Mi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});x.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let u=Math.pow(2,8*n-1);ne(this,e,t,n,u-1,-u)}let o=0,v=1,s=0;for(this[t]=e&255;++o<n&&(v*=256);)e<0&&s===0&&this[t+o-1]!==0&&(s=1),this[t+o]=(e/v>>0)-s&255;return t+n};x.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let u=Math.pow(2,8*n-1);ne(this,e,t,n,u-1,-u)}let o=n-1,v=1,s=0;for(this[t+o]=e&255;--o>=0&&(v*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/v>>0)-s&255;return t+n};x.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};x.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};x.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};x.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};x.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||ne(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};x.prototype.writeBigInt64LE=$e(function(e,t=0){return Qi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});x.prototype.writeBigInt64BE=$e(function(e,t=0){return Mi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Gi(r,e,t,n,i,o){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function $i(r,e,t,n,i){return e=+e,t=t>>>0,i||Gi(r,e,t,4,34028234663852886e22,-34028234663852886e22),xt.write(r,e,t,n,23,4),t+4}x.prototype.writeFloatLE=function(e,t,n){return $i(this,e,t,!0,n)};x.prototype.writeFloatBE=function(e,t,n){return $i(this,e,t,!1,n)};function Vi(r,e,t,n,i){return e=+e,t=t>>>0,i||Gi(r,e,t,8,17976931348623157e292,-17976931348623157e292),xt.write(r,e,t,n,52,8),t+8}x.prototype.writeDoubleLE=function(e,t,n){return Vi(this,e,t,!0,n)};x.prototype.writeDoubleBE=function(e,t,n){return Vi(this,e,t,!1,n)};x.prototype.copy=function(e,t,n,i){if(!x.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);let o=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),o};x.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!x.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let v=e.charCodeAt(0);(i==="utf8"&&v<128||i==="latin1")&&(e=v)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{let v=x.isBuffer(e)?e:x.from(e,i),s=v.length;if(s===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=v[o%s]}return this};var ht={};function yn(r,e,t){ht[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}yn("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);yn("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError);yn("ERR_OUT_OF_RANGE",function(r,e,t){let n=`The value of "${r}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=Ni(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=Ni(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Ni(r){let e="",t=r.length,n=r[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function sa(r,e,t){dt(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&Ot(e,r.length-(t+1))}function zi(r,e,t,n,i,o){if(r>t||r<e){let v=typeof e=="bigint"?"n":"",s;throw o>3?e===0||e===BigInt(0)?s=`>= 0${v} and < 2${v} ** ${(o+1)*8}${v}`:s=`>= -(2${v} ** ${(o+1)*8-1}${v}) and < 2 ** ${(o+1)*8-1}${v}`:s=`>= ${e}${v} and <= ${t}${v}`,new ht.ERR_OUT_OF_RANGE("value",s,r)}sa(n,i,o)}function dt(r,e){if(typeof r!="number")throw new ht.ERR_INVALID_ARG_TYPE(e,"number",r)}function Ot(r,e,t){throw Math.floor(r)!==r?(dt(r,t),new ht.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new ht.ERR_BUFFER_OUT_OF_BOUNDS:new ht.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}var ua=/[^+/0-9A-Za-z-_]/g;function aa(r){if(r=r.split("=")[0],r=r.trim().replace(ua,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function cn(r,e){e=e||1/0;let t,n=r.length,i=null,o=[];for(let v=0;v<n;++v){if(t=r.charCodeAt(v),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(v+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;o.push(t)}else if(t<2048){if((e-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function ca(r){let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function fa(r,e){let t,n,i,o=[];for(let v=0;v<r.length&&!((e-=2)<0);++v)t=r.charCodeAt(v),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function Yi(r){return sn.toByteArray(aa(r))}function vr(r,e,t,n){let i;for(i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function be(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function pn(r){return r!==r}var la=(function(){let r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)e[n+i]=r[t]+r[i]}return e})();function $e(r){return typeof BigInt>"u"?ya:r}function ya(){throw new Error("BigInt not supported")}});var qi,y,a=Fu(()=>{"use strict";qi=nn(Hi(),1);//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev> //! SPDX-License-Identifier: GPL-3.0-or-later y=qi.default.Buffer});var So=w((Jy,Rn)=>{"use strict";a();var Dt=typeof Reflect=="object"?Reflect:null,ho=Dt&&typeof Dt.apply=="function"?Dt.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},pr;Dt&&typeof Dt.ownKeys=="function"?pr=Dt.ownKeys:Object.getOwnPropertySymbols?pr=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:pr=function(e){return Object.getOwnPropertyNames(e)};var go=Number.isNaN||function(e){return e!==e};function P(){P.init.call(this)}Rn.exports=P;Rn.exports.once=hc;P.EventEmitter=P;P.prototype._events=void 0;P.prototype._eventsCount=0;P.prototype._maxListeners=void 0;var xo=10;function hr(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(P,"defaultMaxListeners",{enumerable:!0,get:function(){return xo},set:function(r){if(typeof r!="number"||r<0||go(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");xo=r}});P.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};P.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||go(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function mo(r){return r._maxListeners===void 0?P.defaultMaxListeners:r._maxListeners}P.prototype.getMaxListeners=function(){return mo(this)};P.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var v;if(t.length>0&&(v=t[0]),v instanceof Error)throw v;var s=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw s.context=v,s}var u=o[e];if(u===void 0)return!1;if(typeof u=="function")ho(u,this,t);else for(var c=u.length,f=bo(u,c),n=0;n<c;++n)ho(f[n],this,t);return!0};function Ao(r,e,t,n){var i,o,v;if(hr(t),o=r._events,o===void 0?(o=r._events=Object.create(null),r._eventsCount=0):(o.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),o=r._events),v=o[e]),v===void 0)v=o[e]=t,++r._eventsCount;else if(typeof v=="function"?v=o[e]=n?[t,v]:[v,t]:n?v.unshift(t):v.push(t),i=mo(r),i>0&&v.length>i&&!v.warned){v.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+v.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=r,s.type=e,s.count=v.length}return r}P.prototype.addListener=function(e,t){return Ao(this,e,t,!1)};P.prototype.on=P.prototype.addListener;P.prototype.prependListener=function(e,t){return Ao(this,e,t,!0)};function lc(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function wo(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=lc.bind(n);return i.listener=t,n.wrapFn=i,i}P.prototype.once=function(e,t){return hr(t),this.on(e,wo(this,e,t)),this};P.prototype.prependOnceListener=function(e,t){return hr(t),this.prependListener(e,wo(this,e,t)),this};P.prototype.removeListener=function(e,t){var n,i,o,v,s;if(hr(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(o=-1,v=n.length-1;v>=0;v--)if(n[v]===t||n[v].listener===t){s=n[v].listener,o=v;break}if(o<0)return this;o===0?n.shift():yc(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,s||t)}return this};P.prototype.off=P.prototype.removeListener;P.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),v;for(i=0;i<o.length;++i)v=o[i],v!=="removeListener"&&this.removeAllListeners(v);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function Eo(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?pc(i):bo(i,i.length)}P.prototype.listeners=function(e){return Eo(this,e,!0)};P.prototype.rawListeners=function(e){return Eo(this,e,!1)};P.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Io.call(r,e)};P.prototype.listenerCount=Io;function Io(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}P.prototype.eventNames=function(){return this._eventsCount>0?pr(this._events):[]};function bo(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function yc(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function pc(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function hc(r,e){return new Promise(function(t,n){function i(v){r.removeListener(e,o),n(v)}function o(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}Bo(r,e,o,{once:!0}),e!=="error"&&xc(r,i,{once:!0})})}function xc(r,e,t){typeof r.on=="function"&&Bo(r,"error",e,t)}function Bo(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(o){n.once&&r.removeEventListener(e,i),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}});var $t=w((Lx,Fo)=>{"use strict";a();var Ec="2.0.0",Ic=Number.MAX_SAFE_INTEGER||9007199254740991,bc=16,Bc=250,Sc=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Fo.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:bc,MAX_SAFE_BUILD_LENGTH:Bc,MAX_SAFE_INTEGER:Ic,RELEASE_TYPES:Sc,SEMVER_SPEC_VERSION:Ec,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Vt=w((_x,ko)=>{"use strict";a();var Dc=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>{}:()=>{};ko.exports=Dc});var Ct=w((Ce,Lo)=>{"use strict";a();var{MAX_SAFE_COMPONENT_LENGTH:Ln,MAX_SAFE_BUILD_LENGTH:Cc,MAX_LENGTH:Uc}=$t(),Tc=Vt();Ce=Lo.exports={};var Pc=Ce.re=[],Rc=Ce.safeRe=[],m=Ce.src=[],Nc=Ce.safeSrc=[],A=Ce.t={},Fc=0,On="[a-zA-Z0-9-]",kc=[["\\s",1],["\\d",Uc],[On,Cc]],Lc=r=>{for(let[e,t]of kc)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},b=(r,e,t)=>{let n=Lc(e),i=Fc++;Tc(r,i,e),A[r]=i,m[i]=e,Nc[i]=n,Pc[i]=new RegExp(e,t?"g":void 0),Rc[i]=new RegExp(n,t?"g":void 0)};b("NUMERICIDENTIFIER","0|[1-9]\\d*");b("NUMERICIDENTIFIERLOOSE","\\d+");b("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${On}*`);b("MAINVERSION",`(${m[A.NUMERICIDENTIFIER]})\\.(${m[A.NUMERICIDENTIFIER]})\\.(${m[A.NUMERICIDENTIFIER]})`);b("MAINVERSIONLOOSE",`(${m[A.NUMERICIDENTIFIERLOOSE]})\\.(${m[A.NUMERICIDENTIFIERLOOSE]})\\.(${m[A.NUMERICIDENTIFIERLOOSE]})`);b("PRERELEASEIDENTIFIER",`(?:${m[A.NONNUMERICIDENTIFIER]}|${m[A.NUMERICIDENTIFIER]})`);b("PRERELEASEIDENTIFIERLOOSE",`(?:${m[A.NONNUMERICIDENTIFIER]}|${m[A.NUMERICIDENTIFIERLOOSE]})`);b("PRERELEASE",`(?:-(${m[A.PRERELEASEIDENTIFIER]}(?:\\.${m[A.PRERELEASEIDENTIFIER]})*))`);b("PRERELEASELOOSE",`(?:-?(${m[A.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${m[A.PRERELEASEIDENTIFIERLOOSE]})*))`);b("BUILDIDENTIFIER",`${On}+`);b("BUILD",`(?:\\+(${m[A.BUILDIDENTIFIER]}(?:\\.${m[A.BUILDIDENTIFIER]})*))`);b("FULLPLAIN",`v?${m[A.MAINVERSION]}${m[A.PRERELEASE]}?${m[A.BUILD]}?`);b("FULL",`^${m[A.FULLPLAIN]}$`);b("LOOSEPLAIN",`[v=\\s]*${m[A.MAINVERSIONLOOSE]}${m[A.PRERELEASELOOSE]}?${m[A.BUILD]}?`);b("LOOSE",`^${m[A.LOOSEPLAIN]}$`);b("GTLT","((?:<|>)?=?)");b("XRANGEIDENTIFIERLOOSE",`${m[A.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);b("XRANGEIDENTIFIER",`${m[A.NUMERICIDENTIFIER]}|x|X|\\*`);b("XRANGEPLAIN",`[v=\\s]*(${m[A.XRANGEIDENTIFIER]})(?:\\.(${m[A.XRANGEIDENTIFIER]})(?:\\.(${m[A.XRANGEIDENTIFIER]})(?:${m[A.PRERELEASE]})?${m[A.BUILD]}?)?)?`);b("XRANGEPLAINLOOSE",`[v=\\s]*(${m[A.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[A.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[A.XRANGEIDENTIFIERLOOSE]})(?:${m[A.PRERELEASELOOSE]})?${m[A.BUILD]}?)?)?`);b("XRANGE",`^${m[A.GTLT]}\\s*${m[A.XRANGEPLAIN]}$`);b("XRANGELOOSE",`^${m[A.GTLT]}\\s*${m[A.XRANGEPLAINLOOSE]}$`);b("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Ln}})(?:\\.(\\d{1,${Ln}}))?(?:\\.(\\d{1,${Ln}}))?`);b("COERCE",`${m[A.COERCEPLAIN]}(?:$|[^\\d])`);b("COERCEFULL",m[A.COERCEPLAIN]+`(?:${m[A.PRERELEASE]})?(?:${m[A.BUILD]})?(?:$|[^\\d])`);b("COERCERTL",m[A.COERCE],!0);b("COERCERTLFULL",m[A.COERCEFULL],!0);b("LONETILDE","(?:~>?)");b("TILDETRIM",`(\\s*)${m[A.LONETILDE]}\\s+`,!0);Ce.tildeTrimReplace="$1~";b("TILDE",`^${m[A.LONETILDE]}${m[A.XRANGEPLAIN]}$`);b("TILDELOOSE",`^${m[A.LONETILDE]}${m[A.XRANGEPLAINLOOSE]}$`);b("LONECARET","(?:\\^)");b("CARETTRIM",`(\\s*)${m[A.LONECARET]}\\s+`,!0);Ce.caretTrimReplace="$1^";b("CARET",`^${m[A.LONECARET]}${m[A.XRANGEPLAIN]}$`);b("CARETLOOSE",`^${m[A.LONECARET]}${m[A.XRANGEPLAINLOOSE]}$`);b("COMPARATORLOOSE",`^${m[A.GTLT]}\\s*(${m[A.LOOSEPLAIN]})$|^$`);b("COMPARATOR",`^${m[A.GTLT]}\\s*(${m[A.FULLPLAIN]})$|^$`);b("COMPARATORTRIM",`(\\s*)${m[A.GTLT]}\\s*(${m[A.LOOSEPLAIN]}|${m[A.XRANGEPLAIN]})`,!0);Ce.comparatorTrimReplace="$1$2$3";b("HYPHENRANGE",`^\\s*(${m[A.XRANGEPLAIN]})\\s+-\\s+(${m[A.XRANGEPLAIN]})\\s*$`);b("HYPHENRANGELOOSE",`^\\s*(${m[A.XRANGEPLAINLOOSE]})\\s+-\\s+(${m[A.XRANGEPLAINLOOSE]})\\s*$`);b("STAR","(<|>)?=?\\s*\\*");b("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");b("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var gr=w((Gx,Oo)=>{"use strict";a();var Oc=Object.freeze({loose:!0}),_c=Object.freeze({}),Qc=r=>r?typeof r!="object"?Oc:r:_c;Oo.exports=Qc});var _n=w((Vx,Mo)=>{"use strict";a();var _o=/^[0-9]+$/,Qo=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=_o.test(r),n=_o.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Mc=(r,e)=>Qo(e,r);Mo.exports={compareIdentifiers:Qo,rcompareIdentifiers:Mc}});var X=w((Yx,$o)=>{"use strict";a();var mr=Vt(),{MAX_LENGTH:Go,MAX_SAFE_INTEGER:Ar}=$t(),{safeRe:wr,t:Er}=Ct(),Gc=gr(),{compareIdentifiers:Qn}=_n(),Mn=class r{constructor(e,t){if(t=Gc(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Go)throw new TypeError(`version is longer than ${Go} characters`);mr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?wr[Er.LOOSE]:wr[Er.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Ar||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ar||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ar||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<Ar)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(mr("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],i=e.prerelease[t];if(mr("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Qn(n,i)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let n=this.build[t],i=e.build[t];if(mr("build compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Qn(n,i)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?wr[Er.PRERELEASELOOSE]:wr[Er.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let o=[t,i];n===!1&&(o=[t]),Qn(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};$o.exports=Mn});var ct=w((qx,zo)=>{"use strict";a();var Vo=X(),$c=(r,e,t=!1)=>{if(r instanceof Vo)return r;try{return new Vo(r,e)}catch(n){if(!t)return null;throw n}};zo.exports=$c});var Ho=w((Wx,Yo)=>{"use strict";a();var Vc=ct(),zc=(r,e)=>{let t=Vc(r,e);return t?t.version:null};Yo.exports=zc});var Ko=w((Xx,qo)=>{"use strict";a();var Yc=ct(),Hc=(r,e)=>{let t=Yc(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};qo.exports=Hc});var Xo=w((Zx,jo)=>{"use strict";a();var Wo=X(),qc=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Wo(r instanceof Wo?r.version:r,t).inc(e,n,i).version}catch{return null}};jo.exports=qc});var ev=w((t2,Zo)=>{"use strict";a();var Jo=ct(),Kc=(r,e)=>{let t=Jo(r,null,!0),n=Jo(e,null,!0),i=t.compare(n);if(i===0)return null;let o=i>0,v=o?t:n,s=o?n:t,u=!!v.prerelease.length;if(!!s.prerelease.length&&!u){if(!s.patch&&!s.minor)return"major";if(s.compareMain(v)===0)return s.minor&&!s.patch?"minor":"patch"}let f=u?"pre":"";return t.major!==n.major?f+"major":t.minor!==n.minor?f+"minor":t.patch!==n.patch?f+"patch":"prerelease"};Zo.exports=Kc});var rv=w((n2,tv)=>{"use strict";a();var Wc=X(),jc=(r,e)=>new Wc(r,e).major;tv.exports=jc});var iv=w((o2,nv)=>{"use strict";a();var Xc=X(),Jc=(r,e)=>new Xc(r,e).minor;nv.exports=Jc});var vv=w((s2,ov)=>{"use strict";a();var Zc=X(),ef=(r,e)=>new Zc(r,e).patch;ov.exports=ef});var uv=w((a2,sv)=>{"use strict";a();var tf=ct(),rf=(r,e)=>{let t=tf(r,e);return t&&t.prerelease.length?t.prerelease:null};sv.exports=rf});var pe=w((f2,cv)=>{"use strict";a();var av=X(),nf=(r,e,t)=>new av(r,t).compare(new av(e,t));cv.exports=nf});var lv=w((y2,fv)=>{"use strict";a();var of=pe(),vf=(r,e,t)=>of(e,r,t);fv.exports=vf});var pv=w((h2,yv)=>{"use strict";a();var sf=pe(),uf=(r,e)=>sf(r,e,!0);yv.exports=uf});var Ir=w((d2,xv)=>{"use strict";a();var hv=X(),af=(r,e,t)=>{let n=new hv(r,t),i=new hv(e,t);return n.compare(i)||n.compareBuild(i)};xv.exports=af});var gv=w((m2,dv)=>{"use strict";a();var cf=Ir(),ff=(r,e)=>r.sort((t,n)=>cf(t,n,e));dv.exports=ff});var Av=w((w2,mv)=>{"use strict";a();var lf=Ir(),yf=(r,e)=>r.sort((t,n)=>lf(n,t,e));mv.exports=yf});var zt=w((I2,wv)=>{"use strict";a();var pf=pe(),hf=(r,e,t)=>pf(r,e,t)>0;wv.exports=hf});var br=w((B2,Ev)=>{"use strict";a();var xf=pe(),df=(r,e,t)=>xf(r,e,t)<0;Ev.exports=df});var Gn=w((D2,Iv)=>{"use strict";a();var gf=pe(),mf=(r,e,t)=>gf(r,e,t)===0;Iv.exports=mf});var $n=w((U2,bv)=>{"use strict";a();var Af=pe(),wf=(r,e,t)=>Af(r,e,t)!==0;bv.exports=wf});var Br=w((P2,Bv)=>{"use strict";a();var Ef=pe(),If=(r,e,t)=>Ef(r,e,t)>=0;Bv.exports=If});var Sr=w((N2,Sv)=>{"use strict";a();var bf=pe(),Bf=(r,e,t)=>bf(r,e,t)<=0;Sv.exports=Bf});var Vn=w((k2,Dv)=>{"use strict";a();var Sf=Gn(),Df=$n(),Cf=zt(),Uf=Br(),Tf=br(),Pf=Sr(),Rf=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Sf(r,t,n);case"!=":return Df(r,t,n);case">":return Cf(r,t,n);case">=":return Uf(r,t,n);case"<":return Tf(r,t,n);case"<=":return Pf(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Dv.exports=Rf});var Uv=w((O2,Cv)=>{"use strict";a();var Nf=X(),Ff=ct(),{safeRe:Dr,t:Cr}=Ct(),kf=(r,e)=>{if(r instanceof Nf)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?Dr[Cr.COERCEFULL]:Dr[Cr.COERCE]);else{let u=e.includePrerelease?Dr[Cr.COERCERTLFULL]:Dr[Cr.COERCERTL],c;for(;(c=u.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||c.index+c[0].length!==t.index+t[0].length)&&(t=c),u.lastIndex=c.index+c[1].length+c[2].length;u.lastIndex=-1}if(t===null)return null;let n=t[2],i=t[3]||"0",o=t[4]||"0",v=e.includePrerelease&&t[5]?`-${t[5]}`:"",s=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Ff(`${n}.${i}.${o}${v}${s}`,e)};Cv.exports=kf});var Pv=w((Q2,Tv)=>{"use strict";a();var zn=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};Tv.exports=zn});var he=w((G2,kv)=>{"use strict";a();var Lf=/\s+/g,Yn=class r{constructor(e,t){if(t=_f(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof Hn)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(Lf," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!Nv(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&Yf(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let n=0;n<t.length;n++)n>0&&(this.formatted+=" "),this.formatted+=t[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&Vf)|(this.options.loose&&zf))+":"+e,i=Rv.get(n);if(i)return i;let o=this.options.loose,v=o?Z[J.HYPHENRANGELOOSE]:Z[J.HYPHENRANGE];e=e.replace(v,t1(this.options.includePrerelease)),N("hyphen replace",e),e=e.replace(Z[J.COMPARATORTRIM],Mf),N("comparator trim",e),e=e.replace(Z[J.TILDETRIM],Gf),N("tilde trim",e),e=e.replace(Z[J.CARETTRIM],$f),N("caret trim",e);let s=e.split(" ").map(p=>Hf(p,this.options)).join(" ").split(/\s+/).map(p=>e1(p,this.options));o&&(s=s.filter(p=>(N("loose invalid filter",p,this.options),!!p.match(Z[J.COMPARATORLOOSE])))),N("range list",s);let u=new Map,c=s.map(p=>new Hn(p,this.options));for(let p of c){if(Nv(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let f=[...u.values()];return Rv.set(n,f),f}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>Fv(n,t)&&e.set.some(i=>Fv(i,t)&&n.every(o=>i.every(v=>o.intersects(v,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Qf(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(r1(this.set[t],e,this.options))return!0;return!1}};kv.exports=Yn;var Of=Pv(),Rv=new Of,_f=gr(),Hn=Yt(),N=Vt(),Qf=X(),{safeRe:Z,t:J,comparatorTrimReplace:Mf,tildeTrimReplace:Gf,caretTrimReplace:$f}=Ct(),{FLAG_INCLUDE_PRERELEASE:Vf,FLAG_LOOSE:zf}=$t(),Nv=r=>r.value==="<0.0.0-0",Yf=r=>r.value==="",Fv=(r,e)=>{let t=!0,n=r.slice(),i=n.pop();for(;t&&n.length;)t=n.every