1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,346311,(e,t,r)=>{"use strict";var n=e.i(467034);Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t=e.length,r=t%4;if(!r)return e;var i=t,o=4-r,a=t+o,s=n.Buffer.alloc(a);for(s.write(e);o--;)s.write("=",i++);return s.toString()}},376544,(e,t,r)=>{"use strict";var n=e.i(467034);Object.defineProperty(r,"__esModule",{value:!0});var i=e.r(346311);function o(e,t){return(void 0===t&&(t="utf8"),n.Buffer.isBuffer(e))?s(e.toString("base64")):s(n.Buffer.from(e,t).toString("base64"))}function a(e){return e=e.toString(),i.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function s(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o.encode=o,o.decode=function(e,t){return void 0===t&&(t="utf8"),n.Buffer.from(a(e),"base64").toString(t)},o.toBase64=a,o.fromBase64=s,o.toBuffer=function(e){return n.Buffer.from(a(e),"base64")},r.default=o},406170,(e,t,r)=>{t.exports=e.r(376544).default,t.exports.default=t.exports},589485,e=>{"use strict";let t=e.i(406170).default;e.s(["cloneDeep",0,function(e){try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}},"htmlToElement",0,e=>{let t=window.document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild},"jsonToBase64",0,function(e){return t.encode(JSON.stringify(e))},"safeatob",0,function(e){return t.decode(e)}])},335458,(e,t,r)=>{"use strict";var n,i,o,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "};function s(e){throw{name:"SyntaxError",message:e,at:n,text:o}}function l(e){return e&&e!==i&&s("Expected '"+e+"' instead of '"+i+"'"),i=o.charAt(n),n+=1,i}function f(){var e,t="";for("-"===i&&(t="-",l("-"));i>="0"&&i<="9";)t+=i,l();if("."===i)for(t+=".";l()&&i>="0"&&i<="9";)t+=i;if("e"===i||"E"===i)for(t+=i,l(),("-"===i||"+"===i)&&(t+=i,l());i>="0"&&i<="9";)t+=i,l();return isFinite(e=Number(t))||s("Bad number"),e}function u(){var e,t,r,n="";if('"'===i)for(;l();)if('"'===i)return l(),n;else if("\\"===i)if(l(),"u"===i){for(t=0,r=0;t<4&&isFinite(e=parseInt(l(),16));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else if("string"==typeof a[i])n+=a[i];else break;else n+=i;s("Bad string")}function c(){for(;i&&i<=" ";)l()}function d(){switch(c(),i){case"{":var e,t={};if("{"===i){if(l("{"),c(),"}"===i)return l("}"),t;for(;i;){if(e=u(),c(),l(":"),Object.prototype.hasOwnProperty.call(t,e)&&s('Duplicate key "'+e+'"'),t[e]=d(),c(),"}"===i)return l("}"),t;l(","),c()}}s("Bad object");return;case"[":var r=[];if("["===i){if(l("["),c(),"]"===i)return l("]"),r;for(;i;){if(r.push(d()),c(),"]"===i)return l("]"),r;l(","),c()}}s("Bad array");return;case'"':return u();case"-":return f();default:return i>="0"&&i<="9"?f():function(){switch(i){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null;default:s("Unexpected '"+i+"'")}}()}}t.exports=function(e,t){var r;return o=e,n=0,i=" ",r=d(),c(),i&&s("Syntax error"),"function"==typeof t?function e(r,n){var i,o,a=r[n];if(a&&"object"==typeof a)for(i in d)Object.prototype.hasOwnProperty.call(a,i)&&(void 0===(o=e(a,i))?delete a[i]:a[i]=o);return t.call(r,n,a)}({"":r},""):r}},989445,(e,t,r)=>{"use strict";var n,i,o,a=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function l(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}t.exports=function(e,t,r){var a;if(n="",i="","number"==typeof r)for(a=0;a<r;a+=1)i+=" ";else"string"==typeof r&&(i=r);if(o=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw Error("JSON.stringify");return function e(t,r){var a,s,f,u,c,d=n,h=r[t];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(t)),"function"==typeof o&&(h=o.call(r,t,h)),typeof h){case"string":return l(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(n+=i,c=[],"[object Array]"===Object.prototype.toString.apply(h)){for(a=0,u=h.length;a<u;a+=1)c[a]=e(a,h)||"null";return f=0===c.length?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+d+"]":"["+c.join(",")+"]",n=d,f}if(o&&"object"==typeof o)for(a=0,u=o.length;a<u;a+=1)"string"==typeof(s=o[a])&&(f=e(s,h))&&c.push(l(s)+(n?": ":":")+f);else for(s in h)Object.prototype.hasOwnProperty.call(h,s)&&(f=e(s,h))&&c.push(l(s)+(n?": ":":")+f);return f=0===c.length?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+d+"}":"{"+c.join(",")+"}",n=d,f}}("",{"":e})}},232848,(e,t,r)=>{"use strict";r.parse=e.r(335458),r.stringify=e.r(989445)},649947,(e,t,r)=>{var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},446878,(e,t,r)=>{"use strict";var n=Object.prototype.toString;t.exports=function(e){var t=n.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===n.call(e.callee)),r}},303860,(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=e.r(446878),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),f=s.call(function(){}
1,"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("u"<typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{c(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),p=function(e){if("u"<typeof window||!h)return c(e);try{return c(e)}catch(e){return!1}};n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),c=[];if(!t&&!r&&!n)throw TypeError("Object.keys called on a non-object");var d=f&&r;if(s&&e.length>0&&!i.call(e,0))for(var h=0;h<e.length;++h)c.push(String(h));if(n&&e.length>0)for(var g=0;g<e.length;++g)c.push(String(g));else for(var y in e)!(d&&"prototype"===y)&&i.call(e,y)&&c.push(String(y));if(l)for(var b=p(e),m=0;m<u.length;++m)!(b&&"constructor"===u[m])&&i.call(e,u[m])&&c.push(u[m]);return c}}t.exports=n},892866,(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=e.r(446878),o=Object.keys,a=o?function(e){return o(e)}:e.r(303860),s=Object.keys;a.shim=function(){return Object.keys?!function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)&&(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)}):Object.keys=a,Object.keys||a},t.exports=a},608435,(e,t,r)=>{"use strict";t.exports=Object},639857,(e,t,r)=>{"use strict";t.exports=Error},974660,(e,t,r)=>{"use strict";t.exports=EvalError},930575,(e,t,r)=>{"use strict";t.exports=RangeError},265756,(e,t,r)=>{"use strict";t.exports=ReferenceError},143e3,(e,t,r)=>{"use strict";t.exports=SyntaxError},8224,(e,t,r)=>{"use strict";t.exports=TypeError},420570,(e,t,r)=>{"use strict";t.exports=URIError},860410,(e,t,r)=>{"use strict";t.exports=Math.abs},692069,(e,t,r)=>{"use strict";t.exports=Math.floor},400315,(e,t,r)=>{"use strict";t.exports=Math.max},869897,(e,t,r)=>{"use strict";t.exports=Math.min},755752,(e,t,r)=>{"use strict";t.exports=Math.pow}
1,156056,(e,t,r)=>{"use strict";t.exports=Math.round},280407,(e,t,r)=>{"use strict";t.exports=Number.isNaN||function(e){return e!=e}},159532,(e,t,r)=>{"use strict";var n=e.r(280407);t.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},267359,(e,t,r)=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},593892,(e,t,r)=>{"use strict";var n=e.r(267359);if(n)try{n([],"length")}catch(e){n=null}t.exports=n},123775,(e,t,r)=>{"use strict";var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}t.exports=n},651739,(e,t,r)=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},130949,(e,t,r)=>{"use strict";var n="u">typeof Symbol&&Symbol,i=e.r(651739);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},675672,(e,t,r)=>{"use strict";t.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},343264,(e,t,r)=>{"use strict";t.exports=e.r(608435).getPrototypeOf||null},277018,(e,t,r)=>{"use strict";var n=Object.prototype.toString,i=Math.max,o=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},a=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},s=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};t.exports=function(e){var t,r=this;if("function"!=typeof r||"[object Function]"!==n.apply(r))throw TypeError("Function.prototype.bind called on incompatible "+r);for(var l=a(arguments,1),f=i(0,r.length-l.length),u=[],c=0;c<f;c++)u[c]="$"+c;if(t=Function("binder","return function ("+s(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof t){var n=r.apply(this,o(l,arguments));return Object(n)===n?n:this}return r.apply(e,o(l,arguments))}),r.prototype){var d=function(){};d.prototype=r.prototype,t.prototype=new d,d.prototype=null}return t}},932672,(e,t,r)=>{"use strict";var n=e.r(277018);t.exports=Function.prototype.bind||n},600358,(e,t,r)=>{"use strict";t.exports=Function.prototype.call},102215,(e,t,r)=>{"use strict";t.exports=Function.prototype.apply},130637,(e,t,r)=>{"use strict";t.exports="u">typeof Reflect&&Reflect&&Reflect.apply},256450,(e,t,r)=>{"use strict";var n=e.r(932672),i=e.r(102215),o=e.r(600358);t.exports=e.r(130637)||n.call(o,i)},943569,(e,t,r)=>{"use strict";var n=e.r(932672),i=e.r(8224),o=e.r(600358),a=e.r(256450);t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return a(n,o,e)}},190482,(e,t,r)=>{"use strict";var n,i=e.r(943569),o=e.r(593892);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&o&&o(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;t.exports=a&&"function"==typeof a.get?i([a.get]):"function"==typeof l&&function(e){return l(null==e?e:s(e))}},942527,(e,t,r)=>{"use strict";var n=e.r(675672),i=e.r(343264),o=e.r(190482);t.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},705843,(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty;t.exports=e.r(932672).call(n,i)},578586,(e,t,r)=>{"use strict";var n=e.r(608435),i=e.r(639857),o=e.r(974660),a=e.r(930575),s=e.r(265756),l=e.r(143e3),f=e.r(8224),u=e.r(420570),c=e.r(860410),d=e.r(692069),h=e.r(400315),p=e.r(869897),g=e.r(755752),y=e.r(156056),b=e.r(159532),m=Function,w=function(e){try{return m('"use strict"; return ('+e+").constructor;")()}catch(e){}},E=e.r(593892),v=e.r(123775),x=function(){throw new f},_=E?function(){try{return arguments.callee,x}catch(e){try{return E(arguments,"callee").get}catch(e){return x}}}():x,S=e.r(130949)(),A=e.r(942527),B=e.r(343264),R=e.r(675672),O=e.r(102215),I=e.r(600358),T={},N="u">typeof Uint8Array&&A?A(Uint8Array):void 0,P={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":S&&A?A([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"u"<typeof Atomics?void 0:Atomics,"%BigInt%":"u"<typeof BigInt?void 0:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float16Array%":"u"<typeof Float16Array?void 0:Float16Array,"%Float32Array%":"u"<typeof Float32Array?void 0:Float32Array,"%Float64Array%":"u"<typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":T,"%Int8Array%":"u"<typeof Int8Array?void 0:Int8Array,"%Int16Array%":"u"<typeof Int16Array?void 0:Int16Array,"%Int32Array%":"u"<typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":S&&A?A(A([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"u"<typeof Map?void 0:Map,"%MapIteratorPrototype%":"u">typeof Map&&S&&A?A(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":E,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?void 0:Promise,"%Proxy%":"u"<typeof Proxy?void 0:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"u"<typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?void 0:Set,"%SetIteratorPrototype%":"u">typeof Set&&S&&A?A(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&A?A(""[Symbol.iterator]()):void 0,"%Symbol%":S?Symbol:void 0,"%SyntaxError%":l,"%ThrowTypeError%":_,"%TypedArray%":N,"%TypeError%":f,"%Uint8Array%":"u"<typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?void 0:Uint32Array,"%URIError%":u,"%WeakMap%":"u"<typeof WeakMap?void 0:WeakMap,"%WeakRef%":"u"<typeof WeakRef?void 0:WeakRef,"%WeakSet%":"u"<typeof WeakSet?void 0:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":O,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":B,"%Math.abs%":c,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":p,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":b,"%Reflect.getPrototypeOf%":R};if(A)try{null.error}catch(e){var U=A(A(e));P["%Error.prototype%"]=U}var j=function e(t){var r;if("%AsyncFunction%"===t)r=w("async function () {}");else if("%GeneratorFunction%"===t)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=w("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&A&&(r=A(i.prototype))}return P[t]=r,r},C={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=e.r(932672),L=e.r(705843),M=k.call(I,Array.prototype.concat),D=k.call(O,Array.prototype.splice),F=k.call(I,String.prototype.replace),$=k.call(I,String.prototype.slice),q=k.call(I,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,z=function(e){var t=$(e,0,1),r=$(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return F(e,H,function(e,t,r,i){n[n.length]=r?F(i,W,"$1"):t||e}),n},V=function(e,t){var r,n=e;if(L(C,n)&&(n="%"+(r=C[n])[0]+"%"),L(P,n)){var i=P[n];if(i===T&&(i=j(n)),void 0===i&&!t)throw new f("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new f('"allowMissing" argument must be a boolean');if(null===q(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=z(e),n=r.length>0?r[0]:"",i=V("%"+n+"%",t),o=i.name,a=i.value,s=!1,u=i.alias;u&&(n=u[0],D(r,M([0,1],u)));for(var c=1,d=!0;c<r.length;c+=1){var h=r[c],p=$(h,0,1),g=$(h,-1);if(('"'===p||"'"===p||"`"===p||'"'===g||"'"===g||"`"===g)&&p!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==h&&d||(s=!0),n+="."+h,L(P,o="%"+n+"%"))a=P[o];
1else if(null!=a){if(!(h in a)){if(!t)throw new f("base intrinsic for "+e+" exists, but the property is not available.");return}if(E&&c+1>=r.length){var y=E(a,h);a=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[h]}else d=L(a,h),a=a[h];d&&!s&&(P[o]=a)}}return a}},900077,(e,t,r)=>{"use strict";var n=e.r(123775),i=e.r(143e3),o=e.r(8224),a=e.r(593892);t.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],c=!!a&&a(e,t);if(n)n(e,t,{configurable:null===f&&c?c.configurable:!f,enumerable:null===s&&c?c.enumerable:!s,value:r,writable:null===l&&c?c.writable:!l});else if(!u&&(s||l||f))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},982703,(e,t,r)=>{"use strict";var n=e.r(123775),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},t.exports=i},229211,(e,t,r)=>{"use strict";var n=e.r(578586),i=e.r(900077),o=e.r(982703)(),a=e.r(593892),s=e.r(8224),l=n("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,f=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(f=!1)}return(n||f||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},557735,(e,t,r)=>{"use strict";var n=e.r(932672),i=e.r(102215),o=e.r(256450);t.exports=function(){return o(n,i,arguments)}},647967,(e,t,r)=>{"use strict";var n=e.r(229211),i=e.r(123775),o=e.r(943569),a=e.r(557735);t.exports=function(e){var t=o(arguments),r=1+e.length-(arguments.length-1);return n(t,r>0?r:0,!0)},i?i(t.exports,"apply",{value:a}):t.exports.apply=a},325887,(e,t,r)=>{"use strict";var n=e.r(578586),i=e.r(943569),o=i([n("%String.prototype.indexOf%")]);t.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i([r]):r}},984723,(e,t,r)=>{"use strict";var n=("u">typeof JSON?JSON:e.r(232848)).stringify,i=e.r(649947),o=e.r(892866),a=e.r(647967),s=e.r(325887),l=s("Array.prototype.join"),f=s("Array.prototype.indexOf"),u=s("Array.prototype.splice"),c=s("Array.prototype.sort"),d=function(e,t){for(var r="",n=0;n<e;n+=1)r+=t;return r},h=function(e,t,r){return r};t.exports=function(e){var t=arguments.length>1?arguments[1]:void 0,r=t&&t.space||"";"number"==typeof r&&(r=d(r," "));var s=!!t&&"boolean"==typeof t.cycles&&t.cycles,p=t&&t.replacer?a(t.replacer):h;if(t&&void 0!==t.collapseEmpty&&"boolean"!=typeof t.collapseEmpty)throw TypeError("`collapseEmpty` must be a boolean, if provided");var g=!!t&&t.collapseEmpty,y="function"==typeof t?t:t&&t.cmp,b=y&&function(e){var t=y.length>2&&function(t){return e[t]};return function(r,n){return y({key:r,value:e[r]},{key:n,value:e[n]},t?{__proto__:null,get:t}:void 0)}},m=[];return function e(t,a,h,y){var w=r?"\n"+d(y,r):"",E=r?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),void 0!==(h=p(t,a,h))){if("object"!=typeof h||null===h)return n(h);var v=function(e,t){return g&&0===e.length?t:("[]"===t?"[":"{")+l(e,",")+w+("[]"===t?"]":"}")};if(i(h)){for(var x=[],_=0;_<h.length;_++){var S=e(h,_,h[_],y+1)||n(null);x[x.length]=w+r+S}return v(x,"[]")}if(-1!==f(m,h)){if(s)return n("__cycle__");throw TypeError("Converting circular structure to JSON")}m[m.length]=h;for(var A=c(o(h),b&&b(h)),x=[],_=0;_<A.length;_++){var a=A[_],B=e(h,a,h[a],y+1);if(B){var R=n(a)+E+B;x[x.length]=w+r+R}}return u(m,f(m,h),1),v(x,"{}")}}({"":e},"",e,0)}},411992,497043,e=>{"use strict";var t=e.i(209428);let r={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},n={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};e.s(["errorCodes",0,r,"errorValues",0,n],497043);var i=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)};let o=r.rpc.internal;function a(e){return Number.isInteger(e)}function s(e){return"string"==typeof e&&e.length>0}function l(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function f(e){return!!e&&!!a(e.code)&&!!s(e.message)&&(!e.stack||!!s(e.stack))}function u(e,t="Unspecified error message. This is a bug, please report it."){if(a(e)){let t=e.toString();if(i(n,t))return n[t].message;if(e>=-32099&&e<=-32e3)return"Unspecified server error."}return t}let c={code:o,message:u(o)};function d(e){try{JSON.parse(JSON.stringify(e,(e,t)=>{if("__proto__"===e||"constructor"===e||"function"==typeof t||"symbol"==typeof t)throw Error("Not valid json");return t}),(e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})}catch{return!1}return!0}function h(e){return Object.getOwnPropertyNames(e).reduce((t,r)=>{let n=e[r];return d(n)&&(t[r]=n),t},{})}function p(e){return Array.isArray(e)?e.map(e=>d(e)?e:l(e)?h(e):null):l(e)?h(e):d(e)?e:null}e.s(["dataHasCause",0,function(e){return l(e)&&i(e,"cause")&&l(e.cause)},"getMessageFromCode",0,u,"isPlainObject",0,function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch{return!1}},"serializeCause",0,p,"serializeJrpcError",0,function(e,{fallbackError:r=c,shouldIncludeStack:n=!0}={}
1){if(!f(r))throw Error("Must provide fallback error with integer number code and string message.");let i=function(e,r){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if(f(e))return e;let n=p(e);return(0,t.default)((0,t.default)({},r),{},{data:{cause:n}})}(e,r);return n||delete i.stack,i}],411992)},770094,e=>{"use strict";var t=e.i(211577),r=e.i(984723),n=e.i(411992),i=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)};function o(e,t){if("[Circular]"!==t)return t}class a extends Error{constructor(e,r,o){if(!Number.isInteger(e))throw Error('"code" must be an integer.');if(!r||"string"!=typeof r)throw Error('"message" must be a non-empty string.');(0,n.dataHasCause)(o)?(super(r,{cause:o.cause}),(0,t.default)(this,"cause",void 0),(0,t.default)(this,"code",void 0),(0,t.default)(this,"data",void 0),i(this,"cause")||Object.assign(this,{cause:o.cause})):(super(r),(0,t.default)(this,"cause",void 0),(0,t.default)(this,"code",void 0),(0,t.default)(this,"data",void 0)),void 0!==o&&(this.data=o),this.code=e,this.cause=null==o?void 0:o.cause}serialize(){let e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,n.isPlainObject)(this.data)&&(e.data.cause=(0,n.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,r.default)(this.serialize(),{replacer:o,space:2})}}e.s(["EthereumProviderError",0,class extends a{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}},"JsonRpcError",0,a])},731233,e=>{"use strict";var t=e.i(770094),r=e.i(497043),n=e.i(411992);function i(e){if(e){if("string"==typeof e)return[e];else if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:r}=e;if(t&&"string"!=typeof t)throw Error("Must specify string message.");return[null!=t?t:void 0,r]}}return[]}function o(e,r){let[o,a]=i(r);return new t.JsonRpcError(e,null!=o?o:(0,n.getMessageFromCode)(e),a)}function a(e,r){let[o,a]=i(r);return new t.EthereumProviderError(e,null!=o?o:(0,n.getMessageFromCode)(e),a)}e.s(["providerErrors",0,{userRejectedRequest:e=>a(r.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(r.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(r.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(r.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(r.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:r,message:n,data:i}=e;if(!n||"string"!=typeof n)throw Error('"message" must be a nonempty string');return new t.EthereumProviderError(r,n,i)}},"rpcErrors",0,{parse:e=>o(r.errorCodes.rpc.parse,e),invalidRequest:e=>o(r.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(r.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(r.errorCodes.rpc.methodNotFound,e),internal:e=>o(r.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw Error('"code" must be an integer such that: -32099 <= code
1<= -32005');return o(t,e)},invalidInput:e=>o(r.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(r.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(r.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(r.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(r.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(r.errorCodes.rpc.limitExceeded,e)}])},947871,(e,t,r)=>{var n,i,o,a=t.exports={};function s(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{i="function"==typeof clearTimeout?clearTimeout:l}catch(e){i=l}function f(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}var u=[],c=!1,d=-1;function h(){c&&o&&(c=!1,o.length?u=o.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=f(h);c=!0;for(var t=u.length;t;){for(o=u,u=[];++d<t;)o&&o[d].run();d=-1,t=u.length}o=null,c=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function y(){}a.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new g(e,t)),1!==u.length||c||f(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=y,a.addListener=y,a.once=y,a.off=y,a.removeListener=y,a.removeAllListeners=y,a.emit=y,a.prependListener=y,a.prependOnceListener=y,a.listeners=function(e){return[]},a.binding=function(e){throw Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw Error("process.chdir is not supported")},a.umask=function(){return 0}},73066,(e,t,r)=>{"use strict";t.exports={AggregateError:class extends Error{constructor(e){if(!Array.isArray(e))throw TypeError(`Expected input to be an Array, got ${typeof e}`);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack} 2`;super(t),this.name="AggregateError",this.errors=e}},ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},72874,(e,t,r)=>{"use strict";let{ArrayIsArray:n,ObjectSetPrototypeOf:i}=e.r(73066),{EventEmitter:o}=e.r(219298);function a(e){o.call(this,e)}function s(e,t,r){if("function"==typeof e.prependListener)return e.prepe
2ndListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(a.prototype,o.prototype),i(a,o),a.prototype.pipe=function(e,t){let r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",f));let a=!1;function l(){a||(a=!0,e.end())}function f(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){c(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function c(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",f),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return s(r,"error",u),s(e,"error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e},t.exports={Stream:a,prependListener:s}},734582,(e,t,r)=>{"use strict";r.byteLength=function(e){var t=f(e),r=t[0],n=t[1];return(r+n)*3/4-n},r.toByteArray=function(e){var t,r,n=f(e),a=n[0],s=n[1],l=new o((a+s)*3/4-s),u=0,c=s>0?a-4:a;for(r=0;r<c;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(function(e,t,r){for(var i,o=[],a=t;a<r;a+=3)i=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(n[i>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&o.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),o.join("")};for(var n=[],i=[],o="u">typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function f(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}i[45]=62,i[95]=63},638492,(e,t,r)=>{r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,f=l>>1,u=-7,c=r?i-1:0,d=r?-1:1,h=e[t+c];for(c+=d,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+c],c+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+c],c+=d,u-=8);if(0===o)o=1-f;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=f}return(h?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,l,f=8*o-i-1,u=(1<<f)-1,c=u>>1,d=5960464477539062e-23*(23===i),h=n?0:o-1,p=n?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+c>=1?t+=d/l:t+=d*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=u?(s=0,a=u):a+c>=1?(s=(t*l-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;e[r+h]=255&a,h+=p,a/=256,f-=8);e[r+h-p]|=128*g}},843943,(e,t,r)=>{"use strict";let n=e.r(734582),i=e.r(638492),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);let r=0|p(n,i),o=a(r),l=o.write(n,i);return l!==r&&(o=o.slice(0,l)),o}if(ArrayBuffer.isView(e)){var o=e;if(L(o,Uint8Array)){let e=new Uint8Array(o);return d(e.buffer,e.byteOffset,e.byteLength)}return c(o)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(L(e,SharedArrayBuffer)||e&&L(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return s.from(l,t,r);let f=function(e){if(s.isBuffer(e)){let t=0|h(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(f)return f;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');
vendor: 19,344 bytes, line 2
2if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return f(e),a(e<0?0:0|h(e))}function c(e){let t=e.length<0?0:0|h(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return C(e).length;default:if(i)return n?-1:j(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=M[e[n]];return i}(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":var o,a,s;return o=this,a=t,s=r,0===a&&s===o.length?n.fromByteArray(o):n.fromByteArray(o.slice(a,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}(this,t,r);default:if(i)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return m(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(f(e,o)===f(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===l)return n*a}else -1!==n&&(o-=o-n),n=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;n<l;n++)if(f(e,o+n)!==f(t,n)){r=!1;break}if(r)return o}return -1}function w(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let t=e[i],o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(r=e[i+1]))==128&&(l=(31&t)<<6|63&r)>127&&(o=l);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],(192&r)==128&&(192&n)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}var o=n;let a=o.length;if(a<=4096)return String.fromCharCode.apply(String,o);let s="",l=0;for(;l<a;)s+=String.fromCharCode.apply(String,o.slice(l,l+=4096));return s}function E(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function v(e,t,r,n,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function x(e,t,r,n,i){T(t,n,i,e,r,7);let o=Number(t&BigInt(0xffffffff));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function _(e,t,r,n,i){T(t,n,i,e,r,7);let o=Number(t&BigInt(0xffffffff));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function S(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function A(e,t,r,n,o){return t*=1,r>>>=0,o||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,o){return t*=1,r>>>=0,o||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}r.Buffer=s,r.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(f(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(L(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),L(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},s.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}},s.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){let t=e[r];if(L(t,Uint8Array))i+t.length>n.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(s.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?w(this,0,e):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(L(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,a=r-t,l=Math.min(o,a),f=this.slice(n,i),u=e.slice(t,r);for(let e=0;e<l;++e)if(f[e]!==u[e]){o=f[e],a=u[e];break}return o<a?-1:+(a<o)},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){var i,o,a,s,l,f,u,c;if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let h=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let i;r=Number(r)||0;let o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;let a=t.length;for(n>a/2&&(n=a/2),i=0;i<n;++i){var s;let n=parseInt(t.substr(2*i,2),16);if((s=n)!=s)break;e[r+i]=n}return i}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,k(j(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return a=t,s=r,k(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return l=t,f=r,k(C(e),this,l,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,c=r,k(function(e,t){let r,n,i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-u),this,u,c);default:if(h)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),h=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&P(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&P(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],i=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||E(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&P(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),s.prototype.readBigInt64BE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&P(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;v(this,e,t,r,n,0)}let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;v(this,e,t,r,n,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=D(function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=D(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);v(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);v(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=D(function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=D(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,r){return A(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return A(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},s.prototype.fill=function(e,t,r,n){let i;if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{let o=s.isBuffer(e)?e:s.from(e,n),a=o.length;
2if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};let R={};function O(e,t,r){R[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function I(e){let t="",r=e.length,n=+("-"===e[0]);for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function T(e,t,r,n,i,o){if(e>r||e<t){let n,i="bigint"==typeof t?"n":"";throw n=o>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new R.ERR_OUT_OF_RANGE("value",n,e)}N(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&P(i,n.length-(o+1))}function N(e,t){if("number"!=typeof e)throw new R.ERR_INVALID_ARG_TYPE(t,"number",e)}function P(e,t,r){if(Math.floor(e)!==e)throw N(e,r),new R.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new R.ERR_BUFFER_OUT_OF_BOUNDS;throw new R.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}O("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),O("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=I(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=I(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let U=/[^+/0-9A-Za-z-_]/g;function j(e,t){let r;t=t||1/0;let n=e.length,i=null,o=[];for(let a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function C(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function k(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let M=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function D(e){return"u"<typeof BigInt?F:e}function F(){throw Error("BigInt not supported")}},178205,(e,t,r)=>{"use strict";t.exports={format:(e,...t)=>e.replace(/%([sdifj])/g,function(...[e,r]){let n=t.shift();if("f"===r)return n.toFixed(6);if("j"===r)return JSON.stringify(n);if("s"!==r||"object"!=typeof n)return n.toString();{let e=n.constructor!==Object?n.constructor.name:"";return`${e} {}`.trim()}}),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;else if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":if(isNaN(e))return"NaN";if(Object.is(e,-0))return String(e);return e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}}},101750,(e,t,r)=>{"use strict";let{format:n,inspect:i}=e.r(178205),{AggregateError:o}=e.r(73066),a=globalThis.AggregateError||o,s=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],f=/^([A-Z][a-z0-9]*)+$/,u={};function c(e,t){if(!e)throw new u.ERR_INTERNAL_ASSERTION(t)}function d(e){let t="",r=e.length,n=+("-"===e[0]);for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return c(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);let i=(t.match(/%[dfijoOs]/g)||[]).length;return(c(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length)?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,
2configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[s]=!0,u[e]=i}function p(e){let t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",(e,t,r)=>{c("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";let o=[],a=[],s=[];for(let e of t)c("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):f.test(e)?a.push(e):(c("object"!==e,'The value "object" should be written as "Object"'),s.push(e));if(a.length>0){let e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),a.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{let e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(a.length>0||s.length>0)&&(n+=" or ")}if(a.length>0){switch(a.length){case 1:n+=`an instance of ${a[0]}`;break;case 2:n+=`an instance of ${a[0]} or ${a[1]}`;break;default:{let e=a.pop();n+=`an instance of ${a.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{let e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var u;if(null!=(u=r.constructor)&&u.name)n+=`. Received an instance of ${r.constructor.name}`;else{let e=i(r,{depth:-1});n+=`. Received ${e}`}}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n},TypeError),h("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let n=i(t);n.length>128&&(n=n.slice(0,128)+"...");let o=e.includes(".")?"property":"argument";return`The ${o} '${e}' ${r}. Received ${n}`},TypeError),h("ERR_INVALID_RETURN_VALUE",(e,t,r)=>{var n;let i=null!=r&&null!=(n=r.constructor)&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${e} to be returned from the "${t}" function but got ${i}.`},TypeError),h("ERR_MISSING_ARGS",(...e)=>{let t;c(e.length>0,"At least one arg needs to be specified");let r=e.length;switch(e=(Array.isArray(e)?e:[e]).map(e=>`"${e}"`).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{let r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`},TypeError),h("ERR_OUT_OF_RANGE",(e,t,r)=>{let n;if(c(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>0x100000000)n=d(String(r));else if("bigint"==typeof r){n=String(r);let e=BigInt(2)**BigInt(32);(r>e||r<-e)&&(n=d(n)),n+="n"}else n=i(r);return`The value of "${e}" is out of range. It must be ${t}. Received ${n}`},RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exp
2orts={AbortError:class extends Error{constructor(e="The operation was aborted",t){if(void 0!==t&&"object"!=typeof t)throw new u.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}},aggregateTwoErrors:p(function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;let r=new a([t,e],t.message);return r.code=t.code,r}return e||t}),hideStackFrames:p,codes:u}},573939,(e,t,r)=>{"use strict";let{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=e.r(73066),a=o("nodejs.stream.destroyed"),s=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),f=o("nodejs.stream.writable"),u=o("nodejs.stream.disturbed"),c=o("nodejs.webstream.isClosedPromise");function d(e,t=!1){var r;return!!(e&&"function"==typeof e.pipe&&"function"==typeof e.on&&(!t||"function"==typeof e.pause&&"function"==typeof e.resume)&&(!e._writableState||(null==(r=e._readableState)?void 0:r.readable)!==!1)&&(!e._writableState||e._readableState))}function h(e){var t;return!!(e&&"function"==typeof e.write&&"function"==typeof e.on&&(!e._readableState||(null==(t=e._writableState)?void 0:t.writable)!==!1))}function p(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!!(e&&!p(e)&&"function"==typeof e.pipeThrough&&"function"==typeof e.getReader&&"function"==typeof e.cancel)}function y(e){return!!(e&&!p(e)&&"function"==typeof e.getWriter&&"function"==typeof e.abort)}function b(e){return!!(e&&!p(e)&&"object"==typeof e.readable&&"object"==typeof e.writable)}function m(e){if(!p(e))return null;let t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function w(e){if(!h(e))return null;if(!0===e.writableEnded)return!0;let t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function E(e,t){if(!d(e))return null;let r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function v(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!m(e)&&d(e)&&e.readable&&!E(e)}function x(e){return e&&null!=e[f]?e[f]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!m(e)&&h(e)&&e.writable&&!w(e)}function _(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function S(e){return"boolean"==typeof e._sent100&&_(e)}t.exports={isDestroyed:m,kIsDestroyed:a,isDisturbed:function(e){var t;return!!(e&&(null!=(t=e[u])?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:u,isErrored:function(e){var t,r,n,i,o,a,l,f,u,c;return!!(e&&(null!=(t=null!=(r=null!=(n=null!=(i=null!=(o=null!=(a=e[s])?a:e.readableErrored)?o:e.writableErrored)?i:null==(l=e._readableState)?void 0:l.errorEmitted)?n:null==(f=e._writableState)?void 0:f.errorEmitted)?r:null==(u=e._readableState)?void 0:u.errored)?t:null==(c=e._writableState)?void 0:c.errored))},kIsErrored:s,isReadable:v,kIsReadable:l,kIsClosedPromise:c,kControllerErrorFunction:o("nodejs.webstream.controllerErrorFunction"),kIsWritable:f,isClosed:function(e){if(!p(e))return null;if("boolean"==typeof e.closed)return e.closed;let t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&_(e)?e._closed:null},isDuplexNodeStream:function(e){return!!(e&&"function"==typeof e.pipe&&e._readableState&&"function"==typeof e.on&&"function"==typeof e.write)},isFinished:function(e,t){return p(e)?!!m(e)||!((null==t?void 0:t.readable)!==!1&&v(e)||(null==t?void 0:t.writable)!==!1&&x(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:d,isReadableStream:g,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;let t=e._readableState;return!!t&&!t.errored&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:E,isReadableErrored:function(e){var t,r;return p(e)?e.readableErrored?e.readableErrored:null!=(t=null==(r=e._readableState)?void 0:r.errored)?t:null:null}
2,isNodeStream:p,isWebStream:function(e){return g(e)||y(e)||b(e)},isWritable:x,isWritableNodeStream:h,isWritableStream:y,isWritableEnded:w,isWritableFinished:function(e,t){if(!h(e))return null;if(!0===e.writableFinished)return!0;let r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return p(e)?e.writableErrored?e.writableErrored:null!=(t=null==(r=e._writableState)?void 0:r.errored)?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&(null==(t=e.req)?void 0:t.upgradeOrConnect)===void 0},isServerResponse:S,willEmitClose:function(e){if(!p(e))return null;let t=e._writableState,r=e._readableState,n=t||r;return!n&&S(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},872555,(e,t,r)=>{"use strict";let n=e.f({process:{id:()=>947871,module:()=>e.r(947871)},"process/":{id:()=>947871,module:()=>e.r(947871)}})("process/"),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:a}=e.r(101750),{Symbol:s}=e.r(73066),{kIsDestroyed:l,isDestroyed:f,isFinished:u,isServerRequest:c}=e.r(573939),d=s("kDestroy"),h=s("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function g(e,t,r){let i=!1;function o(t){if(i)return;i=!0;let o=e._readableState,a=e._writableState;p(t,a,o),a&&(a.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(y,e,t):n.nextTick(b,e)}try{e._destroy(t||null,o)}catch(e){o(e)}}function y(e,t){m(e,t),b(e)}function b(e){let t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function m(e,t){let r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function w(e,t,r){let i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(m,e,t):m(e,t))}function E(e){let t=!1;function r(r){if(t)return void w(e,null!=r?r:new o);t=!0;let i=e._readableState,a=e._writableState,s=a||i;i&&(i.constructed=!0),a&&(a.constructed=!0),s.destroyed?e.emit(d,r):r?w(e,r,!0):n.nextTick(v,e)}try{e._construct(e=>{n.nextTick(r,e)})}catch(e){n.nextTick(r,e)}}function v(e){e.emit(h)}function x(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function _(e){e.emit("close")}function S(e,t){e.emit("error",t),n.nextTick(_,e)}t.exports={construct:function(e,t){if("function"!=typeof e._construct)return;let r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(E,e)},destroyer:function(e,t){!(!e||f(e))&&(t||u(e)||(t=new a),c(e)?(e.socket=null,e.destroy(t)):x(e)?e.abort():x(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(S,e,t):n.nextTick(_,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){let r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?"function"==typeof t&&t():(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?g(this,e,t):this.once(d,function(r){g(this,i(r,e),t)})),this},undestroy:function(){let e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:w}},71392,(e,t,r)=>{"use strict";let{AbortController:n,AbortSignal}="u">typeof self?self:"u">typeof window?window:void 0;t.exports=n,t.exports.AbortSignal=AbortSignal,t.exports.default=n},957922,(e,t,r)=>{"use strict";let n=e.r(843943),{format:i,inspect:o}=e.r(178205),{codes:{ERR_INVALID_ARG_TYPE:a}}=e.r(101750),{kResistStopPropagation:s,AggregateError:l,SymbolDispose:f}=e.r(73066),AbortSignal=globalThis.AbortSignal||e.r(71392).AbortSignal,u=globalThis.AbortController||e.r(71392).AbortController,c=Object.getPrototypeOf(async function(){}).constructor,d=globalThis.Blob||n.Blob,h=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new a(t,"AbortSignal",e)};t.exports={AggregateError:l,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}},promisify:e=>new Promise((t,r)=>
2{e((e,...n)=>e?r(e):t(...n))}),debuglog:()=>function(){},format:i,inspect:o,types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:void 0!==d?function(e){return e instanceof d}:function(e){return!1},deprecate:(e,t)=>e,addAbortListener:e.r(219298).addAbortListener||function(e,t){let r;if(void 0===e)throw new a("signal","AbortSignal",e);h(e,"signal");if("function"!=typeof t)throw new a("listener","Function",t);return e.aborted?queueMicrotask(()=>t()):(e.addEventListener("abort",t,{__proto__:null,once:!0,[s]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[f](){var e;null==(e=r)||e()}}},AbortSignalAny:AbortSignal.any||function(e){if(1===e.length)return e[0];let t=new u,r=()=>t.abort();return e.forEach(e=>{h(e,"signals"),e.addEventListener("abort",r,{once:!0})}),t.signal.addEventListener("abort",()=>{e.forEach(e=>e.removeEventListener("abort",r))},{once:!0}),t.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},890076,(e,t,r)=>{"use strict";let{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:a,NumberIsInteger:s,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:f,NumberMIN_SAFE_INTEGER:u,NumberParseInt:c,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:g,StringPrototypeTrim:y}=e.r(73066),{hideStackFrames:b,codes:{ERR_SOCKET_BAD_PORT:m,ERR_INVALID_ARG_TYPE:w,ERR_INVALID_ARG_VALUE:E,ERR_OUT_OF_RANGE:v,ERR_UNKNOWN_SIGNAL:x}}=e.r(101750),{normalizeEncoding:_}=e.r(957922),{isAsyncFunction:S,isArrayBufferView:A}=e.r(957922).types,B={},R=/^[0-7]+$/,O=b((e,t,r=u,n=f)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!s(e))throw new v(t,"an integer",e);if(e<r||e>n)throw new v(t,`>= ${r} && <= ${n}`,e)}),I=b((e,t,r=-0x80000000,n=0x7fffffff)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!s(e))throw new v(t,"an integer",e);if(e<r||e>n)throw new v(t,`>= ${r} && <= ${n}`,e)}),T=b((e,t,r=!1)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!s(e))throw new v(t,"an integer",e);let n=+!!r;if(e<n||e>0xffffffff)throw new v(t,`>= ${n} && <= 4294967295`,e)});function N(e,t){if("string"!=typeof e)throw new w(t,"string",e)}let P=b((e,t,r)=>{if(!i(r,e))throw new E(t,e,"must be one of: "+o(a(r,e=>"string"==typeof e?`'${e}'`:p(e)),", "))});function U(e,t){if("boolean"!=typeof e)throw new w(t,"boolean",e)}function j(e,t,r){return null!=e&&d(e,t)?e[t]:r}let C=b((e,t,r=null)=>{let i=j(r,"allowArray",!1),o=j(r,"allowFunction",!1);if(!j(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new w(t,"Object",e)}),k=b((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new w(t,"a dictionary",e)}),L=b((e,t,r=0)=>{if(!n(e))throw new w(t,"Array",e);if(e.length<r)throw new E(t,e,`must be longer than ${r}`)}),M=b((e,t="buffer")=>{if(!A(e))throw new w(t,["Buffer","TypedArray","DataView"],e)}),D=b((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new w(t,"AbortSignal",e)}),F=b((e,t)=>{if("function"!=typeof e)throw new w(t,"Function",e)}),$=b((e,t)=>{if("function"!=typeof e||S(e))throw new w(t,"Function",e)}),q=b((e,t)=>{if(void 0!==e)throw new w(t,"undefined",e)}),H=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function W(e,t){if(void 0===e||!h(H,e))throw new E(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(R,e))throw new E(t,e,"must be a 32-bit unsigned integer or an octal string");e=c(e,8)}return T(e,t),e},validateArray:L,validateStringArray:function(e,t){L(e,t);for(let r=0;r<e.length;r++)N(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){L(e,t);for(let r=0;r<e.length;r++)U(e[r],`${t}[${r}]`)},validateAbortSignalArray:function(e,t){L(e,t);for(let r=0;r<e.length;r++){let n=e[r],i=`${t}[${r}]`;if(null==n)throw new w(i,"AbortSignal",n);D(n,i)}},validateBoolean:U,validateBuffer:M,validateDictionary:k,validateEncoding:function(e,t){let r=_(t),n=e.length;
2if("hex"===r&&n%2!=0)throw new E("encoding",t,`is invalid for data of length ${n}`)},validateFunction:F,validateInt32:I,validateInteger:O,validateNumber:function(e,t,r,n){if("number"!=typeof e)throw new w(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&l(e))throw new v(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:C,validateOneOf:P,validatePlainFunction:$,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=e>>>0||e>65535||0===e&&!r)throw new m(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===B[e]){if(void 0!==B[g(e)])throw new x(e+" (signals must use all capital letters)");throw new x(e)}},validateString:N,validateUint32:T,validateUndefined:q,validateUnion:function(e,t,r){if(!i(r,e))throw new w(t,`('${o(r,"|")}')`,e)},validateAbortSignal:D,validateLinkHeaderValue:function(e){if("string"==typeof e)return W(e,"hints"),e;if(n(e)){let t=e.length,r="";if(0===t)return r;for(let n=0;n<t;n++){let i=e[n];W(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new E("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},580843,(e,t,r)=>{"use strict";let n,i=e.f({process:{id:()=>947871,module:()=>e.r(947871)},"process/":{id:()=>947871,module:()=>e.r(947871)}})("process/"),{AbortError:o,codes:a}=e.r(101750),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:l}=a,{kEmptyObject:f,once:u}=e.r(957922),{validateAbortSignal:c,validateFunction:d,validateObject:h,validateBoolean:p}=e.r(890076),{Promise:g,PromisePrototypeThen:y,SymbolDispose:b}=e.r(73066),{isClosed:m,isReadable:w,isReadableNodeStream:E,isReadableStream:v,isReadableFinished:x,isReadableErrored:_,isWritable:S,isWritableNodeStream:A,isWritableStream:B,isWritableFinished:R,isWritableErrored:O,isNodeStream:I,willEmitClose:T,kIsClosedPromise:N}=e.r(573939),P=()=>{};function U(t,r,a){var p,g;if(2==arguments.length?(a=r,r=f):null==r?r=f:h(r,"options"),d(a,"callback"),
2c(r.signal,"options.signal"),a=u(a),v(t)||B(t))return function(t,r,a){let s=!1,l=P;if(r.signal)if(l=()=>{s=!0,a.call(t,new o(void 0,{cause:r.signal.reason}))},r.signal.aborted)i.nextTick(l);else{let i=(n=n||e.r(957922).addAbortListener)(r.signal,l),o=a;a=u((...e)=>{i[b](),o.apply(t,e)})}let f=(...e)=>{s||i.nextTick(()=>a.apply(t,e))};return y(t[N].promise,f,f),P}(t,r,a);if(!I(t))throw new s("stream",["ReadableStream","WritableStream","Stream"],t);let U=null!=(p=r.readable)?p:E(t),j=null!=(g=r.writable)?g:A(t),C=t._writableState,k=t._readableState,L=()=>{t.writable||F()},M=T(t)&&E(t)===U&&A(t)===j,D=R(t,!1),F=()=>{D=!0,t.destroyed&&(M=!1),M&&(!t.readable||U)||(!U||$)&&a.call(t)},$=x(t,!1),q=()=>{$=!0,t.destroyed&&(M=!1),M&&(!t.writable||j)||(!j||D)&&a.call(t)},H=e=>{a.call(t,e)},W=m(t),z=()=>{W=!0;let e=O(t)||_(t);return e&&"boolean"!=typeof e?a.call(t,e):U&&!$&&E(t,!0)&&!x(t,!1)||j&&!D&&!R(t,!1)?a.call(t,new l):void a.call(t)},V=()=>{W=!0;let e=O(t)||_(t);if(e&&"boolean"!=typeof e)return a.call(t,e);a.call(t)},Z=()=>{t.req.on("finish",F)};t.setHeader&&"function"==typeof t.abort?(t.on("complete",F),M||t.on("abort",z),t.req?Z():t.on("request",Z)):j&&!C&&(t.on("end",L),t.on("close",L)),M||"boolean"!=typeof t.aborted||t.on("aborted",z),t.on("end",q),t.on("finish",F),!1!==r.error&&t.on("error",H),t.on("close",z),W?i.nextTick(z):null!=C&&C.errorEmitted||null!=k&&k.errorEmitted?M||i.nextTick(V):!U&&(!M||w(t))&&(D||!1===S(t))||!j&&(!M||S(t))&&($||!1===w(t))?i.nextTick(V):k&&t.req&&t.aborted&&i.nextTick(V);let G=()=>{a=P,t.removeListener("aborted",z),t.removeListener("complete",F),t.removeListener("abort",z),t.removeListener("request",Z),t.req&&t.req.removeListener("finish",F),t.removeListener("end",L),t.removeListener("close",L),t.removeListener("finish",F),t.removeListener("end",q),t.removeListener("error",H),t.removeListener("close",z)};if(r.signal&&!W){let s=()=>{let e=a;G(),e.call(t,new o(void 0,{cause:r.signal.reason}))};if(r.signal.aborted)i.nextTick(s);else{let i=(n=n||e.r(957922).addAbortListener)(r.signal,s),o=a;a=u((...e)=>{i[b](),o.apply(t,e)})}}return G}t.exports=U,t.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=f),null!=(r=t)&&r.cleanup&&(p(t.cleanup,"cleanup"),n=t.cleanup),new g((r,i)=>{let o=U(e,t,e=>{n&&o(),e?i(e):r()})})}},546937,(e,t,r)=>{"use strict";let n,{SymbolDispose:i}=e.r(73066),{AbortError:o,codes:a}=e.r(101750),{isNodeStream:s,isWebStream:l,kControllerErrorFunction:f}=e.r(573939),u=e.r(580843),{ERR_INVALID_ARG_TYPE:c}=a;t.exports.addAbortSignal=function(e,r){if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e);if(!s(r)&&!l(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(t,r){if("object"!=typeof t||!("aborted"in t))return r;let a=s(r)?()=>{r.destroy(new o(void 0,{cause:t.reason}))}:()=>{r[f](new o(void 0,{cause:t.reason}))};return t.aborted?a():u(r,(n=n||e.r(957922).addAbortListener)(t,a)[i]),r}},254472,(e,t,r)=>{"use strict";let{MathFloor:n,NumberIsInteger:i}=e.r(73066),{validateInteger:o}=e.r(890076),{ERR_INVALID_ARG_VALUE:a}=e.r(101750).codes,s=16384,l=16;function f(e){return e?l:s}t.exports={getHighWaterMark:function(e,t,r,o){let s=null!=t.highWaterMark?t.highWaterMark:o?t[r]:null;if(null!=s){if(!i(s)||s<0)throw new a(o?`options.${r}`:"options.highWaterMark",s);return n(s)}return f(e.objectMode)},getDefaultHighWaterMark:f,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:s=t}}},317562,(e,t,r)=>{"use strict";let{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=e.r(73066),{Buffer:s}=e.r(843943),{inspect:l}=e.r(957922);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){let t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;let e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);let t=s.allocUnsafe(e>>>0),r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){let r=this.head.data;if(e<r.length){let t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{let o=r.data;if(e>o.length)t+=o,e-=o.length;else{e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}++i}while(null!==(r=r.next))return this.length-=i,t}_getBuffer(e){let t=s.allocUnsafe(e),r=e,n=this.head,i=0;do{let s=n.data;if(e>s.length)o(t,s,r-e),e-=s.length;else{e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}++i}while(null!==(n=n.next))return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},242524,(e,t,r)=>{var n=e.r(843943),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},619049,(e,t,r)=>{"use strict";var n=e.r(242524).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";
2case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=c,t=3;break;default:this.write=d,this.end=h;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},867526,(e,t,r)=>{"use strict";let n=e.f({process:{id:()=>947871,module:()=>e.r(947871)},"process/":{id:()=>947871,module:()=>e.r(947871)}})("process/"),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:a}=e.r(73066),{Buffer:s}=e.r(843943),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:f}=e.r(101750).codes;t.exports=function(e,t,r){let u,c;if("string"==typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])c=!0,u=t[o]();else if(t&&t[a])c=!1,u=t[a]();else throw new l("iterable",["Iterable"],t);let d=new e({objectMode:!0,highWaterMark:1,...r}),h=!1;async function p(e){let t=null!=e,r="function"==typeof u.throw;if(t&&r){let{value:t,done:r}=await u.throw(e);if(await t,r)return}if("function"==typeof u.return){let{value:e}=await u.return();await e}}async function g(){for(;;){try{let{value:e,done:t}=c?await u.next():u.next();if(t)d.push(null);else{let t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new f;if(d.push(t))continue;h=!1}}catch(e){d.destroy(e)}break}}return d._read=function(){h||(h=!0,g())},d._destroy=function(e,t){i(p(e),()=>n.nextTick(t,e),r=>n.nextTick(t,r||e))},d}},857278,(e,t,r)=>{"use strict";let n,i=e.f({process:{id:()=>947871,module:()=>e.r(947871)},"process/":{id:()=>947871,module:()=>e.r(947871)}})("process/"),{ArrayPrototypeIndexOf:o,NumberIsInteger:a,NumberIsNaN:s,NumberParseInt:l,ObjectDefineProperties:f,ObjectKeys:u,ObjectSetPrototypeOf:c,Promise:d,SafeSet:h,SymbolAsyncDispose:p,SymbolAsyncIterator:g,Symbol
2:y}=e.r(73066);t.exports=H,H.ReadableState=q;let{EventEmitter:b}=e.r(219298),{Stream:m,prependListener:w}=e.r(72874),{Buffer:E}=e.r(843943),{addAbortSignal:v}=e.r(546937),x=e.r(580843),_=e.r(957922).debuglog("stream",e=>{_=e}),S=e.r(317562),A=e.r(872555),{getHighWaterMark:B,getDefaultHighWaterMark:R}=e.r(254472),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:T,ERR_OUT_OF_RANGE:N,ERR_STREAM_PUSH_AFTER_EOF:P,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:U},AbortError:j}=e.r(101750),{validateObject:C}=e.r(890076),k=y("kPaused"),{StringDecoder:L}=e.f({string_decoder:{id:()=>619049,module:()=>e.r(619049)},"string_decoder/":{id:()=>619049,module:()=>e.r(619049)}})("string_decoder/"),M=e.r(867526);c(H.prototype,m.prototype),c(H,m);let D=()=>{},{errorOrDestroy:F}=A;function $(e){return{enumerable:!1,get(){return(this.state&e)!=0},set(t){t?this.state|=e:this.state&=~e}}}function q(t,r,n){"boolean"!=typeof n&&(n=r instanceof e.r(964559)),this.state=6192,t&&t.objectMode&&(this.state|=1),n&&t&&t.readableObjectMode&&(this.state|=1),this.highWaterMark=t?B(this,t,"readableHighWaterMark",n):R(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[k]=null,t&&!1===t.emitClose&&(this.state&=-2049),t&&!1===t.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new L(t.encoding),this.encoding=t.encoding)}function H(t){if(!(this instanceof H))return new H(t);let r=this instanceof e.r(964559);this._readableState=new q(t,this,r),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!r&&v(t.signal,this)),m.call(this,t),A.construct(this,()=>{this._readableState.needReadable&&Y(this,this._readableState)})}function W(e,t,r,n){let i;_("readableAddChunk",t);let o=e._readableState;if((1&o.state)==0&&("string"==typeof t?(r=r||o.defaultEncoding,o.encoding!==r&&(n&&o.encoding?t=E.from(t,r).toString(o.encoding):(t=E.from(t,r),r=""))):t instanceof E?r="":m._isUint8Array(t)?(t=m._uint8ArrayToBuffer(t),r=""):null!=t&&(i=new I("chunk",["string","Buffer","Uint8Array"],t))),i)F(e,i);else if(null===t)o.state&=-9,function(e,t){if(_("onEofChunk"),!t.ended){if(t.decoder){let e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,G(e))}}(e,o);else if((1&o.state)!=0||t&&t.length>0)if(n)if((4&o.state)!=0)F(e,new U);else{if(o.destroyed||o.errored)return!1;z(e,o,t,!0)}else if(o.ended)F(e,new P);else{if(o.destroyed||o.errored)return!1;o.state&=-9,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?z(e,o,t,!1):Y(e,o)):z(e,o,t,!1)}else n||(o.state&=-9,Y(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function z(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?((65536&t.state)!=0?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),(64&t.state)!=0&&Z(e)),Y(e,t)}function V(e,t){return e<=0||0===t.length&&t.ended?0:(1&t.state)!=0?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){let t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(G,e))}function G(e){let t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ee(e)}function Y(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,i.nextTick(J,e,t))}function J(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){let r=t.length;if(_("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function K(e){let t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[k]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function X(e){_("readable nexttick read 0"),e.read(0)}function Q(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),ee(e),t.flowing&&!t.reading&&e.read(0)}function ee(e){let t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function et(e,t){"function"!=typeof e.read&&(e=H.wrap(e,{objectMode:!0}));let r=er(e,t);return r.stream=e,r}async function*er(e,t){let r,n=D;function i(t){this===e?(n(),n=D):n=t}
2e.on("readable",i);let o=x(e,{writable:!1},e=>{r=e?O(r,e):null,n(),n=D});try{for(;;){let t=e.destroyed?null:e.read();if(null!==t)yield t;else if(r)throw r;else{if(null===r)return;await new d(i)}}}catch(e){throw r=O(r,e)}finally{(r||(null==t?void 0:t.destroyOnReturn)!==!1)&&(void 0===r||e._readableState.autoDestroy)?A.destroyer(e,null):(e.off("readable",i),o())}}function en(e,t){let r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function ei(e){let t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(eo,t,e))}function eo(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length){if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)i.nextTick(ea,t);else if(e.autoDestroy){let e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}}function ea(e){!e.writable||e.writableEnded||e.destroyed||e.end()}function es(){return void 0===n&&(n={}),n}f(q.prototype,{objectMode:$(1),ended:$(2),endEmitted:$(4),reading:$(8),constructed:$(16),sync:$(32),needReadable:$(64),emittedReadable:$(128),readableListening:$(256),resumeScheduled:$(512),errorEmitted:$(1024),emitClose:$(2048),autoDestroy:$(4096),destroyed:$(8192),closed:$(16384),closeEmitted:$(32768),multiAwaitDrain:$(65536),readingMore:$(131072),dataEmitted:$(262144)}),H.prototype.destroy=A.destroy,H.prototype._undestroy=A.undestroy,H.prototype._destroy=function(e,t){t(e)},H.prototype[b.captureRejectionSymbol]=function(e){this.destroy(e)},H.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new j,this.destroy(e)),new d((t,r)=>x(this,n=>n&&n!==e?r(n):t(null)))},H.prototype.push=function(e,t){return W(this,e,t,!1)},H.prototype.unshift=function(e,t){return W(this,e,t,!0)},H.prototype.isPaused=function(){let e=this._readableState;return!0===e[k]||!1===e.flowing},H.prototype.setEncoding=function(e){let t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,n="";for(let e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},H.prototype.read=function(e){let t;_("read",e),void 0===e?e=NaN:a(e)||(e=l(e,10));let r=this._readableState,n=e;if(e>r.highWaterMark&&(r.highWaterMark=function(e){if(e>0x40000000)throw new N("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(r.state&=-129),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return _("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?ei(this):Z(this),null;if(0===(e=V(e,r))&&r.ended)return 0===r.length&&ei(this),null;let i=(64&r.state)!=0;if(_("need readable",i),(0===r.length||r.length-e<r.highWaterMark)&&_("length less than watermark",i=!0),r.ended||r.reading||r.destroyed||r.errored||!r.constructed)_("reading, ended or constructing",i=!1);else if(i){_("do read"),r.state|=40,0===r.length&&(r.state|=64);try{this._read(r.highWaterMark)}catch(e){F(this,e)}r.state&=-33,r.reading||(e=V(n,r))}return null===(t=e>0?en(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.multiAwaitDrain?r.awaitDrainWriters.clear():r.awaitDrainWriters=null),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&ei(this)),null===t||r.errorEmitted||r.closeEmitted||(r.dataEmitted=!0,this.emit("data",t)),t},H.prototype._read=function(e){throw new T("_read()")},H.prototype.pipe=function(e,t){let r,n=this,o=this._readableState;1!==o.pipes.length||o.multiAwaitDrain||(o.multiAwaitDrain=!0,o.awaitDrainWriters=new h(o.awaitDrainWriters?[o.awaitDrainWriters]:[])),o.pipes.push(e),_("pipe count=%d opts=%j",o.pipes.length,t);let a=t&&!1===t.end||e===i.stdout||e===i.stderr?g:s;function s(){_("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",function t(i,a){_("onunpipe"),i===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,_("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),r&&e.removeListener("drain",r),e.removeListener("error",c),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",g),n.removeListener("data",u),l=!0,r&&o.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&r())});let l=!1;function f(){var t,i;l||(1===o.pipes.length&&o.pipes[0]===e?(_("false write response, pause",0),o.awaitDrainWriters=e,o.multiAwaitDrain=!1):o.pipes.length>1&&o.pipes.includes(e)&&(_("false write response, pause",o.awaitDrainWriters.size),o.awaitDrainWriters.add(e)),n.pause()),r||(t=n,i=e,r=function(){let e=t._readableState;e.awaitDrainWriters===i?(_("pipeOnDrain",1),e.awaitDrainWriters=null):e.multiAwaitDrain&&(_("pipeOnDrain",e.awaitDrainWriters.size),e.awaitDrainWriters.delete(i)),(!e.awaitDrainWriters||0===e.awaitDrainWriters.size)&&t.listenerCount("data")&&t.resume()},e.on("drain",r))}function u(t){_("ondata");let r=e.write(t);_("dest.write",r),!1===r&&f()}function c(t){if(_("onerror",t),g(),e.removeListener("error",c),0===e.listenerCount("error")){let r=e._writableState||e._readableState;r&&!r.errorEmitted?F(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),g()}function p(){_("onfinish"),e.removeListener("close",d),g()}function g(){_("unpipe"),n.unpipe(e)}return n.on("data",u),w(e,"error",c),e.once("close",d),e.once("finish",p),e.emit("pipe",n),!0===e.writableNeedDrain?f():o.flowing||(_("pi
2pe resume"),n.resume()),e},H.prototype.unpipe=function(e){let t=this._readableState;if(0===t.pipes.length)return this;if(!e){let e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}let r=o(t.pipes,e);return -1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},H.prototype.on=function(e,t){let r=m.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,_("on readable",n.length,n.reading),n.length?Z(this):n.reading||i.nextTick(X,this)),r},H.prototype.addListener=H.prototype.on,H.prototype.removeListener=function(e,t){let r=m.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(K,this),r},H.prototype.off=H.prototype.removeListener,H.prototype.removeAllListeners=function(e){let t=m.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&i.nextTick(K,this),t},H.prototype.resume=function(){var e,t;let r=this._readableState;return r.flowing||(_("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,i.nextTick(Q,e,t))),r[k]=!1,this},H.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[k]=!0,this},H.prototype.wrap=function(e){let t=!1;e.on("data",r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())}),e.on("end",()=>{this.push(null)}),e.on("error",e=>{F(this,e)}),e.on("close",()=>{this.destroy()}),e.on("destroy",()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};let r=u(e);for(let t=1;t<r.length;t++){let n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},H.prototype[g]=function(){return et(this)},H.prototype.iterator=function(e){return void 0!==e&&C(e,"options"),et(this,e)},f(H.prototype,{readable:{__proto__:null,get(){let e=this._readableState;return!!e&&!1!==e.readable&&!e.destroyed&&!e.errorEmitted&&!e.endEmitted},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(!1!==this._readableState.readable&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),f(q.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[k]},set(e){this[k]=!!e}}}),H._fromList=en,H.from=function(e,t){return M(H,e,t)},H.fromWeb=function(e,t){return es().newStreamReadableFromReadableStream(e,t)},H.toWeb=function(e,t){return es().newReadableStreamFromStreamReadable(e,t)},H.wrap=function(e,t){var r,n;return new H({objectMode:null==(r=null!=(n=e.readableObjectMode)?n:e.objectMode)||r,...t,destroy(t,r){A.destroyer(e,t),r(t)}}).wrap(e)}},134154,(e,t,r)=>{"use strict";let n=e.f({process:{id:()=>947871,module:()=>e.r(947871)},"process/":{id:()=>947871,module:()=>e.r(947871)}})("process/"),i=e.r(843943),{isReadable:o,isWritable:a,isIterable:s,isNodeStream
2:l,isReadableNodeStream:f,isWritableNodeStream:u,isDuplexNodeStream:c,isReadableStream:d,isWritableStream:h}=e.r(573939),p=e.r(580843),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:b}}=e.r(101750),{destroyer:m}=e.r(872555),w=e.r(964559),E=e.r(857278),v=e.r(189616),{createDeferredPromise:x}=e.r(957922),_=e.r(867526),S=globalThis.Blob||i.Blob,A=void 0!==S?function(e){return e instanceof S}:function(e){return!1},B=globalThis.AbortController||e.r(71392).AbortController,{FunctionPrototypeCall:R}=e.r(73066);class O extends w{constructor(e){super(e),(null==e?void 0:e.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(null==e?void 0:e.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){let t,r,n,i,s,l=e.readable&&"function"!=typeof e.readable.read?E.wrap(e.readable):e.readable,f=e.writable,u=!!o(l),c=!!a(f);function d(e){let t=i;i=null,t?t(e):e&&s.destroy(e)}return s=new O({readableObjectMode:!!(null!=l&&l.readableObjectMode),writableObjectMode:!!(null!=f&&f.writableObjectMode),readable:u,writable:c}),c&&(p(f,e=>{c=!1,e&&m(l,e),d(e)}),s._write=function(e,r,n){f.write(e,r)?n():t=n},s._final=function(e){f.end(),r=e},f.on("drain",function(){if(t){let e=t;t=null,e()}}),f.on("finish",function(){if(r){let e=r;r=null,e()}})),u&&(p(l,e=>{u=!1,e&&m(l,e),d(e)}),l.on("readable",function(){if(n){let e=n;n=null,e()}}),l.on("end",function(){s.push(null)}),s._read=function(){for(;;){let e=l.read();if(null===e){n=s._read;return}if(!s.push(e))return}}),s._destroy=function(e,o){e||null===i||(e=new g),n=null,t=null,r=null,null===i?o(e):(i=o,m(f,e),m(l,e))},s}t.exports=function e(t,r){if(c(t))return t;if(f(t))return I({readable:t});if(u(t))return I({writable:t});if(l(t))return I({writable:!1,readable:!1});if(d(t))return I({readable:E.fromWeb(t)});if(h(t))return I({writable:v.fromWeb(t)});if("function"==typeof t){let{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=x(),i=new B,o=i.signal;return{value:e(async function*(){for(;;){let e=t;t=null;let{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new g(void 0,{cause:o.reason});({promise:t,resolve:r}=x()),yield i}}(),{signal:o}),write(e,t,n){let i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){let t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return _(O,e,{objectMode:!0,write:i,final:o,destroy:a});let l=null==e?void 0:e.then;if("function"==typeof l){let t,r=R(l,e,e=>{if(null!=e)throw new b("nully","body",e)},e=>{m(t,e)});return t=new O({objectMode:!0,readable:!1,write:i,final(e){o(async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}})},destroy:a})}throw new b("Iterable, AsyncIterable or AsyncFunction",r,e)}if(A(t))return e(t.arrayBuffer());if(s(t))return _(O,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return O.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?f(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?u(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});let i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,t=>{null!=t&&e.push(t),e.push(null)},t=>{m(e,t)}),e=new O({objectMode:!0,writable:!1,read(){}})}throw new y(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},964559,(e,t,r)=>{"use strict";let n,i,{ObjectDefineProperties:o,ObjectGetOwnPropertyDescriptor:a,ObjectKeys:s,ObjectSetPrototypeOf:l}=e.r(73066);t.exports=c;let f=e.r(857278),u=e.r(189616);l(c.prototype,f.prototype),l(c,f);{let e=s(u.prototype);for(let t=0;t<e.length;t++){let r=e[t];c.prototype[r]||(c.prototype[r]=u.prototype[r])}}function c(e){if(!(this instanceof c))return new c(e);f.call(this,e),u.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}function d(){return void 0===n&&(n={}),n}o(c.prototype,{writable:{__proto__:null,...a(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...a(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...a(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...a(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...a(u.prototype,"writableLength")},writableFinished:{__proto__:null,...a(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...a(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...a(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...a(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),c.fromWeb=function(e,t){return d().newStreamDuplexFromReadableWritablePair(e,t)},c.toWeb=function(e){return d().newReadableWritablePairFromDuplex(e)}
2,c.from=function(t){return i||(i=e.r(134154)),i(t,"body")}},189616,(e,t,r)=>{"use strict";let n,i=e.f({process:{id:()=>947871,module:()=>e.r(947871)},"process/":{id:()=>947871,module:()=>e.r(947871)}})("process/"),{ArrayPrototypeSlice:o,Error:a,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:l,ObjectDefineProperties:f,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:d,SymbolHasInstance:h}=e.r(73066);t.exports=C,C.WritableState=U;let{EventEmitter:p}=e.r(219298),g=e.r(72874).Stream,{Buffer:y}=e.r(843943),b=e.r(872555),{addAbortSignal:m}=e.r(546937),{getHighWaterMark:w,getDefaultHighWaterMark:E}=e.r(254472),{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_MULTIPLE_CALLBACK:_,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:B,ERR_STREAM_NULL_VALUES:R,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:I}=e.r(101750).codes,{errorOrDestroy:T}=b;function N(){}u(C.prototype,g.prototype),u(C,g);let P=d("kOnFinished");function U(t,r,n){"boolean"!=typeof n&&(n=r instanceof e.r(964559)),this.objectMode=!!(t&&t.objectMode),n&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?w(this,t,"writableHighWaterMark",n):E(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let i=!!(t&&!1===t.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D.bind(void 0,r),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,j(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[P]=[]}function j(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function C(t){let r=this instanceof e.r(964559);if(!r&&!s(C,this))return new C(t);this._writableState=new U(t,this,r),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&m(t.signal,this)),g.call(this,t),b.construct(this,()=>{let e=this._writableState;e.writing||H(this,e),z(this,e)})}function k(e,t,r,n){var o,a,s,l,f;let u,c,d,h=e._writableState;if("function"==typeof r)n=r,r=h.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new I(r)}else r=h.defaultEncoding;"function"!=typeof n&&(n=N)}if(null===t)throw new R;if(!h.objectMode)if("string"==typeof t)!1!==h.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else if(g._isUint8Array(t))t=g._uint8ArrayToBuffer(t),r="buffer";else throw new v("chunk",["string","Buffer","Uint8Array"],t);return(h.ending?d=new O:h.destroyed&&(d=new A("write")),d)?(i.nextTick(n,d),T(e,d,!0),d):(h.pendingcb++,o=e,a=h,s=t,l=r,f=n,u=a.objectMode?1:s.length,a.length+=u,(c=a.length<a.highWaterMark)||(a.needDrain=!0),a.writing||a.corked||a.errored||!a.constructed?(a.buffered.push({chunk:s,encoding:l,callback:f}),a.allBuffers&&"buffer"!==l&&(a.allBuffers=!1),a.allNoop&&f!==N&&(a.allNoop=!1)):(a.writelen=u,a.writecb=f,a.writing=!0,a.sync=!0,o._write(s,l,a.onwrite),a.sync=!1),c&&!a.errored&&!a.destroyed)}function L(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new A("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function M(e,t,r,n){--t.pendingcb,n(r),q(t),T(e,r)}function D(e,t){let r=e._writableState,n=r.sync,o=r.writecb;"function"!=typeof o?T(e,new _):(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),n?i.nextTick(M,e,r,t,o):M(e,r,t,o)):(r.buffered.length>r.bufferedIndex&&H(e,r),n?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},i.nextTick(F,r.afterWriteTickInfo)):$(e,r,1,o)))}function F({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,$(e,t,r,n)}
2function $(e,t,r,n){for(t.ending||e.destroyed||0!==t.length||!t.needDrain||(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),z(e,t)}function q(e){var t,r;if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){let{chunk:n,callback:i}=e.buffered[r],o=e.objectMode?1:n.length;e.length-=o,i(null!=(t=e.errored)?t:new A("write"))}let n=e[P].splice(0);for(let t=0;t<n.length;t++)n[t](null!=(r=e.errored)?r:new A("end"));j(e)}function H(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;let{buffered:r,bufferedIndex:n,objectMode:i}=t,a=r.length-n;if(!a)return;let s=n;if(t.bufferProcessing=!0,a>1&&e._writev){t.pendingcb-=a-1;let n=t.allNoop?N:e=>{for(let t=s;t<r.length;++t)r[t].callback(e)},i=t.allNoop&&0===s?r:o(r,s);i.allBuffers=t.allBuffers,L(e,t,!0,t.length,i,"",n),j(t)}else{do{let{chunk:n,encoding:o,callback:a}=r[s];r[s++]=null,L(e,t,!1,i?1:n.length,n,o,a)}while(s<r.length&&!t.writing)s===r.length?j(t):s>256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function W(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function z(e,t,r){if(W(t)){if(!t.prefinished&&!t.finalCalled)if("function"!=typeof e._final||t.destroyed)t.prefinished=!0,e.emit("prefinish");else{t.finalCalled=!0;let r=!1;
2function n(n){if(r)return void T(e,null!=n?n:_());if(r=!0,t.pendingcb--,n){let r=t[P].splice(0);for(let e=0;e<r.length;e++)r[e](n);T(e,n,t.sync)}else W(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,i.nextTick(V,e,t))}t.sync=!0,t.pendingcb++;try{e._final(n)}catch(e){n(e)}t.sync=!1}0===t.pendingcb&&(r?(t.pendingcb++,i.nextTick((e,t)=>{W(t)?V(e,t):t.pendingcb--},e,t)):W(t)&&(t.pendingcb++,V(e,t)))}}function V(e,t){t.pendingcb--,t.finished=!0;let r=t[P].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){let t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}U.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},l(U.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),l(C,h,{__proto__:null,value:function(e){return!!s(this,e)||this===C&&e&&e._writableState instanceof U}}),C.prototype.pipe=function(){T(this,new S)},C.prototype.write=function(e,t,r){return!0===k(this,e,t,r)},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){let e=this._writableState;e.corked&&(e.corked--,e.writing||H(this,e))},C.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=c(e)),!y.isEncoding(e))throw new I(e);return this._writableState.defaultEncoding=e,this},C.prototype._write=function(e,t,r){if(this._writev)this._writev([{chunk:e,encoding:t}],r);else throw new x("_write()")},C.prototype._writev=null,C.prototype.end=function(e,t,r){let n,o=this._writableState;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){let r=k(this,e,t);r instanceof a&&(n=r)}return o.corked&&(o.corked=1,this.uncork()),n||(o.errored||o.ending?o.finished?n=new B("end"):o.destroyed&&(n=new A("end")):(o.ending=!0,z(this,o,!0),o.ended=!0)),"function"==typeof r&&(n||o.finished?i.nextTick(r,n):o[P].push(r)),this},f(C.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){let e=this._writableState;return!!e&&!1!==e.writable&&!e.destroyed&&!e.errored&&!e.ending&&!e.ended},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){let e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(!1!==this._writableState.writable&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});let Z=b.destroy;function G(){return void 0===n&&(n={}),n}C.prototype.destroy=function(e,t){let r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[P].length)&&i.nextTick(q,r),Z.call(this,e,t),this},C.prototype._undestroy=b.undestroy,C.prototype._destroy=function(e,t){t(e)},C.prototype[p.captureRejectionSymbol]=function(e){this.destroy(e)},C.fromWeb=function(e,t){return G().newStreamWritableFromWritableStream(e,t)},C.toWeb=function(e){return G().newWritableStreamFromStreamWritable(e)}},334177,(e,t,r)=>{"use strict";let{ObjectSetPrototypeOf:n,Symbol:i}=e.r(73066);t.exports=f;
2let{ERR_METHOD_NOT_IMPLEMENTED:o}=e.r(101750).codes,a=e.r(964559),{getHighWaterMark:s}=e.r(254472);n(f.prototype,a.prototype),n(f,a);let l=i("kCallback");function f(e){if(!(this instanceof f))return new f(e);let t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function u(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())})}function c(){this._final!==u&&u.call(this)}f.prototype._final=u,f.prototype._transform=function(e,t,r){throw new o("_transform()")},f.prototype._write=function(e,t,r){let n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,(e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length<n.highWaterMark?r():this[l]=r)})},f.prototype._read=function(){if(this[l]){let e=this[l];this[l]=null,e()}}},783522,(e,t,r)=>{"use strict";let{ObjectSetPrototypeOf:n}=e.r(73066);t.exports=o;let i=e.r(334177);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},299082,(e,t,r)=>{"use strict";let n,i,o,a=e.f({process:{id:()=>947871,module:()=>e.r(947871)},"process/":{id:()=>947871,module:()=>e.r(947871)}})("process/"),{ArrayIsArray:s,Promise:l,SymbolAsyncIterator:f,SymbolDispose:u}=e.r(73066),c=e.r(580843),{once:d}=e.r(957922),h=e.r(872555),p=e.r(964559),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:b,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:w,ERR_STREAM_PREMATURE_CLOSE:E},AbortError:v}=e.r(101750),{validateFunction:x,validateAbortSignal:_}=e.r(890076),{isIterable:S,isReadable:A,isReadableNodeStream:B,isNodeStream:R,isTransformStream:O,isWebStream:I,isReadableStream:T,isReadableFinished:N}=e.r(573939),P=globalThis.AbortController||e.r(71392).AbortController;function U(e,t,r){let n=!1;return e.on("close",()=>{n=!0}),{destroy:t=>{n||(n=!0,h.destroyer(e,t||new w("pipe")))},cleanup:c(e,{readable:t,writable:r},e=>{n=!e})}}function j(e){if(S(e))return e;if(B(e))return C(e);throw new y("val",["Readable","Iterable","AsyncIterable"],e)}async function*C(t){i||(i=e.r(857278)),yield*i.prototype[f].call(t)}async function k(e,t,r,{end:n}){let i,o=null,a=e=>{if(e&&(i=e),o){let e=o;o=null,e()}},s=()=>new l((e,t)=>{i?t(i):o=()=>{i?t(i):e()}});t.on("drain",a);let f=c(t,{readable:!1},a);try{for await(let r of(t.writableNeedDrain&&await s(),e))t.write(r)||await s();n&&(t.end(),await s()),r()}catch(e){r(i!==e?g(i,e):e)}finally{f(),t.off("drain",a)}}async function L(e,t,r,{end:n}){O(t)&&(t=t.writable);let i=t.getWriter();try{for await(let t of e)await i.ready,i.write(t).catch(()=>{});await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function M(t,r,i){let l,f,d,h;if(1===t.length&&s(t[0])&&(t=t[0]),t.length<2)throw new m("streams");let g=new P,w=g.signal,x=null==i?void 0:i.signal,C=[];function M(){q(new v)}_(x,"options.signal"),o=o||e.r(957922).addAbortListener,x&&(l=o(x,M));let D=[],F=0;function $(e){q(e,0==--F)}function q(e,t){var n;if(e&&(!f||"ERR_STREAM_PREMATURE_CLOSE"===f.code)&&(f=e),f||t){for(;D.length;)D.shift()(f);null==(n=l)||n[u](),g.abort(),t&&(f||C.forEach(e=>e()),a.nextTick(r,f,d))}}for(let r=0;r<t.length;r++){let o=t[r],s=r<t.length-1,l=r>0,f=s||(null==i?void 0:i.end)!==!1,u=r===t.length-1;if(R(o)){if(f){let{destroy:e,cleanup:t}=U(o,s,l);D.push(e),A(o)&&u&&C.push(t)}function H(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&$(e)}o.on("error",H),A(o)&&u&&C.push(()=>{o.removeListener("error",H)})}if(0===r)if("function"==typeof o){if(!S(h=o({signal:w})))throw new b("Iterable, AsyncIterable or Stream","source",h)}else h=S(o)||B(o)||O(o)?o:p.from(o);else if("function"==typeof o){var W,z;if(h=o(h=O(h)?j(null==(W=h)?void 0:W.readable):j(h),{signal:w}),s){if(!S(h,!0))throw new b("AsyncIterable",`transform[${r-1}]`,h)}else{n||(n=e.r(783522));let t=new n({objectMode:!0}),r=null==(z=h)?void 0:z.then;if("function"==typeof r)F++,r.call(h,e=>{d=e,null!=e&&t.write(e),f&&t.end(),a.nextTick($)},e=>{t.destroy(e),a.nextTick($,e)});else if(S(h,!0))F++,k(h,t,$,{end:f});else if(T(h)||O(h)){let e=h.readable||h;F++,k(e,t,$,{end:f})}else throw new b("AsyncIterable or Promise","destination",h);let{destroy:i,cleanup:o}=U(h=t,!1,!0);
2D.push(i),u&&C.push(o)}}else if(R(o)){if(B(h)){F+=2;let e=function(e,t,r,{end:n}){let i=!1;if(t.on("close",()=>{i||r(new E)}),e.pipe(t,{end:!1}),n){function o(){i=!0,t.end()}N(e)?a.nextTick(o):e.once("end",o)}else r();return c(e,{readable:!0,writable:!1},t=>{let n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)}),c(t,{readable:!1,writable:!0},r)}(h,o,$,{end:f});A(o)&&u&&C.push(e)}else if(O(h)||T(h)){let e=h.readable||h;F++,k(e,o,$,{end:f})}else if(S(h))F++,k(h,o,$,{end:f});else throw new y("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],h);h=o}else if(I(o)){if(B(h))F++,L(j(h),o,$,{end:f});else if(T(h)||S(h))F++,L(h,o,$,{end:f});else if(O(h))F++,L(h.readable,o,$,{end:f});else throw new y("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],h);h=o}else h=p.from(o)}return(null!=w&&w.aborted||null!=x&&x.aborted)&&a.nextTick(M),h}t.exports={pipelineImpl:M,pipeline:function(...e){return M(e,d((x(e[e.length-1],"streams[stream.length - 1]"),e.pop())))}}},447142,(e,t,r)=>{"use strict";let{pipeline:n}=e.r(299082),i=e.r(964559),{destroyer:o}=e.r(872555),{isNodeStream:a,isReadable:s,isWritable:l,isWebStream:f,isTransformStream:u,isWritableStream:c,isReadableStream:d}=e.r(573939),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:g}}=e.r(101750),y=e.r(580843);t.exports=function(...e){let t,r,b,m,w;if(0===e.length)throw new g("streams");if(1===e.length)return i.from(e[0]);let E=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){let t=e.length-1;e[t]=i.from(e[t])}for(let t=0;t<e.length;++t)if(a(e[t])||f(e[t])){if(t<e.length-1&&!(s(e[t])||d(e[t])||u(e[t])))throw new p(`streams[${t}]`,E[t],"must be readable");if(t>0&&!(l(e[t])||c(e[t])||u(e[t])))throw new p(`streams[${t}]`,E[t],"must be writable")}let v=e[0],x=n(e,function(e){let t=m;m=null,t?t(e):e?w.destroy(e):S||_||w.destroy()}),_=!!(l(v)||c(v)||u(v)),S=!!(s(x)||d(x)||u(x));if(w=new i({writableObjectMode:!!(null!=v&&v.writableObjectMode),readableObjectMode:!!(null!=x&&x.readableObjectMode),writable:_,readable:S}),_){if(a(v))w._write=function(e,r,n){v.write(e,r)?n():t=n},w._final=function(e){v.end(),r=e},v.on("drain",function(){if(t){let e=t;t=null,e()}});else if(f(v)){let e=(u(v)?v.writable:v).getWriter();w._write=async function(t,r,n){try{await e.ready,e.write(t).catch(()=>{}),n()}catch(e){n(e)}},w._final=async function(t){try{await e.ready,e.close().catch(()=>{}),r=t}catch(e){t(e)}}}y(u(x)?x.readable:x,()=>{if(r){let e=r;r=null,e()}})}if(S){if(a(x))x.on("readable",function(){if(b){let e=b;b=null,e()}}),x.on("end",function(){w.push(null)}),w._read=function(){for(;;){let e=x.read();if(null===e){b=w._read;return}if(!w.push(e))return}};else if(f(x)){let e=(u(x)?x.readable:x).getReader();w._read=async function(){for(;;)try{let{value:t,done:r}=await e.read();if(!w.push(t))return;if(r)return void w.push(null)}catch{return}}}}return w._destroy=function(e,n){e||null===m||(e=new h),b=null,t=null,r=null,null===m?n(e):(m=n,a(x)&&o(x,e))},w}},372845,(e,t,r)=>{"use strict";let n=globalThis.AbortController||e.r(71392).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:s},AbortError:l}=e.r(101750),{validateAbortSignal:f,validateInteger:u,validateObject:c}=e.r(890076),d=e.r(73066).Symbol("kWeak"),h=e.r(73066).Symbol("kResistStopPropagation"),{finished:p}=e.r(580843),g=e.r(447142),{addAbortSignalNoValidate:y}=e.r(546937),{isWritable:b,isNodeStream:m}=e.r(573939),{deprecate:w}=e.r(957922),{ArrayPrototypePush:E,Boolean:v,MathFloor:x,Number:_,NumberIsNaN:S,Promise:A,PromiseReject:B,PromiseResolve:R,PromisePrototypeThen:O,Symbol:I}=e.r(73066),T=I("kEmpty"),N=I("kEof");function P(t,r){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);null!=r&&c(r,"options"),(null==r?void 0:r.signal)!=null&&f(r.signal,"options.signal");let n=1;(null==r?void 0:r.concurrency)!=null&&(n=x(r.concurrency));let i=n-1;return(null==r?void 0:r.highWaterMark)!=null&&(i=x(r.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,(async function*(){let o,a,s=e.r(957922).AbortSignalAny([null==r?void 0:r.signal].filter(v)),f=this,u=[],c={signal:s},d=!1,h=0;function p(){d=!0,g()}function g(){h-=1,y()}function y(){a&&!d&&h<n&&u.length<i&&(a(),a=null)}!async function(){try{for await(let e of f){if(d)return;if(s.aborted)throw new l;
2try{if((e=t(e,c))===T)continue;e=R(e)}catch(t){e=B(t)}h+=1,O(e,g,p),u.push(e),o&&(o(),o=null),!d&&(u.length>=i||h>=n)&&await new A(e=>{a=e})}u.push(N)}catch(t){let e=B(t);O(e,g,p),u.push(e)}finally{d=!0,o&&(o(),o=null)}}();try{for(;;){for(;u.length>0;){let e=await u[0];if(e===N)return;if(s.aborted)throw new l;e!==T&&(yield e),u.shift(),y()}await new A(e=>{o=e})}}finally{d=!0,a&&(a(),a=null)}}).call(this)}async function U(e,t){for await(let r of L.call(this,e,t))return!0;return!1}async function j(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await U.call(this,async(...t)=>!await e(...t),t)}async function C(e,t){for await(let r of L.call(this,e,t))return r}async function k(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);async function r(t,r){return await e(t,r),T}for await(let e of P.call(this,r,t));}function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);async function r(t,r){return await e(t,r)?t:T}return P.call(this,r,t)}class M extends a{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function D(e,t,r){var i,a;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&c(r,"options"),(null==r?void 0:r.signal)!=null&&f(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!=(i=r.signal)&&i.aborted){let e=new l(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await p(this.destroy(e)),e}let u=new n,g=u.signal;null!=r&&r.signal&&r.signal.addEventListener("abort",()=>u.abort(),{once:!0,[d]:this,[h]:!0});let y=!1;try{for await(let n of this){if(y=!0,null!=r&&null!=(a=r.signal)&&a.aborted)throw new l;s?t=await e(t,n,{signal:g}):(t=n,s=!0)}if(!y&&!s)throw new M}finally{u.abort()}return t}async function F(e){null!=e&&c(e,"options"),(null==e?void 0:e.signal)!=null&&f(e.signal,"options.signal");let t=[];for await(let n of this){var r;if(null!=e&&null!=(r=e.signal)&&r.aborted)throw new l(void 0,{cause:e.signal.reason});E(t,n)}return t}function $(e){if(S(e=_(e)))return 0;if(e<0)throw new s("number",">= 0",e);return e}t.exports.streamReturningOperators={asIndexedPairs:w(function(e){return null!=e&&c(e,"options"),(null==e?void 0:e.signal)!=null&&f(e.signal,"options.signal"),(async function*(){let t=0;for await(let n of this){var r;if(null!=e&&null!=(r=e.signal)&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}).call(this)},"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t){return null!=t&&c(t,"options"),(null==t?void 0:t.signal)!=null&&f(t.signal,"options.signal"),e=$(e),(async function*(){var r,n;if(null!=t&&null!=(r=t.signal)&&r.aborted)throw new l;for await(let r of this){if(null!=t&&null!=(n=t.signal)&&n.aborted)throw new l;e--<=0&&(yield r)}}).call(this)},filter:L,flatMap:function(e,t){let r=P.call(this,e,t);return(async function*(){for await(let e of r)yield*e}).call(this)},map:P,take:function(e,t){return null!=t&&c(t,"options"),(null==t?void 0:t.signal)!=null&&f(t.signal,"options.signal"),e=$(e),(async function*(){var r,n;if(null!=t&&null!=(r=t.signal)&&r.aborted)throw new l;for await(let r of this){if(null!=t&&null!=(n=t.signal)&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}).call(this)},compose:function(e,t){if(null!=t&&c(t,"options"),(null==t?void 0:t.signal)!=null&&f(t.signal,"options.signal"),m(e)&&!b(e))throw new i("stream",e,"must be writable");let r=g(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},t.exports.promiseReturningOperators={every:j,forEach:k,reduce:D,toArray:F,some:U,find:C}},248242,(e,t,r)=>{"use strict";let{ArrayPrototypePop:n,Promise:i}=e.r(73066),{isIterable:o,isNodeStream:a,isWebStream:s}=e.r(573939),{pipelineImpl:l}=e.r(299082),{finished:f}=e.r(580843);e.r(848660),t.exports={finished:f,pipeline:function(...e){return new i((t,r)=>{let i,f,u=e[e.length-1];if(u&&"object"==typeof u&&!a(u)&&!o(u)&&!s(u)){let t=n(e);i=t.signal,f=t.end}l(e,(e,n)=>{e?r(e):t(n)},{signal:i,end:f})})}}},848660,(e,t,r)=>{"use strict";let{Buffer:n}=e.r(843943),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=e.r(73066),{promisify:{custom:s}}=e.r(957922),{streamReturningOperators:l,promiseReturningOperators:f}=e.r(372845),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=e.r(101750),c=e.r(447142),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=e.r(254472),{pipeline:p}=e.r(299082),{destroyer:g}=e.r(872555),y=e.r(580843),b=e.r(248242),m=e.r(573939),w=t.exports=e.r(72874).Stream;for(let t of(w.isDestroyed=m.isDestroyed,w.isDisturbed=m.isDisturbed,w.isErrored=m.isErrored,w.isReadable=m.isReadable,w.isWritable=m.isWritable,w.Readable=e.r(857278),o(l))){let e=l[t];function E(...t){if(new.target)throw u();return w.Readable.from(a(e,this,t))}i(E,"name",{__proto__:null,value:e.name}),i(E,"length",{__proto__:null,value:e.length}),i(w.Readable.prototype,t,{__proto__:null,value:E,enumerable:!1,
2configurable:!0,writable:!0})}for(let e of o(f)){let t=f[e];function v(...e){if(new.target)throw u();return a(t,this,e)}i(v,"name",{__proto__:null,value:t.name}),i(v,"length",{__proto__:null,value:t.length}),i(w.Readable.prototype,e,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}w.Writable=e.r(189616),w.Duplex=e.r(964559),w.Transform=e.r(334177),w.PassThrough=e.r(783522),w.pipeline=p;let{addAbortSignal:x}=e.r(546937);w.addAbortSignal=x,w.finished=y,w.destroy=g,w.compose=c,w.setDefaultHighWaterMark=d,w.getDefaultHighWaterMark=h,i(w,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>b}),i(p,s,{__proto__:null,enumerable:!0,get:()=>b.pipeline}),i(y,s,{__proto__:null,enumerable:!0,get:()=>b.finished}),w.Stream=w,w._isUint8Array=function(e){return e instanceof Uint8Array},w._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},56227,(e,t,r)=>{"use strict";let n=e.r(848660),i=e.r(248242),o=n.Readable.destroy;t.exports=n.Readable,t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.destroy=o,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),t.exports.Stream=n.Stream,t.exports.default=t.exports},729271,e=>{"use strict";let t=e.i(186325).default.getLogger("auth");t.setLevel("error"),e.s(["log",0,t])},402338,e=>{"use strict";var t=e.i(211577),r=e.i(984723);e.s(["SerializableError",0,class extends Error{constructor({code:e,message:r,data:n}){if(!Number.isInteger(e))throw Error("code must be an integer");if(!r||"string"!=typeof r)throw Error("message must be string");super(r),(0,t.default)(this,"code",void 0),(0,t.default)(this,"data",void 0),this.code=e,void 0!==n&&(this.data=n)}toString(){return(0,r.default)({code:this.code,message:this.message,data:this.data,stack:this.stack})}}])},768237,e=>{"use strict";var t=e.i(209428),r=e.i(211577);e.i(56227);var n=e.i(729271),i=e.i(411992),o=e.i(796761),a=e.i(402338),s=e.i(497043),l=e.i(770094);function f(e){let{message:t="",code:r=-32603,stack:n="Stack trace is not available.",data:o=""}=e,a=parseInt((null==r?void 0:r.toString())||"-32603");return{message:t||(null==e?void 0:e.toString())||(0,i.getMessageFromCode)(a),code:a,stack:n,data:o||t||(null==e?void 0:e.toString())}}class u extends o.SafeEventEmitter{constructor(){super(),(0,r.default)(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){let n=[],i=null,o=!1;for(let a of r)if([i,o]=await u._runMiddleware(e,t,a,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,o){return new Promise(s=>{let l=e=>{let r=e||t.error;r&&("object"==typeof r&&!1===Object.keys(r).includes("stack")&&(r.stack="Stack trace is not available."),n.log.error(r),t.error=(0,i.serializeJrpcError)(r,{shouldIncludeStack:!0,fallbackError:f(r)})),s([r,!0])};try{r(e,t,e=>{t.error?l(t.error):(e&&("function"!=typeof e&&l(new a.SerializableError({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),o.push(e)),s([null,!1]))},l)}catch(e){l(e)}})}static async _runReturnHandlers(e){for(let t of e)await new Promise((e,r)=>{t(t=>t?r(t):e())})}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new a.SerializableError({code:-32603,message:"Response has no error or result for request"});if(!r)throw new a.SerializableError({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{let[i,o,a]=await u._runAllMiddleware(e,t,this._middleware);
2if(o)return await u._runReturnHandlers(a),n(i);return r(async e=>{try{await u._runReturnHandlers(a)}catch(t){return e(t)}return e()})}catch(e){return n(e)}}}async _handleBatch(e,t){try{let r=await Promise.all(e.map(this._promiseHandle.bind(this)));if(t)return t(null,r);return r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t,r)=>{this._handle(e,(e,n)=>{e&&void 0===n?r(e):t(n)}).catch(r)})}async _handle(e,r){if(!e||Array.isArray(e)||"object"!=typeof e){let e=new a.SerializableError({code:-32603,message:"request must be plain object"});return r(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){let t=new a.SerializableError({code:-32603,message:"method must be string"});return r(t,{id:e.id,jsonrpc:"2.0",error:t})}let o=(0,t.default)({},e),s={id:o.id,jsonrpc:o.jsonrpc},l=null;try{await this._processRequest(o,s)}catch(e){l=e}return l&&(delete s.result,s.error||("object"==typeof l&&!1===Object.keys(l).includes("stack")&&(l.stack="Stack trace is not available."),n.log.error(l),s.error=(0,i.serializeJrpcError)(l,{shouldIncludeStack:!0,fallbackError:f(l)}))),r(l,s)}async _processRequest(e,t){let[r,n,i]=await u._runAllMiddleware(e,t,this._middleware);if(u._checkForCompletion(e,t,n),await u._runReturnHandlers(i),r)throw r}}function c(e){let r=new o.SafeEventEmitter;return r.sendAsync=async t=>{let r=await e.handle(t);if(r.error){var o,a;"object"==typeof r.error&&!1===Object.keys(r.error).includes("stack")&&(r.error.stack="Stack trace is not available."),n.log.error(r.error);let e=(0,i.serializeJrpcError)(r.error,{fallbackError:f(r.error),shouldIncludeStack:!0}),t=null!=(o=null==e?void 0:e.code)?o:s.errorCodes.rpc.internal;throw new l.JsonRpcError(t,null!=(a=null==e?void 0:e.message)?a:(0,i.getMessageFromCode)(t),null==e?void 0:e.data)}return r.result},r.send=(t,r)=>{if("function"!=typeof r)throw Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",e=>{r.emit("data",null,e)}),r.request=async e=>{let n=(0,t.default)((0,t.default)({},e),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await r.sendAsync(n)},r}e.s(["JRPCEngine",0,u,"mergeMiddleware",0,function(e){let t=new u;return e.forEach(e=>{t.push(e)}),t.asMiddleware()},"providerFromEngine",0,c,"providerFromMiddleware",0,function(e){let t=new u;return t.push(e),c(t)}])},570908,e=>{"use strict";var t=e.i(56227),r=e.i(796761);e.i(402338),e.s(["createAsyncMiddleware",0,function(e){return async(t,r,n,i)=>{let o,a=new Promise(e=>{o=e}),s=null,l=!1,f=async()=>{l=!0,n(e=>{s=e,o()}),await a};try{await e(t,r,f),l?(await a,s(null)):i(null)}catch(e){s?s(e):i(e)}}},"createIdRemapMiddleware",0,function(){return(e,t,r,n)=>{let i=e.id,o=Math.random().toString(36).slice(2);e.id=o,t.id=o,r(r=>{e.id=i,t.id=i,r()})}},"createScaffoldMiddleware",0,function(e){return(t,r,n,i)=>{let o=e[t.method];return void 0===o?n():"function"==typeof o?o(t,r,n,i):(r.result=o,i())}},"createStreamMiddleware",0,function(){let e={},n=new r.SafeEventEmitter,i=new t.Duplex({objectMode:!0,read:function(){return!1},write:function(t,r,i){let o;try{if(t.id){let r=e[t.id];if(!r)throw Error(`StreamMiddleware - Unknown response id "${t.id}"`);delete e[t.id],Object.assign(r.res,t),setTimeout(r.end)}else n.emit("notification",t)}catch(e){o=e}i(o)}});return{events:n,middleware:(t,r,n,o)=>{i.push(t),e[t.id]={req:t,res:r,next:n,end:o}},stream:i}},"getRpcPromiseCallback",0,(e,t,r=!0)=>(n,i)=>{n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)}])},721479,e=>{"use strict";e.s(["ANALYTICS_EVENTS",0,{JRPC_REQUEST_COMPLETED:"JRPC Request Completed",JRPC_REQUEST_FAILED:"JRPC Request Failed"},"ANALYTICS_JRPC_REQUEST_TYPES",0,{INTERNAL:"internal",NETWORK:"network"},"ANALYTICS_TRACKED_INTERNAL_JPRC_METHODS",0,{ETH_TRANSACTION:"eth_sendTransaction",ETH_SIGN_TRANSACTION:"eth_signTransaction",ETH_SIGN:"eth_sign",PERSONAL_SIGN:"personal_sign",ETH_SIGN_TYPED_DATA_V4:"eth_signTypedData_v4",SIGN_TRANSACTION:"solana_signTransaction",SIGN_ALL_TRANSACTIONS:"solana_signAllTransactions",SIGN_MESSAGE:"solana_signMessage"},"ANALYTICS_TRACKED_NETWORK_JPRC_METHODS",0,{ETH_SEND_RAW_TRANSACTION:"eth_sendRawTransaction",ETH_SEND_USER_OPERATION:"eth_sendUserOperation",ETH_SPONSOR_USER_OPERATION:"pm_sponsorUserOperation",SEND_TRANSACTION:"sendTransaction"},"SOLANA_CAIP_CHAIN_MAP",0,{"0x65":"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","0x66":"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","0x67":"EtWTRABZaYq6iMfeYKouRu166VU2xqa1"}])},602821,220313,807011,635457,489065,219403,753103,179424,442512,599460,330891,134732,e=>{"use strict";let t,r,n;function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}function o(e,t=""){if("number"!=typeof e){let r=t&&`"${t}" `;throw TypeError(`${r}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw RangeError(`${r}expected integer >= 0, got ${e}`)}}function a(e,t,r=""){let n=i(e),o=e?.length,s=void 0!==t;if(!n||s&&o!==t){let i=(r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${t}`:"")+", got "+(n?`length=${o}`:`type=${typeof e}`);if(!n)throw TypeError(i);throw RangeError(i)}return e}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw TypeError("Hash must wrapped by utils.createHasher");if(o(e.outputLen),o(e.blockLen),e.outputLen<1)throw Error('"outputLen" must be >= 1');if(e.blockLen<1)throw Error('"blockLen" must be >= 1')}function l(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function f(e,t){a(e,void 0,"digestInto() output");let r=t.outputLen;if(e.length<r)throw RangeError('"digestInto() output" expected to be of length >='+r)}function u(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function c(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function d(e,t){return e<<32-t|e>>>t}let h=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0]?e=>e:function(e){for(let r=0;r<e.length;r++){var t;e[r]=(t=e[r])<<24&0xff000000|t<<8&0xff0000|t>>>8&65280|t>>>24&255}return e},p="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,g=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function y(e){if(a(e),p)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=g[e[r]];return t}function b(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function m(e){if("string"!=typeof e)throw TypeError("hex string expected, got "+typeof e);if(p)try{return Uint8Array.fromHex(e)}catch(e){if(e instanceof SyntaxError)throw RangeError(e.message);throw e}let t=e.length,r=t/2;if(t%2)throw RangeError("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;
2t++,i+=2){let r=b(e.charCodeAt(i)),o=b(e.charCodeAt(i+1));if(void 0===r||void 0===o)throw RangeError('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+o}return n}function w(e){if("string"!=typeof e)throw TypeError("string expected");return new Uint8Array(new TextEncoder().encode(e))}function E(e,t={}){let r=(t,r)=>e(r).update(t).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}class v{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=c(this.buffer)}update(e){l(this),a(e);let{view:t,buffer:r,blockLen:n}=this,i=e.length;for(let o=0;o<i;){let a=Math.min(n-this.pos,i-o);if(a===n){let t=c(e);for(;n<=i-o;o+=n)this.process(t,o);continue}r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){l(this),f(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:n,isLE:i}=this,{pos:o}=this;t[o++]=128,u(this.buffer.subarray(o)),this.padOffset>n-o&&(this.process(r,0),o=0);for(let e=o;e<n;e++)t[e]=0;r.setBigUint64(n-8,BigInt(8*this.length),i),this.process(r,0);let a=c(e),s=this.outputLen;if(s%4)throw Error("_sha2: outputLen must be aligned to 32bit");let d=s/4,h=this.get();if(d>h.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<d;e++)a.setUint32(4*e,h[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){(e||=new this.constructor).set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=i,e.length=n,e.pos=a,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}let x=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),_=Uint32Array.from([0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]),S=Uint32Array.from([0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]),A=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]),B=BigInt(0x100000000-1),R=BigInt(32);function O(e,t=!1){let r=e.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let o=0;o<r;o++){let{h:r,l:a}=function(e,t=!1){return t?{h:Number(e&B),l:Number(e>>R&B)}:{h:0|Number(e>>R&B),l:0|Number(e&B)}}(e[o],t);[n[o],i[o]]=[r,a]}return[n,i]}let I=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),T=new Uint32Array(64);class N extends v{constructor(e){super(64,e,8,!1)}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)T[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=T[e-15],r=T[e-2],n=d(t,7)^d(t,18)^t>>>3,i=d(r,17)^d(r,19)^r>>>10;T[e]=i+T[e-7]+n+T[e-16]|0}let{A:r,B:n,C:i,D:o,E:a,F:s,G:l,H:f}=this;for(let e=0;e<64;e++){var u,c,h,p;let t=f+(d(a,6)^d(a,11)^d(a,25))+((u=a)&s^~u&l)+I[e]+T[e]|0,g=(d(r,2)^d(r,13)^d(r,22))+((c=r)&(h=n)^c&(p=i)^h&p)|0;f=l,l=s,s=a,a=o+t|0,o=i,i=n,n=r,r=t+g|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,s=s+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,n,i,o,a,s,l,f)}
2roundClean(){u(T)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),u(this.buffer)}}class P extends N{A=0|x[0];B=0|x[1];C=0|x[2];D=0|x[3];E=0|x[4];F=0|x[5];G=0|x[6];H=0|x[7];constructor(){super(32)}}let U=O(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
25771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),j=U[0],C=U[1],k=new Uint32Array(80),L=new Uint32Array(80),M=E(()=>new P,{oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,1])}),D=(...e)=>(function(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];a(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r})(...e),F=e=>(function(e=32){o(e,"bytesLength");let t="object"==typeof globalThis?globalThis.crypto:null;if("function"!=typeof t?.getRandomValues)throw Error("crypto.getRandomValues must be defined");if(e>65536)throw RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))})(e),$=BigInt(0),q=BigInt(1);function H(e,t=""){if("boolean"!=typeof e)throw TypeError((t&&`"${t}" `)+"expected boolean, got type="+typeof e);return e}function W(e){if("bigint"==typeof e){if(!ee(e))throw RangeError("positive bigint expected, got "+e)}else o(e);return e}function z(e,t=""){if("number"!=typeof e)throw TypeError((t&&`"${t}" `)+"expected number, got type="+typeof e);if(!Number.isSafeInteger(e))throw RangeError((t&&`"${t}" `)+"expected safe integer, got "+e)}function V(e){let t=W(e).toString(16);return 1&t.length?"0"+t:t}function Z(e){if("string"!=typeof e)throw TypeError("hex string expected, got "+typeof e);return""===e?$:BigInt("0x"+e)}function G(e){return Z(y(e))}function Y(e){return Z(y(X(a(e)).reverse()))}function J(e,t){if(o(t),0===t)throw RangeError("zero length");let r=(e=W(e)).toString(16);if(r.length>2*t)throw RangeError("number too large");return m(r.padStart(2*t,"0"))}function K(e,t){return J(e,t).reverse()}function X(e){let t,r;return Uint8Array.from(a(e,t,r))}function Q(e){if("string"!=typeof e)throw TypeError("ascii string expected, got "+typeof e);return Uint8Array.from(e,(t,r)=>{let n=t.charCodeAt(0);if(1!==t.length||n>127)throw RangeError(`string contains non-ASCII character "${e[r]}" with code ${n} at position ${r}`);return n})}let ee=e=>"bigint"==typeof e&&$<=e;function et(e,t,r,n){if(!(ee(t)&&ee(r)&&ee(n))||!(r<=t)||!(t<n))throw RangeError("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function er(e){let t;if(e<$)throw Error("expected non-negative bigint, got "+e);for(t=0;e>$;e>>=q,t+=1);return t}let en=e=>(q<<BigInt(e))-q;function ei(e,t={},r={}){if("[object Object]"!==Object.prototype.toString.call(e))throw TypeError("expected valid options object");let n=(t,r)=>Object.entries(t).forEach(([t,n])=>(function(t,r,n){if(!n&&"function"!==r&&!Object.hasOwn(e,t))throw TypeError(`param "${t}" is invalid: expected own property`);let i=e[t];if(n&&void 0===i)return;let o=typeof i;if(o!==r||null===i)throw TypeError(`param "${t}" is invalid: expected ${r}, got ${o}`)})(t,n,r));n(t,!1),n(r,!0)}let eo=BigInt(0),ea=BigInt(1),es=BigInt(2),el=BigInt(3),ef=BigInt(4),eu=BigInt(5),ec=BigInt(7),ed=BigInt(8),eh=BigInt(9),ep=BigInt(16);function eg(e,t){if(t<=eo)throw Error("mod: expected positive modulus, got "+t);let r=e%t;return r>=eo?r:t+r}function ey(e,t,r){if(t<eo)throw Error("pow2: expected non-negative exponent, got "+t);let n=e;for(;t-- >eo;)n*=n,n%=r;return n}function eb(e,t){if(e===eo)throw Error("invert: expected non-zero number");if(t<=eo)throw Error("invert: expected positive modulus, got "+t);let r=eg(e,t),n=t,i=eo,o=ea,a=ea,s=eo;for(;r!==eo;){let e=n/r,t=n-r*e,l=i-a*e,f=o-s*e;n=r,r=t,i=a,o=s,a=l,s=f}if(n!==ea)throw Error("invert: does not exist");return eg(i,t)}function em(e,t,r){if(!e.eql(e.sqr(t),r))throw Error("Cannot find square root")}function ew(e,t){let r=(e.ORDER+ea)/ef,n=e.pow(t,r);return em(e,n,t),n}function eE(e,t){let r=(e.ORDER-eu)/ed,n=e.mul(t,es),i=e.pow(n,r),o=e.mul(t,i),a=e.mul(e.mul(o,es),i),s=e.mul(o,e.sub(a,e.ONE));return em(e,s,t),s}function ev(e){if(e<el)throw Error("sqrt is not defined for small field");let t=e-ea,r=0;for(;t%es===eo;)t/=es,r++;let n=es,i=eO(e);for(;1===eA(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return ew;let o=i.pow(n,t),a=(t+ea)/es;return function(e,n){if(e.is0(n))return n;if(1!==eA(e,n))throw Error("Cannot find square root");let i=r,s=e.mul(e.ONE,o),l=e.pow(n,t),f=e.pow(n,a);for(;!e.eql(l,e.ONE);){if(e.is0(l))return e.ZERO;let t=1,r=e.sqr(l);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===i)throw Error("Cannot find square root");let n=ea<<BigInt(i-t-1),o=e.pow(s,n);i=t,s=e.sqr(o),l=e.mul(l,s),f=e.mul(f,o)}return f}}let ex=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function e_(e){if(ei(e,ex.reduce((e,t)=>
2(e[t]="function",e),{ORDER:"bigint",BYTES:"number",BITS:"number"})),z(e.BYTES,"BYTES"),z(e.BITS,"BITS"),e.BYTES<1||e.BITS<1)throw Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=ea)throw Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function eS(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),o=e.inv(i);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),o),n}function eA(e,t){let r=(e.ORDER-ea)/es,n=e.pow(t,r),i=e.eql(n,e.ONE),o=e.eql(n,e.ZERO),a=e.eql(n,e.neg(e.ONE));if(!i&&!o&&!a)throw Error("invalid Legendre symbol result");return i?1:o?0:-1}let eB=new WeakMap;class eR{ORDER;BITS;BYTES;isLE;ZERO=eo;ONE=ea;_lengths;_mod;constructor(e,t={}){let r;if(e<=ea)throw Error("invalid field: expected ORDER > 1, got "+e);this.isLE=!1,null!=t&&"object"==typeof t&&("number"==typeof t.BITS&&(r=t.BITS),"function"==typeof t.sqrt&&Object.defineProperty(this,"sqrt",{value:t.sqrt,enumerable:!0}),"boolean"==typeof t.isLE&&(this.isLE=t.isLE),t.allowedLengths&&(this._lengths=Object.freeze(t.allowedLengths.slice())),"boolean"==typeof t.modFromBytes&&(this._mod=t.modFromBytes));const{nBitLength:n,nByteLength:i}=function(e,t){if(void 0!==t&&o(t),e<=eo)throw Error("invalid n length: expected positive n, got "+e);if(void 0!==t&&t<1)throw Error("invalid n length: expected positive bit length, got "+t);let r=er(e);if(void 0!==t&&t<r)throw Error(`invalid n length: expected bit length (${r}) >= n.length (${t})`);let n=void 0!==t?t:r,i=Math.ceil(n/8);return{nBitLength:n,nByteLength:i}}(e,r);if(i>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=e,this.BITS=n,this.BYTES=i,Object.freeze(this)}create(e){return eg(e,this.ORDER)}isValid(e){if("bigint"!=typeof e)throw TypeError("invalid field element: expected bigint, got "+typeof e);return eo<=e&&e<this.ORDER}is0(e){return e===eo}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&ea)===ea}neg(e){return eg(-e,this.ORDER)}eql(e,t){return e===t}sqr(e){return eg(e*e,this.ORDER)}add(e,t){return eg(e+t,this.ORDER)}sub(e,t){return eg(e-t,this.ORDER)}mul(e,t){return eg(e*t,this.ORDER)}pow(e,t){var r=t;if(r<eo)throw Error("invalid exponent, negatives unsupported");if(r===eo)return this.ONE;if(r===ea)return e;let n=this.ONE,i=e;for(;r>eo;)r&ea&&(n=this.mul(n,i)),i=this.sqr(i),r>>=ea;return n}div(e,t){return eg(e*eb(t,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,t){return e+t}subN(e,t){return e-t}mulN(e,t){return e*t}inv(e){return eb(e,this.ORDER)}sqrt(e){let t=eB.get(this);return t||eB.set(this,t=function(e){if(e%ef===el)return ew;if(e%ed===eu)return eE;if(e%ep===eh){let t,r,n,i,o,a;return t=eO(e),n=(r=ev(e))(t,t.neg(t.ONE)),i=r(t,n),o=r(t,t.neg(n)),a=(e+ec)/ep,(e,t)=>{let r=e.pow(t,a),s=e.mul(r,n),l=e.mul(r,i),f=e.mul(r,o),u=e.eql(e.sqr(s),t),c=e.eql(e.sqr(l),t);r=e.cmov(r,s,u),s=e.cmov(f,l,c);let d=e.eql(e.sqr(s),t),h=e.cmov(r,s,d);return em(e,h,t),h}}return ev(e)}(this.ORDER)),t(this,e)}toBytes(e){return this.isLE?K(e,this.BYTES):J(e,this.BYTES)}fromBytes(e,t=!1){a(e,void 0,void 0);let{_lengths:r,BYTES:n,isLE:i,ORDER:o,_mod:s}=this;if(r){if(e.length<1||!r.includes(e.length)||e.length>n)throw Error("Field.fromBytes: expected "+r+" bytes, got "+e.length);let t=new Uint8Array(n);t.set(e,i?0:t.length-e.length),e=t}if(e.length!==n)throw Error("Field.fromBytes: expected "+n+" bytes, got "+e.length);let l=i?Y(e):G(e);if(s&&(l=eg(l,o)),!t&&!this.isValid(l))throw Error("invalid field element: outside of range 0..ORDER");return l}invertBatch(e){return eS(this,e)}cmov(e,t,r){return H(r,"condition"),r?t:e}}function eO(e,t={}){return new eR(e,t)}function eI(e){if("bigint"!=typeof e)throw Error("field order must be bigint");if(e<=ea)throw Error("field order must be greater than 1");return Math.ceil(er(e-ea)/8)}function eT(e){let t=eI(e);return t+Math.ceil(t/2)}Object.freeze(eR.prototype);let eN=BigInt(0),eP=BigInt(1);function eU(e,t){let r=t.negate();return e?r:t}function ej(e,t){let r=eS(e.Fp,t.map(e=>e.Z));return t.map((t,n)=>e.fromAffine(t.toAffine(r[n])))}function eC(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function ek(e,t){eC(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),i=2**e;return{windows:r,windowSize:n,mask:en(e),maxNumber:i,shiftBy:BigInt(e)}}function eL(e,t,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=r,s=Number(e&i),l=e>>a;s>n&&(s-=o,l+=eP);let f=t*n,u=f+Math.abs(s)-1,c=0===s;return{nextN:l,offset:u,isZero:c,isNeg:s<0,isNegF:t%2!=0,offsetF:f}}let eM=new WeakMap,eD=new WeakMap;function eF(e){return eD.get(e)||1}function e$(e){if(e!==eN)throw Error("invalid wNAF")}class eq{BASE;ZERO;Fn;bits;constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>eN;)t&eP&&(r=r.add(n)),n=n.double(),t>>=eP;return r}precomputeWindow(e,t){let{windows:r,windowSize:n}=ek(t,this.bits),i=[],o=e,a=o;for(let e=0;e<r;e++){a=o,i.push(a);for(let e=1;e<n;e++)a=a.add(o),i.push(a);o=a.double()}return i}wNAF(e,t,r){if(!this.Fn.isValid(r))throw Error("invalid scalar");let n=this.ZERO,i=this.BASE,o=ek(e,this.bits);for(let e=0;e<o.windows;e++){let{nextN:a,offset:s,isZero:l,isNeg:f,isNegF:u,offsetF:c}=eL(r,e,o);r=a,l?i=i.add(eU(u,t[c])):n=n.add(eU(f,t[s]))}return e$(r),{p:n,f:i}
2}wNAFUnsafe(e,t,r,n=this.ZERO){let i=ek(e,this.bits);for(let e=0;e<i.windows&&r!==eN;e++){let{nextN:o,offset:a,isZero:s,isNeg:l}=eL(r,e,i);if(r=o,!s){let e=t[a];n=n.add(l?e.negate():e)}}return e$(r),n}getPrecomputes(e,t,r){let n=eM.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&("function"==typeof r&&(n=r(n)),eM.set(t,n))),n}cached(e,t,r){let n=eF(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){let i=eF(e);return 1===i?this._unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)}createCache(e,t){eC(t,this.bits),eD.set(e,t),eM.delete(e)}hasCache(e){return 1!==eF(e)}}function eH(e,t,r){if(!t)return eO(e,{isLE:r});if(t.ORDER!==e)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return e_(t),t}function eW(e,t){if(z(e),z(t),t<0||t>4)throw Error("invalid I2OSP length: "+t);if(e<0||e>2**(8*t)-1)throw Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function ez(e){if(!i(e)&&"string"!=typeof e)throw Error("DST must be Uint8Array or ascii string");let t="string"==typeof e?Q(e):e;if(0===t.length)throw Error("DST must be non-empty");return t}function eV(e,t,r){let n;ei(r,{p:"bigint",m:"number",k:"number",hash:"function"});let{p:i,k:o,m:s,hash:l,expand:f,DST:u}=r;if(z(l.outputLen,"valid hash"),a(e,void 0,void 0),z(t),t<1)throw Error("hash_to_field: expected count >= 1");if(s<1)throw Error("hash_to_field: expected m >= 1");let c=Math.ceil((i.toString(2).length+o)/8),d=t*s*c;if("xmd"===f)n=function(e,t,r,n){a(e,void 0,void 0),z(r),(t=ez(t)).length>255&&(t=n(D(Q("H2C-OVERSIZE-DST-"),t)));let{outputLen:i,blockLen:o}=n,s=Math.ceil(r/i);if(r>65535||s>255)throw Error("expand_message_xmd: invalid lenInBytes");let l=D(t,eW(t.length,1)),f=new Uint8Array(o),u=eW(r,2),c=Array(s),d=n(D(f,e,u,eW(0,1),l));c[0]=n(D(d,eW(1,1),l));for(let e=1;e<s;e++){let t=[function(e,t){let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}(d,c[e-1]),eW(e+1,1),l];c[e]=n(D(...t))}return D(...c).slice(0,r)}(e,u,d,l);else if("xof"===f)n=function(e,t,r,n,i){if(a(e,void 0,void 0),z(r),(t=ez(t)).length>255){let e=Math.ceil(2*n/8);t=i.create({dkLen:e}).update(Q("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(eW(r,2)).update(t).update(eW(t.length,1)).digest()}(e,u,d,o,l);else if("_internal_pass"===f)n=e;else throw Error('expand must be "xmd" or "xof"');let h=Array(t);for(let e=0;e<t;e++){let t=Array(s);for(let r=0;r<s;r++){let o=c*(r+e*s),a=n.subarray(o,o+c);t[r]=eg(G(a),i)}h[e]=t}return h}class eZ{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,t){if(s(e),a(t,void 0,"key"),this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,n=new Uint8Array(r);n.set(t.length>r?e.create().update(t).digest():t);for(let e=0;e<n.length;e++)n[e]^=54;this.iHash.update(n),this.oHash=e.create();for(let e=0;e<n.length;e++)n[e]^=106;this.oHash.update(n),u(n)}update(e){return l(this),this.iHash.update(e),this}digestInto(e){l(this),f(e,this),this.finished=!0;let t=e.subarray(0,this.outputLen);this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let eG=((r=(e,t,r)=>new eZ(e,t).update(r).digest()).create=(e,t)=>new eZ(e,t),r),eY=(e,t)=>(e+(e>=0?t:-t)/e1)/t;function eJ(e){if(!["compact","recovered","der"].includes(e))throw Error('Signature format must be "compact", "recovered", or "der"');return e}function eK(e,t){ei(e);let r={};for(let n of Object.keys(t))r[n]=void 0===e[n]?t[n]:e[n];return H(r.lowS,"lowS"),H(r.prehash,"prehash"),void 0!==r.format&&eJ(r.format),r}
2let eX={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(e,t)=>{let{Err:r}=eX;if(z(e,"tag"),e<0||e>255)throw new r("tlv.encode: wrong tag");if("string"!=typeof t)throw TypeError('"data" expected string, got type='+typeof t);if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=V(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?V(i.length/2|128):"";return V(e)+o+i+t},decode(e,t){let{Err:r}=eX;t=a(t,void 0,"DER data");let n=0;if(e<0||e>255)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],o=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let a=t.subarray(n,n+e);if(a.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===a[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of a)o=o<<8|e;if(n+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let s=t.subarray(n,n+o);if(s.length!==o)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(n+o)}}},_int:{encode(e){let{Err:t}=eX;if(W(e),e<eQ)throw new t("integer: negative integers are not allowed");let r=V(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=eX;if(e.length<1)throw new t("invalid signature integer: empty");if(128&e[0])throw new t("invalid signature integer: negative");if(e.length>1&&0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return G(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=eX,i=a(e,void 0,"signature"),{v:o,l:s}=n.decode(48,i);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:l,l:f}=n.decode(2,o),{v:u,l:c}=n.decode(2,f);if(c.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(l),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=eX,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s));return t.encode(48,n+i)}};Object.freeze(eX._tlv),Object.freeze(eX._int),Object.freeze(eX);let eQ=BigInt(0),e0=BigInt(1),e1=BigInt(2),e2=BigInt(3),e8=BigInt(4);function e3(e){return Uint8Array.of(e?2:3)}function e4(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}let e6={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},e5={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},e7=BigInt(0),e9=BigInt(2),te=eO(e6.p,{sqrt:function(e){let t=e6.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),l=BigInt(88),f=e*e*e%t,u=f*f*e%t,c=ey(u,r,t)*u%t,d=ey(c,r,t)*u%t,h=ey(d,e9,t)*f%t,p=ey(h,i,t)*h%t,g=ey(p,o,t)*p%t,y=ey(g,s,t)*g%t,b=ey(y,l,t)*y%t,m=ey(b,s,t)*g%t,w=ey(m,r,t)*u%t,E=ey(w,a,t)*p%t,v=ey(E,n,t)*f%t,x=ey(v,e9,t);if(!te.eql(te.sqr(x),e))throw Error("Cannot find square root");return x}}),tt=function(e,t={}){let r=function(e,t,r={},n){if(void 0===n&&(n="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let r=t[e];if(!("bigint"==typeof r&&r>eN))throw Error(`CURVE.${e} must be positive bigint`)}let i=eH(t.p,r.Fp,n),o=eH(t.n,r.Fn,n);for(let r of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!i.isValid(t[r]))throw Error(`CURVE.${r} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:o}}("weierstrass",e,t),n=r.Fp,i=r.Fn,o=r.CURVE,{h:s,n:l}=o;ei(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:f,allowInfinityPoint:u}=t;if(f&&(!n.is0(o.a)||"bigint"!=typeof f.beta||!Array.isArray(f.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let c=e4(n,i);function d(){if(!n.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let h=void 0===t.toBytes?function(e,t,r){if(u&&t.is0())return Uint8Array.of(0);let{x:i,y:o}=t.toAffine(),a=n.toBytes(i);return(H(r,"isCompressed"),r)?(d(),D(e3(!n.isOdd(o)),a)):D(Uint8Array.of(4),a,n.toBytes(o))}:t.toBytes,p=void 0===t.fromBytes?function(e){a(e,void 0,"Point");let{publicKey:t,publicKeyUncompressed:r}=c,i=e.length,o=e[0],s=e.subarray(1);if(u&&1===i&&0===o)return{x:n.ZERO,y:n.ZERO};
2if(i===t&&(2===o||3===o)){let e,t=n.fromBytes(s);if(!n.isValid(t))throw Error("bad point: is not on curve, wrong x");let r=g(t);try{e=n.sqrt(r)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return d(),(1&o)==1!==n.isOdd(e)&&(e=n.neg(e)),{x:t,y:e}}if(i===r&&4===o){let e=n.BYTES,t=n.fromBytes(s.subarray(0,e)),r=n.fromBytes(s.subarray(e,2*e));if(!b(t,r))throw Error("bad point: is not on curve");return{x:t,y:r}}throw Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${r}`)}:t.fromBytes;function g(e){let t=n.sqr(e),r=n.mul(t,e);return n.add(n.add(r,n.mul(e,o.a)),o.b)}function b(e,t){let r=n.sqr(t),i=g(e);return n.eql(r,i)}if(!b(o.Gx,o.Gy))throw Error("bad curve params: generator point");let w=n.mul(n.pow(o.a,e2),e8),E=n.mul(n.sqr(o.b),BigInt(27));if(n.is0(n.add(w,E)))throw Error("bad curve params: a or b");function v(e,t,r=!1){if(!n.isValid(t)||r&&n.is0(t))throw Error(`bad point coordinate ${e}`);return t}function x(e){if(!(e instanceof A))throw Error("Weierstrass Point expected")}function _(e){if(!f||!f.basises)throw Error("no endo");return function(e,t,r){et("scalar",e,eQ,r);let[[n,i],[o,a]]=t,s=eY(a*e,r),l=eY(-i*e,r),f=e-s*n-l*o,u=-s*i-l*a,c=f<eQ,d=u<eQ;c&&(f=-f),d&&(u=-u);let h=en(Math.ceil(er(r)/2))+e0;if(f<eQ||f>=h||u<eQ||u>=h)throw Error("splitScalar (endomorphism): failed for k");return{k1neg:c,k1:f,k2neg:d,k2:u}}(e,f.basises,i.ORDER)}function S(e,t,r,i,o){return r=new A(n.mul(r.X,e),r.Y,r.Z),t=eU(i,t),r=eU(o,r),t.add(r)}class A{static BASE=new A(o.Gx,o.Gy,n.ONE);static ZERO=new A(n.ZERO,n.ONE,n.ZERO);static Fp=n;static Fn=i;X;Y;Z;constructor(e,t,r){this.X=v("x",e),this.Y=v("y",t,!0),this.Z=v("z",r),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof A)throw Error("projective point not allowed");return n.is0(t)&&n.is0(r)?A.ZERO:new A(t,r,n.ONE)}static fromBytes(e){let t=A.fromAffine(p(a(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return A.fromBytes(m(e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return R.createCache(this,e),t||this.multiply(e2),this}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&n.is0(this.X)&&n.eql(this.Y,n.ONE)&&n.is0(this.Z))return;throw Error("bad point: ZERO")}let{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw Error("bad point: x or y not field elements");if(!b(e,r))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:e}=this.toAffine();if(!n.isOdd)throw Error("Field doesn't support isOdd");return!n.isOdd(e)}equals(e){x(e);let{X:t,Y:r,Z:i}=this,{X:o,Y:a,Z:s}=e,l=n.eql(n.mul(t,s),n.mul(o,i)),f=n.eql(n.mul(r,s),n.mul(a,i));return l&&f}negate(){return new A(this.X,n.neg(this.Y),this.Z)}double(){let{a:e,b:t}=o,r=n.mul(t,e2),{X:i,Y:a,Z:s}=this,l=n.ZERO,f=n.ZERO,u=n.ZERO,c=n.mul(i,i),d=n.mul(a,a),h=n.mul(s,s),p=n.mul(i,a);return p=n.add(p,p),u=n.mul(i,s),u=n.add(u,u),l=n.mul(e,u),f=n.mul(r,h),f=n.add(l,f),l=n.sub(d,f),f=n.add(d,f),f=n.mul(l,f),l=n.mul(p,l),u=n.mul(r,u),h=n.mul(e,h),p=n.sub(c,h),p=n.mul(e,p),p=n.add(p,u),u=n.add(c,c),c=n.add(u,c),c=n.add(c,h),c=n.mul(c,p),f=n.add(f,c),h=n.mul(a,s),h=n.add(h,h),c=n.mul(h,p),l=n.sub(l,c),u=n.mul(h,d),u=n.add(u,u),new A(l,f,u=n.add(u,u))}add(e){x(e);let{X:t,Y:r,Z:i}=this,{X:a,Y:s,Z:l}=e,f=n.ZERO,u=n.ZERO,c=n.ZERO,d=o.a,h=n.mul(o.b,e2),p=n.mul(t,a),g=n.mul(r,s),y=n.mul(i,l),b=n.add(t,r),m=n.add(a,s);b=n.mul(b,m),m=n.add(p,g),b=n.sub(b,m),m=n.add(t,i);let w=n.add(a,l);return m=n.mul(m,w),w=n.add(p,y),m=n.sub(m,w),w=n.add(r,i),f=n.add(s,l),w=n.mul(w,f),f=n.add(g,y),w=n.sub(w,f),c=n.mul(d,m),f=n.mul(h,y),c=n.add(f,c),f=n.sub(g,c),c=n.add(g,c),u=n.mul(f,c),g=n.add(p,p),g=n.add(g,p),y=n.mul(d,y),m=n.mul(h,m),g=n.add(g,y),y=n.sub(p,y),y=n.mul(d,y),m=n.add(m,y),p=n.mul(g,m),u=n.add(u,p),p=n.mul(w,m),f=n.mul(b,f),f=n.sub(f,p),p=n.mul(b,g),c=n.mul(w,c),new A(f,u,c=n.add(c,p))}subtract(e){return x(e),this.add(e.negate())}is0(){return this.equals(A.ZERO)}multiply(e){let r,n,{endo:o}=t;if(!i.isValidNot0(e))throw RangeError("invalid scalar: out of range");let a=e=>R.cached(this,e,e=>ej(A,e));
2if(o){let{k1neg:t,k1:i,k2neg:s,k2:l}=_(e),{p:f,f:u}=a(i),{p:c,f:d}=a(l);n=u.add(d),r=S(o.beta,f,c,t,s)}else{let{p:t,f:i}=a(e);r=t,n=i}return ej(A,[r,n])[0]}multiplyUnsafe(e){let{endo:r}=t;if(!i.isValid(e))throw RangeError("invalid scalar: out of range");if(e===eQ||this.is0())return A.ZERO;if(e===e0)return this;if(R.hasCache(this))return this.multiply(e);if(!r)return R.unsafe(this,e);{let{k1neg:t,k1:n,k2neg:i,k2:o}=_(e),{p1:a,p2:s}=function(e,t,r,n){let i=t,o=e.ZERO,a=e.ZERO;for(;r>eN||n>eN;)r&eP&&(o=o.add(i)),n&eP&&(a=a.add(i)),i=i.double(),r>>=eP,n>>=eP;return{p1:o,p2:a}}(A,this,n,o);return S(r.beta,a,s,t,i)}}toAffine(e){let t=e,{X:r,Y:i,Z:o}=this;if(n.eql(o,n.ONE))return{x:r,y:i};let a=this.is0();null==t&&(t=a?n.ONE:n.inv(o));let s=n.mul(r,t),l=n.mul(i,t),f=n.mul(o,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(f,n.ONE))throw Error("invZ was invalid");return{x:s,y:l}}isTorsionFree(){let{isTorsionFree:e}=t;return s===e0||(e?e(A,this):R.unsafe(this,l).is0())}clearCofactor(){let{clearCofactor:e}=t;return s===e0?this:e?e(A,this):this.multiplyUnsafe(s)}isSmallOrder(){return s===e0?this.is0():this.clearCofactor().is0()}toBytes(e=!0){return H(e,"isCompressed"),this.assertValidity(),h(A,this,e)}toHex(e=!0){return y(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let B=i.BITS,R=new eq(A,t.endo?Math.ceil(B/2):B);return B>=8&&A.BASE.precompute(8),Object.freeze(A.prototype),Object.freeze(A),A}(e6,{Fp:te,endo:e5}),tr=function(e,t,r={}){s(t),ei(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let n=void 0===(r=Object.assign({},r)).randomBytes?F:r.randomBytes,l=void 0===r.hmac?(e,r)=>eG(t,e,r):r.hmac,{Fp:f,Fn:u}=e,{ORDER:c,BITS:d}=u,{keygen:h,getPublicKey:p,getSharedSecret:g,utils:b,lengths:w}=function(e,t={}){let{Fn:r}=e,n=void 0===t.randomBytes?F:t.randomBytes,o=Object.assign(e4(e.Fp,r),{seed:Math.max(eT(r.ORDER),16)});function s(e){let t;return function(e,t,r=!1){a(e,void 0,void 0);let n=e.length,i=eI(t),o=Math.max(eT(t),16);if(n<o||n>1024)throw Error("expected "+o+"-1024 bytes of input, got "+n);let s=eg(r?Y(e):G(e),t-ea)+ea;return r?K(s,i):J(s,i)}((t=e=void 0===e?n(o.seed):e,a(t,o.seed,"seed")),r.ORDER)}function l(t,n=!0){return e.BASE.multiply(r.fromBytes(t)).toBytes(n)}function f(e){let{secretKey:t,publicKey:n,publicKeyUncompressed:s}=o,l=r._lengths;if(!i(e))return;let f=a(e,void 0,"key").length,u=f===n||f===s,c=f===t||!!l?.includes(f);if(!u||!c)return u}let u={isValidSecretKey:function(e){try{let t=r.fromBytes(e);return r.isValidNot0(t)}catch(e){return!1}},isValidPublicKey:function(t,r){let{publicKey:n,publicKeyUncompressed:i}=o;try{let o=t.length;if(!0===r&&o!==n||!1===r&&o!==i)return!1;return!!e.fromBytes(t)}catch(e){return!1}},randomSecretKey:s},c=function(e){let t=s(e);return{secretKey:t,publicKey:l(t)}};return Object.freeze(u),Object.freeze(o),Object.freeze({getPublicKey:l,getSharedSecret:function(t,n,i=!0){if(!0===f(t))throw Error("first arg must be private key");if(!1===f(n))throw Error("second arg must be public key");let o=r.fromBytes(t);return e.fromBytes(n).multiply(o).toBytes(i)},keygen:c,Point:e,utils:u,lengths:o})}(e,r),E={prehash:!0,lowS:"boolean"!=typeof r.lowS||r.lowS,format:"compact",extraEntropy:!1},v=c*e1+e0<f.ORDER;function x(e,t){if(!u.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}function _(){if(v)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function S(e,t){eJ(t);let r=w.signature;return a(e,"compact"===t?r:"recovered"===t?r+1:void 0,void 0)}class A{r;s;recovery;constructor(e,t,r){if(this.r=x("r",e),this.s=x("s",t),null!=r){if(_(),![0,1,2,3].includes(r))throw Error("invalid recovery id");this.recovery=r}Object.freeze(this)}static fromBytes(e,t=E.format){let r;if(S(e,t),"der"===t){let t,r,{r:n,s:i}=eX.toSig(a(e,t,r));return new A(n,i)}"recovered"===t&&(r=e[0],t="compact",e=e.subarray(1));let n=w.signature/2,i=e.subarray(0,n),o=e.subarray(n,2*n);return new A(u.fromBytes(i),u.fromBytes(o),r)}static fromHex(e,t){return this.fromBytes(m(e),t)}assertRecovery(){let{recovery:e}=this;if(null==e)throw Error("invalid recovery id: must be present");return e}addRecoveryBit(e){return new A(this.r,this.s,e)}recoverPublicKey(t){let{r,s:n}=this,i=this.assertRecovery(),o=2===i||3===i?r+c:r;if(!f.isValid(o))throw Error("invalid recovery id: sig.r+curve.n != R.x");let s=f.toBytes(o),l=e.fromBytes(D(e3((1&i)==0),s)),d=u.inv(o),h=R(a(t,void 0,"msgHash")),p=u.create(-h*d),g=u.create(n*d),y=e.BASE.multiplyUnsafe(p).add(l.multiplyUnsafe(g));if(y.is0())throw Error("invalid recovery: point at infinify");return y.assertValidity(),y}hasHighS(){return this.s>c>>e0}toBytes(e=E.format){if(eJ(e),"der"===e)return m(eX.hexFromSig(this));
2let{r:t,s:r}=this,n=u.toBytes(t),i=u.toBytes(r);return"recovered"===e?(_(),D(Uint8Array.of(this.assertRecovery()),n,i)):D(n,i)}toHex(e){return y(this.toBytes(e))}}Object.freeze(A.prototype),Object.freeze(A);let B=void 0===r.bits2int?function(e){if(e.length>8192)throw Error("input is too large");let t=G(e),r=8*e.length-d;return r>0?t>>BigInt(r):t}:r.bits2int,R=void 0===r.bits2int_modN?function(e){return u.create(B(e))}:r.bits2int_modN,O=en(d);function I(e){return et("num < 2^"+d,e,eQ,O),u.toBytes(e)}function T(e,r){return a(e,void 0,"message"),r?a(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:h,getPublicKey:p,getSharedSecret:g,utils:b,lengths:w,Point:e,sign:function(r,i,s={}){let{seed:f,k2sig:d}=function(t,r,i){let{lowS:o,prehash:s,extraEntropy:l}=eK(i,E),f=R(t=T(t,s)),d=u.fromBytes(r);if(!u.isValidNot0(d))throw Error("invalid private key");let h=[I(d),I(f)];if(null!=l&&!1!==l){let e=!0===l?n(w.secretKey):l;h.push(a(e,void 0,"extraEntropy"))}return{seed:D(...h),k2sig:function(t){let r=B(t);if(!u.isValidNot0(r))return;let n=u.inv(r),i=e.BASE.multiply(r).toAffine(),a=u.create(i.x);if(a===eQ)return;let s=u.create(n*u.create(f+a*d));if(s===eQ)return;let l=2*(i.x!==a)|Number(i.y&e0),h=s;return o&&s>c>>e0&&(h=u.neg(s),l^=1),new A(a,h,v?void 0:l)}}}(r,i,s);return(function(e,t,r){if(o(e,"hashLen"),o(t,"qByteLen"),"function"!=typeof r)throw TypeError("hmacFn must be a function");let n=e=>new Uint8Array(e),i=Uint8Array.of(),a=Uint8Array.of(0),s=Uint8Array.of(1),l=n(e),f=n(e),u=0,c=()=>{l.fill(1),f.fill(0),u=0},d=(...e)=>r(f,D(l,...e)),h=(e=i)=>
2{f=d(a,e),l=d(),0!==e.length&&(f=d(s,e),l=d())},p=()=>{if(u++>=1e3)throw Error("drbg: tried max amount of iterations");let e=0,r=[];for(;e<t;){let t=(l=d()).slice();r.push(t),e+=l.length}return D(...r)};return(e,t)=>{let r;for(c(),h(e);void 0===(r=t(p()));)h();return c(),r}})(t.outputLen,u.BYTES,l)(f,d).toBytes(s.format)},verify:function(t,r,n,o={}){let{lowS:s,prehash:l,format:f}=eK(o,E);if(n=a(n,void 0,"publicKey"),r=T(r,l),!i(t))throw Error("verify expects Uint8Array signature"+(t instanceof A?", use sig.toBytes()":""));S(t,f);try{let i=A.fromBytes(t,f),o=e.fromBytes(n);if(s&&i.hasHighS())return!1;let{r:a,s:l}=i,c=R(r),d=u.inv(l),h=u.create(c*d),p=u.create(a*d),g=e.BASE.multiplyUnsafe(h).add(o.multiplyUnsafe(p));if(g.is0())return!1;return u.create(g.x)===a}catch(e){return!1}},recoverPublicKey:function(e,t,r={}){let{prehash:n}=eK(r,E);return t=T(t,n),A.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:A,hash:t})}(tt,M),tn=(n=[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e))).map(e=>Array.from(e).reverse()),(e,t)=>{let[r,i,o,a]=n.map(t=>t.reduce((t,r)=>te.add(te.mul(t,e),r))),[s,l]=eS(te,[i,a],!0);return e=te.mul(r,s),t=te.mul(t,te.mul(o,l)),{x:e,y:t}});!function(e,t,r){if("function"!=typeof t)throw Error("mapToCurve() must be defined");let n=e=>Object.freeze({...e,DST:i(e.DST)?X(e.DST):e.DST,...void 0===e.encodeDST?{}:{encodeDST:i(e.encodeDST)?X(e.encodeDST):e.encodeDST}}),o=n(r);function a(r){return e.fromAffine(t(r))}function s(t){let r=t.clearCofactor();return r.equals(e.ZERO)?e.ZERO:(r.assertValidity(),r)}Object.freeze({get defaults(){return n(o)},Point:e,hashToCurve(e,t){let r=eV(e,2,Object.assign({},o,t)),n=a(r[0]),i=a(r[1]);return s(n.add(i))},encodeToCurve(e,t){let r=o.encodeDST?{DST:o.encodeDST}:{};return s(a(eV(e,1,Object.assign({},o,r,t))[0]))},mapToCurve(e){if(1===o.m){if("bigint"!=typeof e)throw Error("expected bigint (m=1)");return s(a([e]))}if(!Array.isArray(e))throw Error("expected array of bigints");for(let t of e)if("bigint"!=typeof t)throw Error("expected array of bigints");return s(a(e))},hashToScalar:(t,r)=>eV(t,1,Object.assign({},o,{p:e.Fn.ORDER,m:1,DST:"HashToScalar-"},r))[0][0]})}(tt,e=>{let{x:r,y:n}=(t||(t=function(e,t){let r=e_(e),{A:n,B:i,Z:o}=t;if(!r.isValidNot0(n)||!r.isValidNot0(i)||!r.isValid(o)||r.eql(o,r.neg(r.ONE))||-1!==eA(r,o))throw Error("mapToCurveSimpleSWU: invalid opts");let a=r.mul(i,r.inv(r.mul(o,n))),s=r.add(r.add(r.mul(r.sqr(a),a),r.mul(n,a)),i);if(-1===eA(r,s))throw Error("mapToCurveSimpleSWU: invalid opts");let l=function(e,t){let r=e_(e),n=r.ORDER,i=eQ;for(let e=n-e0;e%e1===eQ;e/=e1)i+=e0;let o=i,a=e1<<o-e0-e0,s=a*e1,l=(n-e0)/s,f=(l-e0)/e1,u=s-e0,c=r.pow(t,l),d=r.pow(t,(l+e0)/e1),h=(e,t)=>{let n=c,i=r.pow(t,u),s=r.sqr(i);s=r.mul(s,t);let l=r.mul(e,s);l=r.pow(l,f),l=r.mul(l,i),i=r.mul(l,t),s=r.mul(l,e);let h=r.mul(s,i);l=r.pow(h,a);let p=r.eql(l,r.ONE);i=r.mul(s,d),l=r.mul(h,n),s=r.cmov(i,s,p),h=r.cmov(l,h,p);for(let e=o;e>e0;e--){let t=e-e1;t=e1<<t-e0;let o=r.pow(h,t),a=r.eql(o,r.ONE);i=r.mul(s,n),n=r.mul(n,n),o=r.mul(h,n),s=r.cmov(i,s,a),h=r.cmov(o,h,a)}return{isValid:!r.is0(t)&&(p||r.is0(e)),value:s}};if(r.ORDER%e8===e2){let e=(r.ORDER-e2)/e8,n=r.sqrt(r.neg(t));h=(t,i)=>{let o=r.sqr(i),a=r.mul(t,i);
2o=r.mul(o,a);let s=r.pow(o,e);s=r.mul(s,a);let l=r.mul(s,n),f=r.mul(r.sqr(s),i),u=r.eql(f,t),c=r.cmov(l,s,u);return{isValid:!r.is0(i)&&u,value:c}}}return h}(r,o);if(!r.isOdd)throw Error("Field does not have .isOdd()");return e=>{let t,a,s,f,u,c,d,h;t=r.sqr(e),t=r.mul(t,o),a=r.sqr(t),a=r.add(a,t),s=r.add(a,r.ONE),s=r.mul(s,i),f=r.cmov(o,r.neg(a),!r.eql(a,r.ZERO)),f=r.mul(f,n),a=r.sqr(s),c=r.sqr(f),u=r.mul(c,n),a=r.add(a,u),a=r.mul(a,s),c=r.mul(c,f),u=r.mul(c,i),a=r.add(a,u),d=r.mul(t,s);let{isValid:p,value:g}=l(a,c);h=r.mul(t,e),h=r.mul(h,g),d=r.cmov(d,s,p),h=r.cmov(h,g,p);let y=r.isOdd(e)===r.isOdd(h);h=r.cmov(r.neg(h),h,y);let b=eS(r,[f],!0)[0];return{x:d=r.mul(d,b),y:h}}}(te,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:te.create(BigInt("-11"))})))(te.create(e[0]));return tn(r,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:te.ORDER,m:1,k:128,expand:"xmd",hash:M}),e.s(["addHexPrefix",()=>tF,"bigIntMax",()=>tH,"bigIntToBytes",()=>tP,"bigIntToHex",()=>tq,"bigIntToUnpaddedBytes",()=>tW,"bytesToBigInt",()=>tI,"bytesToHex",()=>tR,"bytesToInt",()=>tT,"bytesToUnprefixedHex",()=>tA,"concatBytes",()=>tV,"equalsBytes",()=>tG,"fromSigned",()=>tM,"hexToBytes",()=>tB,"int32ToBytes",()=>tZ,"intToBytes",()=>tN,"intToUnpaddedBytes",()=>tz,"setLengthLeft",()=>tj,"setLengthRight",()=>tC,"toBytes",()=>tL,"toUnsigned",()=>tD,"unpadBytes",()=>tk,"validateNoLeadingZeroes",()=>t$],489065);let ti="ETHEREUMJS_DEFAULT_ERROR_CODE";class to extends Error{constructor(e,t,r){super(t??e.code),this.type=e,void 0!==r&&(this.stack=r)}getMetadata(){return this.type}toObject(){return{type:this.getMetadata(),message:this.message??"",stack:this.stack??"",className:this.constructor.name}}}function ta(e,t){return new to({code:ti},e,t)}function ts(e){if(0===e[0])throw ta("invalid RLP: extra zeros");var t=function(e){let t="";for(let r=0;r<e.length;r++)t+=tu[e[r]];return t}(e);let r=Number.parseInt(t,16);if(Number.isNaN(r))throw ta("Invalid byte sequence");return r}function tl(e,t){if(e<56)return Uint8Array.from([e+t]);let r=tp(e),n=tp(t+55+r.length/2);return Uint8Array.from(td(n+r))}function tf(e,t,r){if(r>e.length)throw ta("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}e.s(["DEFAULT_ERROR_CODE",0,ti,"EthereumJSError",0,to,"EthereumJSErrorWithoutCode",0,ta],220313);let tu=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function tc(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function td(e){if("0x"===e.slice(0,2)&&(e=e.slice(0,2)),"string"!=typeof e)throw ta("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw ta("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=tc(e.charCodeAt(i)),o=tc(e.charCodeAt(i+1));if(void 0===r||void 0===o)throw ta('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+o}return n}function th(...e){if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t}function tp(e){if(e<0)throw ta("Invalid integer as argument, must be unsigned!");let t=e.toString(16);return t.length%2?`0${t}`:t}function tg(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function ty(e){if(e instanceof Uint8Array)return e;if("string"==typeof e){var t;return tg(e)?td((t="string"!=typeof e?e:tg(e)?e.slice(2):e).length%2?`0${t}`:t):new TextEncoder().encode(e)}if("number"==typeof e||"bigint"==typeof e)return e?td(tp(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw ta("toBytes: received unsupported type "+typeof e)}function tb(e){if(Array.isArray(e)){let t=[],r=0;for(let n=0;n<e.length;n++){let i=tb(e[n]);t.push(i),r+=i.length}return th(tl(r,192),...t)}let t=ty(e);return 1===t.length&&t[0]<128?t:th(tl(t.length,128),t)}function tm(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(void 0===t||!(t>0)||e.length===2+2*t)}e.s(["RLP",0,{encode:tb,decode:function(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);let r=function e(t){let r,n,i,o,a,s=[],l=t[0];if(l<=127)return{data:t.slice(0,1),remainder:t.subarray(1)};if(l<=183){if(r=l-127,i=128===l?Uint8Array.from([]):tf(t,1,r),2===r&&i[0]<128)throw ta("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:t.subarray(r)}}
2if(l<=191){if(n=l-182,t.length-1<n)throw ta("invalid RLP: not enough bytes for string length");if((r=ts(tf(t,1,n)))<=55)throw ta("invalid RLP: expected string length to be greater than 55");return{data:i=tf(t,n,r+n),remainder:t.subarray(r+n)}}if(l<=247){for(o=tf(t,1,r=l-191);o.length;)a=e(o),s.push(a.data),o=a.remainder;return{data:s,remainder:t.subarray(r)}}{if((r=ts(tf(t,1,n=l-246)))<56)throw ta("invalid RLP: encoded list too short");let i=n+r;if(i>t.length)throw ta("invalid RLP: total length is larger than the data");for(o=tf(t,n,i);o.length;)a=e(o),s.push(a.data),o=a.remainder;return{data:s,remainder:t.subarray(i)}}}(ty(e));if(t)return{data:r.data,remainder:r.remainder.slice()};if(0!==r.remainder.length)throw ta("invalid RLP: remainder must be zero");return r.data}},"encode",0,tb],807011),e.s(["isHexString",()=>tm,"padToEven",()=>tE,"stripHexPrefix",()=>tw],635457);let tw=e=>{if("string"!=typeof e)throw ta(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return tm(e)?e.slice(2):e};function tE(e){let t=e;if("string"!=typeof t)throw ta(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}let tv=function(e){if(!tm(e))throw ta(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},tx=function(e){if(!(e instanceof Uint8Array))throw ta(`This method only supports Uint8Array but input was: ${e}`)},t_=function(e){if("string"!=typeof e)throw ta(`This method only supports strings but input was: ${e}`)},tS=BigInt(0),tA=y,tB=e=>{if(!e.startsWith("0x"))throw ta("input string must be 0x prefixed");return m(tE(tw(e)))},tR=e=>{let t=tA(e);return`0x${t}`},tO=[];for(let e=0;e<=65535;e++)tO[e]=BigInt(e);let tI=(e,t=!1)=>{tx(e),t&&(e=e.slice().reverse());let r=tR(e);return"0x"===r?tS:4===r.length?tO[e[0]]:6===r.length?tO[256*e[0]+e[1]]:BigInt(r)},tT=e=>{let t=Number(tI(e));if(!Number.isSafeInteger(t))throw ta("Number exceeds 53 bits");return t},tN=e=>tB((e=>{if(!Number.isSafeInteger(e)||e<0)throw ta(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`})(e)),tP=(e,t=!1)=>{let r=tB(`0x${tE(e.toString(16))}`);return t?r.reverse():r},tU=(e,t,r,n)=>{if(e.length>t){if(!n)throw ta(`Input length ${e.length} exceeds target length ${t}. Use allowTruncate option to truncate.`);return r?e.subarray(0,t):e.subarray(-t)}return e.length<t?new Uint8Array(r?[...e,...new Uint8Array(t-e.length)]:[...new Uint8Array(t-e.length),...e]):e},tj=(e,t,r={})=>(tx(e),tU(e,t,!1,r.allowTruncate??!1)),tC=(e,t,r={})=>(tx(e),tU(e,t,!0,r.allowTruncate??!1)),tk=e=>{tx(e);var t=e;let r=t[0];for(;t.length>0&&"0"===r.toString();)r=(t=t.slice(1))[0];return t},tL=e=>{if(null==e)return new Uint8Array;
2if(Array.isArray(e)||e instanceof Uint8Array)return Uint8Array.from(e);if("string"==typeof e){if(!tm(e))throw ta(`Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ${e}`);return tB(e)}if("number"==typeof e)return tN(e);if("bigint"==typeof e){if(e<tS)throw ta(`Cannot convert negative bigint to Uint8Array. Given: ${e}`);let r=e.toString(16);r.length%2&&(r="0"+r);var t=r;if(t.startsWith("0x"))throw ta("input string cannot be 0x prefixed");return m(tE(t))}if(void 0!==e.toBytes)return e.toBytes();throw ta("invalid type")},tM=e=>BigInt.asIntN(256,tI(e)),tD=e=>tP(BigInt.asUintN(256,e)),tF=e=>"string"!=typeof e||tm(e)?e:`0x${e}`,t$=e=>{for(let[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw ta(`${t} cannot have leading zeroes, received: ${tR(r)}`)},tq=e=>`0x${e.toString(16)}`,tH=(...e)=>e.reduce((e,t)=>t>e?t:e),tW=e=>tk(tP(e)),tz=e=>tk(tN(e)),tV=(...e)=>{if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t};function tZ(e,t=!1){let r=new ArrayBuffer(4);return new DataView(r).setUint32(0,e,t),new Uint8Array(r)}function tG(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}let tY=BigInt("0xffffffffffffffff"),tJ=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935");let tK=tr.Point.CURVE().n,tX=tK/BigInt(2);BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");let tQ=tB("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470");tB("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347");let t0=tB("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421");M(new Uint8Array),Uint8Array.from([128]),BigInt(-1);let t1=BigInt(0),t2=BigInt(1),t8=BigInt(2);BigInt(3),BigInt(7),BigInt(8);let t3=BigInt(27);BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),e.s(["BIGINT_0",0,t1,"BIGINT_1",0,t2,"BIGINT_2",0,t8,"BIGINT_27",0,t3,"KECCAK256_NULL",0,tQ,"KECCAK256_RLP",0,t0,"MAX_INTEGER",0,tJ,"MAX_UINT64",0,tY,"SECP256K1_ORDER",0,tK,"SECP256K1_ORDER_DIV_2",0,tX],219403),BigInt(1e9),BigInt(1e18);let t4=BigInt(0),t6=BigInt(1),t5=BigInt(2),t7=BigInt(7),t9=BigInt(256),re=BigInt(113),rt=[],rr=[],rn=[];for(let e=0,t=t6,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],rt.push(2*(5*n+r)),rr.push((e+1)*(e+2)/2%64);let i=t4;for(let e=0;e<7;e++)(t=(t<<t6^(t>>t7)*re)%t9)&t5&&(i^=t6<<(t6<<BigInt(e))-t6);rn.push(i)}let ri=O(rn,!0),ro=ri[0],ra=ri[1],rs=(e,t,r)=>r>32?t<<r-32|e>>>64-r:e<<r|t>>>32-r,rl=(e,t,r)=>r>32?e<<r-32|t>>>64-r:t<<r|e>>>32-r;class rf{state;pos=0;posOut=0;finished=!1;state32;destroyed=!1;blockLen;suffix;outputLen;canXOF;enableXOF=!1;rounds;constructor(e,t,r,n=!1,i=24){if(this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.canXOF=n,this.rounds=i,o(r,"outputLen"),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}(this.state)}clone(){return this._cloneInto()}keccak(){h(this.state32),function(e,t=24){if(o(t,"rounds"),t<1||t>24)throw Error('"rounds" expected integer 1..24');let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;
2t+=2){let n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=rs(o,a,1)^r[n],l=rl(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=rr[r],o=rs(t,i,n),a=rl(t,i,n),s=rt[r];t=e[s],i=e[s+1],e[s]=o,e[s+1]=a}for(let t=0;t<50;t+=10){let r=e[t],n=e[t+1],i=e[t+2],o=e[t+3];e[t]^=~e[t+2]&e[t+4],e[t+1]^=~e[t+3]&e[t+5],e[t+2]^=~e[t+4]&e[t+6],e[t+3]^=~e[t+5]&e[t+7],e[t+4]^=~e[t+6]&e[t+8],e[t+5]^=~e[t+7]&e[t+9],e[t+6]^=~e[t+8]&r,e[t+7]^=~e[t+9]&n,e[t+8]^=~r&i,e[t+9]^=~n&o}e[0]^=ro[n],e[1]^=ra[n]}u(r)}(this.state32,this.rounds),h(this.state32),this.posOut=0,this.pos=0}update(e){l(this),a(e);let{blockLen:t,state:r}=this,n=e.length;for(let i=0;i<n;){let o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){l(this,!1),a(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return o(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(f(e,this),this.finished)throw Error("digest() was already called");this.writeInto(e.subarray(0,this.outputLen)),this.destroy()}digest(){let e=new Uint8Array(this.outputLen);return this.digestInto(e),e}destroy(){this.destroyed=!0,u(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return(e||=new rf(t,r,n,o,i)).blockLen=t,e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.canXOF=this.canXOF,e.destroyed=this.destroyed,e}}let ru=((e,t,r,n={})=>E(()=>new rf(t,e,r),n))(1,136,32),rc=function(e,t=!1){if(tx(e),t&&64!==e.length&&(e=tr.Point.fromBytes(e).toBytes(!1).slice(1)),64!==e.length)throw ta("Expected pubKey to be of length 64");return ru(e).subarray(-20)},rd=function(e){return tx(e),tr.getPublicKey(e,!1).slice(1)};new Uint8Array(0),e.s(["isValidAddress",0,function(e){try{t_(e)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},"privateToAddress",0,function(e){return rc(rd(e))},"privateToPublic",0,rd,"publicToAddress",0,rc,"toChecksumAddress",0,function(e,t){tv(e);let r=tw(e).toLowerCase(),n="";void 0!==t&&(n=tI(tL(t)).toString()+"0x");let i=tR(ru(w(n+r))).slice(2),o="";for(let e=0;e<r.length;e++)parseInt(i[e],16)>=8?o+=r[e].toUpperCase():o+=r[e];return`0x${o}`}],753103);class rh{constructor(e){if(20!==e.length)throw ta("Invalid address length");this.bytes=e}equals(e){return tG(this.bytes,e.bytes)}isZero(){return this.equals(new rh(new Uint8Array(20)))}isPrecompileOrSystemAddress(){let e=tI(this.bytes),t=BigInt("0xffff");return e>=t1&&e<=t}toString(){return tR(this.bytes)}toBytes(){return new Uint8Array(this.bytes)}}e.s(["Address",0,rh],179424);let rp={Number:0,BigInt:1,Uint8Array:2,PrefixedHexString:3};e.s(["TypeOutput",0,rp,"isEOACode7702AuthorizationList",0,function(e){return!(0===e.length||Array.isArray(e[0]))},"toType",0,function(e,t){if(null===e)return null;if(void 0===e)return;if("string"!=typeof e||tm(e)){if("number"==typeof e&&!Number.isSafeInteger(e))throw ta("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)")}else throw ta(`A string must be provided with a 0x-prefix, given: ${e}`);let r=tL(e);switch(t){case rp.Uint8Array:return r;case rp.BigInt:return tI(r);case rp.Number:{let e=tI(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw ta("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case rp.PrefixedHexString:return tR(r);default:throw ta("unknown outputType")}}],442512),e.s(["ecrecover",0,function(e,t,r,n,i){let o=tV(tj(r,32),tj(n,32)),a=t===t1||t===t2?t:void 0===i?t-t3:t-(i*t8+BigInt(35));if(a!==t1&&a!==t2)throw ta("Invalid signature v value");return tr.Signature.fromBytes(o).addRecoveryBit(Number(a)).recoverPublicKey(e).toBytes(!1).slice(1)},"hashPersonalMessage",0,function(e){return tx(e),ru(tV(w(`\u0019Ethereum Signed Message: 3${e.length}`),e))}],599460),tB("0x05"),e.s(["eoaCode7702AuthorizationListBytesItemToJSON",0,function(e){let[t,r,n,i,o,a]=e;return{chainId:tR(t),address:tR(r),nonce:tR(n),yParity:tR(i),r:tR(o),s:tR(a)}},"eoaCode7702AuthorizationListJSONItemToBytes",0,function(e){for(let t of["chainId","address","nonce","yParity","r","s"])if(void 0===e[t])throw ta(`EIP-7702 authorization list invalid: ${t} is not defined`);return[tk(tB(e.chainId)),tB(e.address),tk(tB(e.nonce)),tk(tB(e.yParity)),tk(tB(e.r)),tk(tB(e.s))]}],330891);tN(0),tN(1),BigInt(256),BigInt(31);let rg=786431,ry=(e,t)=>{let r=new Uint8Array(32);return r.set([t],0),r.set(M(tB(e)).subarray(1),1),tR(r)};e.s(["CELLS_PER_EXT_BLOB",0,128,"blobsToCellProofs",0,(e,t)=>[...t.reduce(([t,r],n)=>{let i=e.computeCellsAndProofs(n);return[[...t,...i[0]],[...r,...i[1]]]},[[],[]]),Array.from({length:128}
3,(e,t)=>t)][1],"blobsToCells",0,(e,t)=>[t.reduce((t,r)=>[...t,...e.computeCells(r)],[]),Array.from({length:128},(e,t)=>t)],"blobsToCommitments",0,(e,t)=>{let r=[];for(let n of t)r.push(e.blobToKzgCommitment(n).toLowerCase());return r},"blobsToProofs",0,(e,t,r)=>t.map((t,n)=>e.computeBlobProof(t,r[n]).toLowerCase()),"commitmentsToVersionedHashes",0,e=>{let t=[];for(let r of e)t.push(ry(r,1));return t},"computeVersionedHash",0,ry,"getBlobs",0,e=>{let t=Array.isArray(e)?e:[e],r=[];for(let e of t){let t=w(e),n=t.byteLength;if(0===n)throw Error("invalid blob data (0 bytes)");if(n>rg)throw Error(`blob data is too large (${n} bytes > ${rg} bytes)`);let i=Math.ceil(n/131072),o=function(e,t){let r=new Uint8Array(131072*t);return r.set(e),r[e.byteLength]=128,r}(t,i);for(let e=0;e<i;e++){let t=function(e){let t=new Uint8Array(131072);for(let r=0;r<4096;r++){let n=new Uint8Array(32);n.set(e.subarray(31*r,(r+1)*31),0),t.set(n,32*r)}return tR(t)}(o.subarray(131072*e,(e+1)*131072));r.push(t)}}return r}],134732),e.s([],602821)},828073,975424,e=>{"use strict";let t,r;var n,i,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,s=Math.floor,l="[BigNumber Error] ",f=l+"Number primitive has more than 15 significant digits: ",u=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function c(e){var t=0|e;return e>0||e===t?t:t-1}function d(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function h(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,l=e.e,f=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=l==f,!i||!o)return n?0:!i^r?1:-1;if(!n)return l>f^r?1:-1;for(a=0,s=(l=i.length)<(f=o.length)?l:f;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return l==f?0:l>f^r?1:-1}function p(e,t,r,n){if(e<t||e>r||e!==s(e))throw Error(l+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return c(e.e/14)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function b(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var m=function e(t){var r,n,i,m,w,E,v,x,_,S=M.prototype={constructor:M,toString:null,valueOf:null},A=new M(1),B=20,R=4,O=-7,I=21,T=-1e7,N=1e7,P=!1,U=1,j=0,C={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"Â ",suffix:""},k="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function M(e,t){var r,n,i,a,l,u,c,d,h=this;if(!(h instanceof M))return new M(e,t);if(null==t){if(e&&!0===e._isBigNumber){h.s=e.s,!e.c||e.e>N?h.c=h.e=null:e.e<T?h.c=[h.e=0]:(h.e=e.e,h.c=e.c.slice());return}if((u="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,l=e;l>=10;l/=10,a++);a>N?h.c=h.e=null:(h.e=a,h.c=[e]);return}d=String(e)}else{if(!o.test(d=String(e)))return _(h,d,u);h.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(a=d.indexOf("."))>-1&&(d=d.replace(".","")),(l=d.search(/e/i))>0?(a<0&&(a=l),a+=+d.slice(l+1),d=d.substring(0,l)):a<0&&(a=d.length)}else{if(p(t,2,k.length,"Base"),10==t&&L)return q(h=new M(e),B+h.e+1,R);if(d=String(e),u="number"==typeof e){if(0*e!=0)return _(h,d,u,t);if(h.s=1/e<0?(d=d.slice(1),-1):1,M.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else h.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=k.slice(0,t),a=l=0,c=d.length;l<c;l++)if(0>r.indexOf(n=d.charAt(l))){if("."==n){if(l>a){a=c;continue}}else if(!i&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){i=!0,l=-1,a=0;continue}return _(h,String(e),u,t)}u=!1,(a=(d=x(d,t,10,h.s)).indexOf("."))>-1?d=d.replace(".",""):a=d.length}for(l=0;48===d.charCodeAt(l);l++);for(c=d.length;48===d.charCodeAt(--c););if(d=d.slice(l,++c)){if(c-=l,u&&M.DEBUG&&c>15&&(e>0x1fffffffffffff||e!==s(e)))throw Error(f+h.s*e);if((a=a-l-1)>N)h.c=h.e=null;else if(a<T)h.c=[h.e=0];else{if(h.e=a,h.c=[],l=(a+1)%14,a<0&&(l+=14),l<c){for(l&&h.c.push(+d.slice(0,l)),c-=14;l<c;)h.c.push(+d.slice(l,l+=14));l=14-(d=d.slice(l)).length}else l-=c;for(;l--;d+="0");h.c.push(+d)}}else h.c=[h.e=0]}function D(e,t,r,n){var i,o,a,s,l;if(null==r?r=R:p(r,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)l=d(e.c),l=1==n||2==n&&(a<=O||a>=I)?y(l,a):b(l,a,"0");else if(o=(e=q(new M(e),t,r)).e,s=(l=d(e.c)).length,1==n||2==n&&(t<=o||o<=O)){for(;s<t;l+="0",s++);l=y(l,o)}else if(t-=a+(2===n&&o>a),l=b(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function F(e,t){for(var r,n,i=1,o=new M(e[0]);i<e.length;i++)(n=new M(e[i])).s&&(r=h(o,n))!==t&&(0!==r||o.s!==t)||(o=n);return o}function $(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+14*r-1)>N?e.c=e.e=null:r<T?e.c=[e.e=0]:(e.e=r,e.c=t),e}function q(e,t,r,n){var i,o,l,f,c,d,h,p=e.c;if(p){e:{for(i=1,f=p[0];f>=10;f/=10,i++);if((o=t-i)<0)o+=14,l=t,h=s((c=p[d=0])/u[i-l-1]%10);else if((d=a((o+1)/14))>=p.length)if(n){for(;p.length<=d;p.push(0));c=h=0,i=1,o%=14,l=o-14+1}else break e;else{for(i=1,c=f=p[d];f>=10;f/=10,i++);o%=14,h=(l=o-14+i)<0?0:s(c/u[i-l-1]%10)}
3if(n=n||t<0||null!=p[d+1]||(l<0?c:c%u[i-l-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(o>0?l>0?c/u[i-l]:0:p[d-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,n?(t-=e.e+1,p[0]=u[(14-t%14)%14],e.e=-t||0):p[0]=e.e=0,e;if(0==o?(p.length=d,f=1,d--):(p.length=d+1,f=u[14-o],p[d]=l>0?s(c/u[i-l]%u[l])*f:0),n)for(;;)if(0==d){for(o=1,l=p[0];l>=10;l/=10,o++);for(l=p[0]+=f,f=1;l>=10;l/=10,f++);o!=f&&(e.e++,1e14==p[0]&&(p[0]=1));break}else{if(p[d]+=f,1e14!=p[d])break;p[d--]=0,f=1}for(o=p.length;0===p[--o];p.pop());}e.e>N?e.c=e.e=null:e.e<T&&(e.c=[e.e=0])}return e}function H(e){var t,r=e.e;return null===r?e.toString():(t=d(e.c),t=r<=O||r>=I?y(t,r):b(t,r,"0"),e.s<0?"-"+t:t)}return M.clone=e,M.ROUND_UP=0,M.ROUND_DOWN=1,M.ROUND_CEIL=2,M.ROUND_FLOOR=3,M.ROUND_HALF_UP=4,M.ROUND_HALF_DOWN=5,M.ROUND_HALF_EVEN=6,M.ROUND_HALF_CEIL=7,M.ROUND_HALF_FLOOR=8,M.EUCLID=9,M.config=M.set=function(e){var t,r;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(p(r=e[t],0,1e9,t),B=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(p(r=e[t],0,8,t),R=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(p(r[0],-1e9,0,t),p(r[1],0,1e9,t),O=r[0],I=r[1]):(p(r,-1e9,1e9,t),O=-(I=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)p(r[0],-1e9,-1,t),p(r[1],1,1e9,t),T=r[0],N=r[1];else if(p(r,-1e9,1e9,t),r)T=-(N=r<0?-r:r);else throw Error(l+t+" cannot be zero: "+r);if(e.hasOwnProperty(t="CRYPTO"))if(!!(r=e[t])===r)if(r)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))P=r;else throw P=!r,Error(l+"crypto unavailable");else P=r;else throw Error(l+t+" not true or false: "+r);if(e.hasOwnProperty(t="MODULO_MODE")&&(p(r=e[t],0,9,t),U=r),e.hasOwnProperty(t="POW_PRECISION")&&(p(r=e[t],0,1e9,t),j=r),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(r=e[t]))C=r;else throw Error(l+t+" not an object: "+r);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(l+t+" invalid: "+r);L="0123456789"==r.slice(0,10),k=r}}else throw Error(l+"Object expected: "+e);return{DECIMAL_PLACES:B,ROUNDING_MODE:R,EXPONENTIAL_AT:[O,I],RANGE:[T,N],CRYPTO:P,MODULO_MODE:U,POW_PRECISION:j,FORMAT:C,ALPHABET:k}},M.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!M.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"==({}
3).toString.call(n)){if((1===o||-1===o)&&i>=-1e9&&i<=1e9&&i===s(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=1e14||r!==s(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(l+"Invalid BigNumber: "+e)},M.maximum=M.max=function(){return F(arguments,-1)},M.minimum=M.min=function(){return F(arguments,1)},r=0x20000000000000*Math.random()&2097151?function(){return s(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},M.random=function(e){var t,n,i,o,f,c=0,d=[],h=new M(A);if(null==e?e=B:p(e,0,1e9),o=a(e/14),P)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));c<o;)(f=131072*t[c]+(t[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(d.push(f%1e14),c+=2);c=o/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(o*=7);c<o;)(f=(31&t[c])*0x1000000000000+0x10000000000*t[c+1]+0x100000000*t[c+2]+0x1000000*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(d.push(f%1e14),c+=7);c=o/7}else throw P=!1,Error(l+"crypto unavailable");if(!P)for(;c<o;)(f=r())<9e15&&(d[c++]=f%1e14);for(o=d[--c],e%=14,o&&e&&(f=u[14-e],d[c]=s(o/f)*f);0===d[c];d.pop(),c--);if(c<0)d=[i=0];else{for(i=-1;0===d[0];d.splice(0,1),i-=14);for(c=1,f=d[0];f>=10;f/=10,c++);c<14&&(i-=14-c)}return h.e=i,h.c=d,h},M.sum=function(){for(var e=1,t=arguments,r=new M(t[0]);e<t.length;)r=r.plus(t[e++]);return r},x=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(r,n,i,o,a){var s,l,f,u,c,h,p,g,y=r.indexOf("."),m=B,w=R;for(y>=0&&(u=j,j=0,r=r.replace(".",""),h=(g=new M(n)).pow(r.length-y),j=u,g.c=t(b(d(h.c),h.e,"0"),10,i,e),g.e=g.c.length),f=u=(p=t(r,n,i,a?(s=k,e):(s=e,k))).length;0==p[--u];p.pop());if(!p[0])return s.charAt(0);if(y<0?--f:(h.c=p,h.e=f,h.s=o,p=(h=v(h,g,m,w,i)).c,c=h.r,f=h.e),y=p[l=f+m+1],u=i/2,c=c||l<0||null!=p[l+1],c=w<4?(null!=y||c)&&(0==w||w==(h.s<0?3:2)):y>u||y==u&&(4==w||c||6==w&&1&p[l-1]||w==(h.s<0?8:7)),l<1||!p[0])r=c?b(s.charAt(1),-m,s.charAt(0)):s.charAt(0);else{if(p.length=l,c)for(--i;++p[--l]>i;)p[l]=0,l||(++f,p=[1].concat(p));for(u=p.length;!p[--u];);for(y=0,r="";y<=u;r+=s.charAt(p[y++]));r=b(r,f,s.charAt(0))}return r}}(),v=function(){function e(e,t,r){var n,i,o,a,s=0,l=e.length,f=t%1e7,u=t/1e7|0;for(e=e.slice();l--;)n=u*(o=e[l]%1e7)+(a=e[l]/1e7|0)*f,s=((i=f*o+n%1e7*1e7+s)/r|0)+(n/1e7|0)+u*a,e[l]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=+(e[r]<t[r]),e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,a,l){var f,u,d,h,p,g,y,b,m,w,E,v,x,_,S,A,B,R=n.s==i.s?1:-1,O=n.c,I=i.c;if(!O||!O[0]||!I||!I[0])return new M(!n.s||!i.s||(O?I&&O[0]==I[0]:!I)?NaN:O&&0==O[0]||!I?0*R:R/0);for(m=(b=new M(R)).c=[],R=o+(u=n.e-i.e)+1,l||(l=1e14,u=c(n.e/14)-c(i.e/14),R=R/14|0),d=0;I[d]==(O[d]||0);d++);if(I[d]>(O[d]||0)&&u--,R<0)m.push(1),h=!0;else{for(_=O.length,A=I.length,d=0,R+=2,(p=s(l/(I[0]+1)))>1&&(I=e(I,p,l),O=e(O,p,l),A=I.length,_=O.length),x=A,E=(w=O.slice(0,A)).length;E<A;w[E++]=0);B=[0].concat(B=I.slice()),S=I[0],I[1]>=l/2&&S++;do{if(p=0,(f=t(I,w,A,E))<0){if(v=w[0],A!=E&&(v=v*l+(w[1]||0)),(p=s(v/S))>1)for(p>=l&&(p=l-1),y=(g=e(I,p,l)).length,E=w.length;1==t(g,w,y,E);)p--,r(g,A<y?B:I,y,l),y=g.length,f=1;else 0==p&&(f=p=1),y=(g=I.slice()).length;if(y<E&&(g=[0].concat(g)),r(w,g,E,l),E=w.length,-1==f)for(;1>t(I,w,A,E);)p++,r(w,A<E?B:I,E,l),E=w.length}else 0===f&&(p++,w=[0]);m[d++]=p,w[0]?w[E++]=O[x]||0:(w=[O[x]],E=1)}while((x++<_||null!=w[0])&&R--)h=null!=w[0],m[0]||m.splice(0,1)}if(1e14==l){for(d=1,R=m[0];R>=10;R/=10,d++);q(b,o+(b.e=d+14*u-1)+1,a,h)}else b.e=u,b.r=+h;return b}}(),n=/^(-?)0([xbo])(?=\w[\w.]*$)/i,i=/^([^.]+)\.$/,m=/^\.([^.]+)$/,w=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g,_=function(e,t,r,o){var a,s=r?t:t.replace(E,"");if(w.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(n,function(e,t,r){return a="x"==(r=r.toLowerCase())?16:"b"==r?2:8,o&&o!=a?e:t}),o&&(a=o,s=s.replace(i,"$1").replace(m,"0.$1")),t!=s))return new M(s,a);if(M.DEBUG)throw Error(l+"Not a"+(o?" base "+o:"")+" number: "+t);e.s=null}e.c=e.e=null},S.absoluteValue=S.abs=function(){var e=new M(this);return e.s<0&&(e.s=1),e},S.comparedTo=function(e,t){return h(this,new M(e,t))},S.decimalPlaces=S.dp=function(e,t){var r,n,i;if(null!=e)return p(e,0,1e9),null==t?t=R:p(t,0,8),q(new M(this),e+this.e+1,t);if(!(r=this.c))return null;if(n=((i=r.length-1)-c(this.e/14))*14,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},S.dividedBy=S.div=function(e,t){return v(this,new M(e,t),B,R)},S.dividedToIntegerBy=S.idiv=function(e,t){return v(this,new M(e,t),0,1)},S.exponentiatedBy=S.pow=function(e,t){var r,n,i,o,f,u,c,d,h,p=this;
3if((e=new M(e)).c&&!e.isInteger())throw Error(l+"Exponent not an integer: "+H(e));if(null!=t&&(t=new M(t)),u=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new M(Math.pow(+H(p),u?e.s*(2-g(e)):+H(e))),t?h.mod(t):h;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new M(NaN);(n=!c&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||u&&p.c[1]>=24e7:p.c[0]<8e13||u&&p.c[0]<=9999975e7)))return o=p.s<0&&g(e)?-0:0,p.e>-1&&(o=1/o),new M(c?1/o:o);j&&(o=a(j/14+2))}for(u?(r=new M(.5),c&&(e.s=1),d=g(e)):d=(i=Math.abs(+H(e)))%2,h=new M(A);;){if(d){if(!(h=h.times(p)).c)break;o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(t))}if(i){if(0===(i=s(i/2)))break;d=i%2}else if(q(e=e.times(r),e.e+1,1),e.e>14)d=g(e);else{if(0==(i=+H(e)))break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}return n?h:(c&&(h=A.div(h)),t?h.mod(t):o?q(h,j,R,f):h)},S.integerValue=function(e){var t=new M(this);return null==e?e=R:p(e,0,8),q(t,t.e+1,e)},S.isEqualTo=S.eq=function(e,t){return 0===h(this,new M(e,t))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(e,t){return h(this,new M(e,t))>0},S.isGreaterThanOrEqualTo=S.gte=function(e,t){return 1===(t=h(this,new M(e,t)))||0===t},S.isInteger=function(){return!!this.c&&c(this.e/14)>this.c.length-2},S.isLessThan=S.lt=function(e,t){return 0>h(this,new M(e,t))},S.isLessThanOrEqualTo=S.lte=function(e,t){return -1===(t=h(this,new M(e,t)))||0===t},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(e,t){var r,n,i,o,a=this.s;if(t=(e=new M(e,t)).s,!a||!t)return new M(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,l=e.e/14,f=this.c,u=e.c;if(!s||!l){if(!f||!u)return f?(e.s=-t,e):new M(u?this:NaN);if(!f[0]||!u[0])return u[0]?(e.s=-t,e):new M(f[0]?this:3==R?-0:0)}if(s=c(s),l=c(l),f=f.slice(),a=s-l){for((o=a<0)?(a=-a,i=f):(l=s,i=u),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=f.length)<(t=u.length))?a:t,a=t=0;t<n;t++)if(f[t]!=u[t]){o=f[t]<u[t];break}if(o&&(i=f,f=u,u=i,e.s=-e.s),(t=(n=u.length)-(r=f.length))>0)for(;t--;f[r++]=0);for(t=1e14-1;n>a;){if(f[--n]<u[n]){for(r=n;r&&!f[--r];f[r]=t);--f[r],f[n]+=1e14}f[n]-=u[n]}for(;0==f[0];f.splice(0,1),--l);return f[0]?$(e,f,l):(e.s=3==R?-1:1,e.c=[e.e=0],e)},S.modulo=S.mod=function(e,t){var r,n;return(e=new M(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==U?(n=e.s,e.s=1,r=v(this,e,0,3),e.s=n,r.s*=n):r=v(this,e,0,U),(e=this.minus(r.times(e))).c[0]||1!=U||(e.s=this.s),e):new M(this):new M(NaN)},S.multipliedBy=S.times=function(e,t){var r,n,i,o,a,s,l,f,u,d,h,p,g,y=this.c,b=(e=new M(e,t)).c;if(!y||!b||!y[0]||!b[0])return this.s&&e.s&&(!y||y[0]||b)&&(!b||b[0]||y)?(e.s*=this.s,y&&b?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(n=c(this.e/14)+c(e.e/14),e.s*=this.s,(l=y.length)<(d=b.length)&&(g=y,y=b,b=g,i=l,l=d,d=i),i=l+d,g=[];i--;g.push(0));for(i=d;--i>=0;){for(r=0,h=b[i]%1e7,p=b[i]/1e7|0,o=i+(a=l);o>i;)s=p*(f=y[--a]%1e7)+(u=y[a]/1e7|0)*h,r=((f=h*f+s%1e7*1e7+g[o]+r)/1e14|0)+(s/1e7|0)+p*u,g[o--]=f%1e14;g[o]=r}return r?++n:g.splice(0,1),$(e,g,n)},S.negated=function(){var e=new M(this);return e.s=-e.s||null,e},S.plus=function(e,t){var r,n=this.s;if(t=(e=new M(e,t)).s,!n||!t)return new M(NaN);if(n!=t)return e.s=-t,this.minus(e);var i=this.e/14,o=e.e/14,a=this.c,s=e.c;if(!i||!o){if(!a||!s)return new M(n/0);if(!a[0]||!s[0])return s[0]?e:new M(a[0]?this:0*n)}if(i=c(i),o=c(o),a=a.slice(),n=i-o){for(n>0?(o=i,r=s):(n=-n,r=a),r.reverse();n--;r.push(0));r.reverse()}for((n=a.length)-(t=s.length)<0&&(r=s,s=a,a=r,t=n),n=0;t;)n=(a[--t]=a[t]+s[t]+n)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return n&&(a=[n].concat(a),++o),$(e,a,o)},S.precision=S.sd=function(e,t){var r,n,i;if(null!=e&&!!e!==e)return p(e,1,1e9),null==t?t=R:p(t,0,8),q(new M(this),e,t);if(!(r=this.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&this.e+1>n&&(n=this.e+1),n},S.shiftedBy=function(e){return p(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},S.squareRoot=S.sqrt=function(){var e,t,r,n,i,o=this.c,a=this.s,s=this.e,l=B+4,f=new M("0.5");
3if(1!==a||!o||!o[0])return new M(!a||a<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(a=Math.sqrt(+H(this)))||a==1/0?(((t=d(o)).length+s)%2==0&&(t+="0"),a=Math.sqrt(+t),s=c((s+1)/2)-(s<0||s%2),r=new M(t=a==1/0?"5e"+s:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+s)):r=new M(a+""),r.c[0]){for((a=(s=r.e)+l)<3&&(a=0);;)if(i=r,r=f.times(i.plus(v(this,i,l,1))),d(i.c).slice(0,a)===(t=d(r.c)).slice(0,a)){if(r.e<s&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(q(r,r.e+B+2,1),e=!r.times(r).eq(this));break}if(!n&&(q(i,i.e+B+2,0),i.times(i).eq(this))){r=i;break}l+=4,a+=4,n=1}}return q(r,r.e+B+1,R,e)},S.toExponential=function(e,t){return null!=e&&(p(e,0,1e9),e++),D(this,e,t,1)},S.toFixed=function(e,t){return null!=e&&(p(e,0,1e9),e=e+this.e+1),D(this,e,t)},S.toFormat=function(e,t,r){var n;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=C;else if("object"!=typeof r)throw Error(l+"Argument not an object: "+r);if(n=this.toFixed(e,t),this.c){var i,o=n.split("."),a=+r.groupSize,s=+r.secondaryGroupSize,f=r.groupSeparator||"",u=o[0],c=o[1],d=this.s<0,h=d?u.slice(1):u,p=h.length;if(s&&(i=a,a=s,s=i,p-=i),a>0&&p>0){for(i=p%a||a,u=h.substr(0,i);i<p;i+=a)u+=f+h.substr(i,a);s>0&&(u+=f+h.slice(i)),d&&(u="-"+u)}n=c?u+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?c.replace(RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):c):u}return(r.prefix||"")+n+(r.suffix||"")},S.toFraction=function(e){var t,r,n,i,o,a,s,f,c,h,p,g,y=this.c;if(null!=e&&(!(s=new M(e)).isInteger()&&(s.c||1!==s.s)||s.lt(A)))throw Error(l+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+H(s));if(!y)return new M(this);for(t=new M(A),c=r=new M(A),n=f=new M(A),g=d(y),o=t.e=g.length-this.e-1,t.c[0]=u[(a=o%14)<0?14+a:a],e=!e||s.comparedTo(t)>0?o>0?t:c:s,a=N,N=1/0,s=new M(g),f.c[0]=0;h=v(s,t,0,1),1!=(i=r.plus(h.times(n))).comparedTo(e);)r=n,n=i,c=f.plus(h.times(i=c)),f=i,t=s.minus(h.times(i=t)),s=i;return i=v(e.minus(r),n,0,1),f=f.plus(i.times(c)),r=r.plus(i.times(n)),f.s=c.s=this.s,o*=2,p=1>v(c,n,o,R).minus(this).abs().comparedTo(v(f,r,o,R).minus(this).abs())?[c,n]:[f,r],N=a,p},S.toNumber=function(){return+H(this)},S.toPrecision=function(e,t){return null!=e&&p(e,1,1e9),D(this,e,t,2)},S.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=O||i>=I?y(d(r.c),i):b(d(r.c),i,"0"):10===e&&L?t=b(d((r=q(new M(r),B+i+1,R)).c),r.e,"0"):(p(e,2,k.length,"Base"),t=x(b(d(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},S.valueOf=S.toJSON=function(){return H(this)},S._isBigNumber=!0,S[Symbol.toStringTag]="BigNumber",S[Symbol.for("nodejs.util.inspect.custom")]=S.valueOf,null!=t&&M.set(t),M}();e.s(["BigNumber",0,m,"default",0,m],828073);var w=e.i(44314),E=e.i(470525),v=e.i(140965),x=e.i(950396);let _=BigInt(0),S=BigInt(1),A=BigInt(2),B=BigInt(3),R=BigInt(4),O=BigInt(5),I=BigInt(8);function T(e,t){let r=e%t;return r>=_?r:t+r}function N(e,t,r){let n=e;for(;t-- >_;)n*=n,n%=r;return n}function P(e,t){if(e===_)throw Error("invert: expected non-zero number");if(t<=_)throw Error("invert: expected positive modulus, got "+t);let r=T(e,t),n=t,i=_,o=S,a=S,s=_;for(;r!==_;){let e=n/r,t=n%r,l=i-a*e,f=o-s*e;n=r,r=t,i=a,o=s,a=l,s=f}if(n!==S)throw Error("invert: does not exist");return T(i,t)}let U=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function j(e){let t=U.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,x.validateObject)(e,t)}function C(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),o=e.inv(i);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),o),n}function k(e,t){let r=function(e,t){let r=(e.ORDER-S)/A,n=e.pow(t,r),i=e.eql(n,e.ONE),o=e.eql(n,e.ZERO),a=e.eql(n,e.neg(e.ONE));if(!i&&!o&&!a)throw Error("Cannot find square root: probably non-prime P");return i?1:o?0:-1}(e,t);return 0===r||1===r}function L(e,t){void 0!==t&&(0,E.anumber)(t);let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function M(e,t,r=!1,n={}){let i;if(e<=_)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:a}=L(e,t);if(a>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let s=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:a,MASK:(0,x.bitMask)(o),ZERO:_,ONE:S,create:t=>T(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return _<=t&&t<e},is0:e=>e===_,isOdd:e=>(e&S)===S,neg:t=>T(-t,e),eql:(e,t)=>
3e===t,sqr:t=>T(t*t,e),add:(t,r)=>T(t+r,e),sub:(t,r)=>T(t-r,e),mul:(t,r)=>T(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<_)throw Error("invalid exponent, negatives unsupported");if(r===_)return e.ONE;if(r===S)return t;let n=e.ONE,i=t;for(;r>_;)r&S&&(n=e.mul(n,i)),i=e.sqr(i),r>>=S;return n})(s,e,t),div:(t,r)=>T(t*P(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>P(t,e),sqrt:n.sqrt||(t=>(i||(i=e%R===B?function(t,r){let n=t.pow(r,(e+S)/R);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}:e%I===O?function(t,r){let n=t.mul(r,A),i=t.pow(n,(e-O)/I),o=t.mul(r,i),a=t.mul(t.mul(o,A),i),s=t.mul(o,t.sub(a,t.ONE));if(!t.eql(t.sqr(s),r))throw Error("Cannot find square root");return s}:function(e){let t=e-S,r=0;for(;t%A===_;)t/=A,r++;let n=A,i=M(e);for(;n<e&&k(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r){let t=(e+S)/R;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let o=(t+S)/A;return function(e,i){if(!k(e,i))throw Error("Cannot find square root");let a=r,s=e.pow(e.mul(e.ONE,n),t),l=e.pow(i,o),f=e.pow(i,t);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(s,S<<BigInt(a-t-1));s=e.sqr(r),l=e.mul(l,r),f=e.mul(f,s),a=t}return l}}(e)),i(s,t))),toBytes:e=>r?(0,x.numberToBytesLE)(e,a):(0,x.numberToBytesBE)(e,a),fromBytes:e=>{if(e.length!==a)throw Error("Field.fromBytes: expected "+a+" bytes, got "+e.length);return r?(0,x.bytesToNumberLE)(e):(0,x.bytesToNumberBE)(e)},invertBatch:e=>C(s,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(s)}function D(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function F(e){let t=D(e);return t+Math.ceil(t/2)}let $=BigInt(0),q=BigInt(1);function H(e,t){let r=t.negate();return e?r:t}function W(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function z(e,t){W(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),i=2**e;return{windows:r,windowSize:n,mask:(0,x.bitMask)(e),maxNumber:i,shiftBy:BigInt(e)}}function V(e,t,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=r,s=Number(e&i),l=e>>a;s>n&&(s-=o,l+=q);let f=t*n,u=f+Math.abs(s)-1,c=0===s;return{nextN:l,offset:u,isZero:c,isNeg:s<0,isNegF:t%2!=0,offsetF:f}}let Z=new WeakMap,G=new WeakMap;function Y(e){return G.get(e)||1}function J(e){return j(e.Fp),(0,x.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...L(e.n,e.nBitLength),...e,...{p:e.Fp.ORDER}})}function K(e){void 0!==e.lowS&&(0,x.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,x.abool)("prehash",e.prehash)}let X={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(e,t)=>{let{Err:r}=X;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=(0,x.numberToHexUnpadded)(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?(0,x.numberToHexUnpadded)(i.length/2|128):"";return(0,x.numberToHexUnpadded)(e)+o+i+t},decode(e,t){let{Err:r}=X,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],o=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let a=t.subarray(n,n+e);if(a.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===a[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of a)o=o<<8|e;if(n+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let a=t.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:t.subarray(n+o)}}},_int:{encode(e){let{Err:t}=X;if(e<Q)throw new t("integer: negative integers are not allowed");let r=(0,x.numberToHexUnpadded)(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=X;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return(0,x.bytesToNumberBE)(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=X,i=(0,x.ensureBytes)("signature",e),{v:o,l:a}=n.decode(48,i);if(a.length)throw new t("invalid signature: left bytes after parsing");let{v:s,l:l}=n.decode(2,o),{v:f,l:u}=n.decode(2,l);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(s),s:r.decode(f)}},hexFromSig(e){let{_tlv:t,_int:r}=X,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s));return t.encode(48,n+i)}},Q=BigInt(0),ee=BigInt(1),et=BigInt(2),er=BigInt(3),en=BigInt(4),ei=x.bytesToNumberBE,eo=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ea=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),es=BigInt(1),el=BigInt(2),ef=(e,t)=>(e+t/el)/t,eu=M(eo,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),s=BigInt(88),l=e*e*e%eo,f=l*l*e%eo,u=N(f,t,eo)*f%eo,c=N(u,t,eo)
3*f%eo,d=N(c,el,eo)*l%eo,h=N(d,n,eo)*d%eo,p=N(h,i,eo)*h%eo,g=N(p,a,eo)*p%eo,y=N(g,s,eo)*g%eo,b=N(y,a,eo)*p%eo,m=N(b,t,eo)*f%eo,w=N(m,o,eo)*h%eo,E=N(w,r,eo)*l%eo,v=N(E,el,eo);if(!eu.eql(eu.sqr(v),e))throw Error("Cannot find square root");return v}}),ec=(n={a:BigInt(0),b:BigInt(7),Fp:eu,n:ea,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-es*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=ef(t*e,ea),a=ef(-r*e,ea),s=T(e-o*t-a*n,ea),l=T(-o*r-a*t,ea),f=s>i,u=l>i;if(f&&(s=ea-s),u&&(l=ea-l),s>i||l>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:s,k2neg:u,k2:l}}}},i=w.sha256,{...(t=e=>(function(e){let t,r=(t=J(e),(0,x.validateObject)(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})),{Fp:n,n:i}=r,o=n.BYTES+1,a=2*n.BYTES+1;function s(e){return T(e,i)}let{ProjectivePoint:l,normPrivateKeyToScalar:f,weierstrassEquation:u,isWithinCurveOrder:c}=function(e){var t;let r=function(e){let t=J(e);(0,x.validateObject)(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=r,i=M(r.n,r.nBitLength),o=r.toBytes||((e,t,r)=>{let i=t.toAffine();return(0,x.concatBytes)(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),a=r.fromBytes||(e=>{let t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function s(e){let{a:t,b:i}=r,o=n.sqr(e),a=n.mul(o,e);return n.add(n.add(a,n.mul(e,t)),i)}if(!n.eql(n.sqr(r.Gy),s(r.Gx)))throw Error("bad generator point: equation left != right");function l(e){let t,{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:o,n:a}=r;if(n&&"bigint"!=typeof e){if((0,x.isBytes)(e)&&(e=(0,x.bytesToHex)(e)),"string"!=typeof e||!n.includes(e.length))throw Error("invalid private key");e=e.padStart(2*i,"0")}try{t="bigint"==typeof e?e:(0,x.bytesToNumberBE)((0,x.ensureBytes)("private key",e,i))}catch(t){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof e)}return o&&(t=T(t,a)),(0,x.aInRange)("private key",t,ee,a),t}function f(e){if(!(e instanceof d))throw Error("ProjectivePoint expected")}let u=(0,x.memoized)((e,t)=>{let{px:r,py:i,pz:o}=e;if(n.eql(o,n.ONE))return{x:r,y:i};let a=e.is0();null==t&&(t=a?n.ONE:n.inv(o));let s=n.mul(r,t),l=n.mul(i,t),f=n.mul(o,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(f,n.ONE))throw Error("invZ was invalid");return{x:s,y:l}}),c=(0,x.memoized)(e=>{if(e.is0()){if(r.allowInfinityPoint&&!n.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:i}=e.toAffine();if(!n.isValid(t)||!n.isValid(i))throw Error("bad point: x or y not FE");let o=n.sqr(i),a=s(t);if(!n.eql(o,a))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class d{constructor(e,t,r){if(null==e||!n.isValid(e))throw Error("x required");if(null==t||!n.isValid(t)||n.is0(t))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");this.px=e,this.py=t,this.pz=r,Object.freeze(this)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof d)throw Error("projective point not allowed");let i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=C(n,e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){let t=d.fromAffine(a((0,x.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(l(e))}static msm(e,t){return function(e,t,r,n){if(!Array.isArray(r))throw Error("array expected");r.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)});if(!Array.isArray(n))throw Error("array of scalars expected");if(n.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)}),r.length!==n.length)throw Error("arrays of points and scalars must have equal length");let i=e.ZERO,o=(0,x.bitLen)(BigInt(r.length)),a=o>12?o-3:o>4?o-2:o?2:1,s=(0,x.bitMask)(a),l=Array(Number(s)+1).fill(i),f=Math.floor((t.BITS-1)/a)*a,u=i;for(let e=f;e>=0;e-=a){l.fill(i);for(let t=0;t<n.length;t++){let i=Number(n[t]>>BigInt(e)&s);l[i]=l[i].add(r[t])}let t=i;for(let e=l.length-1,r=i;e>0;e--)r=r.add(l[e]),t=t.add(r);if(u=u.add(t),0!==e)for(let e=0;e<a;e++)u=u.double()}return u}(d,i,e,t)}_setWindowSize(e){p.setWindowSize(this,e)}assertValidity(){c(this)}hasEvenY(){let{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){f(e);let{px:t,py:r,pz:i}=this,{px:o,py:a,pz:s}=e,l=n.eql(n.mul(t,s),n.mul(o,i)),u=n.eql(n.mul(r,s),n.mul(a,i));return l&&u}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){let{a:e,b:t}=r,i=n.mul(t,er),{px:o,py:a,pz:s}=this,l=n.ZERO,f=n.ZERO,u=n.ZERO,c=n.mul(o,o),h=n.mul(a,a),p=n.mul(s,s),g=n.mul(o,a);return g=n.add(g,g),u=n.mul(o,s),u=n.add(u,u),l=n.mul(e,u),f=n.mul(i,p),f=n.add(l,f),l=n.sub(h,f),f=n.add(h,f),f=n.mul(l,f),l=n.mul(g,l),u=n.mul(i,u),p=n.mul(e,p),g=n.sub(c,p),g=n.mul(e,g),g=n.add(g,u),u=n.add(c,c),c=n.add(u,c),c=n.add(c,p),c=n.mul(c,g),f=n.add(f,c),p=n.mul(a,s),p=n.add(p,p),c=n.mul(p,g),l=n.sub(l,c),u=n.mul(p,h),u=n.add(u,u),new d(l,f,u=n.add(u,u))}add(e){f(e);let{px:t,py:i,pz:o}=this,{px:a,py:s,pz:l}=e,u=n.ZERO,c=n.ZERO,h=n.ZERO,p=r.a,g=n.mul(r.b,er),y=n.mul(t,a),b=n.mul(i,s),m=n.mul(o,l),w=n.add(t,i),E=n.add(a,s);w=n.mul(w,E),E=n.add(y,b),w=n.sub(w,E),E=n.add(t,o);let v=n.add(a,l);return E=n.mul(E,v),v=n.add(y,m),E=n.sub(E,v),v=n.add(i,o),u=n.add(s,l),v=n.mul(v,u),u=n.add(b,m),v=n.sub(v,u),h=n.mul(p,E),u=n.mul(g,m),h=n.add(u,h),u=n.sub(b,h),h=n.add(b,h),c=n.mul(u,h),b=n.add(y,y),b=n.add(b,y),m=n.mul(p,m),E=n.mul(g,E),b=n.add(b,m),m=n.sub(y,m),m=n.mul(p,m),E=n.add(E,m),y=n.mul(b,E),c=n.add(c,y),y=n.mul(v,E),u=n.mul(w,u),u=n.sub(u,y),y=n.mul(w,b),h=n.mul(v,h),new d(u,c,h=n.add(h,y))}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,e,d.normalizeZ)}multiplyUnsafe(e){let{endo:t,n:i}=r;(0,x.aInRange)("scalar",e,Q,i);let o=d.ZERO;if(e===Q)return o;if(this.is0()||e===ee)return this;if(!t||p.hasPrecomputes(this))return p.wNAFCachedUnsafe(this,e,d.normalizeZ);
3let{k1neg:a,k1:s,k2neg:l,k2:f}=t.splitScalar(e),u=o,c=o,h=this;for(;s>Q||f>Q;)s&ee&&(u=u.add(h)),f&ee&&(c=c.add(h)),h=h.double(),s>>=ee,f>>=ee;return a&&(u=u.negate()),l&&(c=c.negate()),c=new d(n.mul(c.px,t.beta),c.py,c.pz),u.add(c)}multiply(e){let t,i,{endo:o,n:a}=r;if((0,x.aInRange)("scalar",e,ee,a),o){let{k1neg:r,k1:a,k2neg:s,k2:l}=o.splitScalar(e),{p:f,f:u}=this.wNAF(a),{p:c,f:h}=this.wNAF(l);f=p.constTimeNegate(r,f),c=p.constTimeNegate(s,c),c=new d(n.mul(c.px,o.beta),c.py,c.pz),t=f.add(c),i=u.add(h)}else{let{p:r,f:n}=this.wNAF(e);t=r,i=n}return d.normalizeZ([t,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=d.BASE,i=(e,t)=>t!==Q&&t!==ee&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){return u(this,e)}isTorsionFree(){let{h:e,isTorsionFree:t}=r;if(e===ee)return!0;if(t)return t(d,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=r;return e===ee?this:t?t(d,this):this.multiplyUnsafe(r.h)}toRawBytes(e=!0){return(0,x.abool)("isCompressed",e),this.assertValidity(),o(d,this,e)}toHex(e=!0){return(0,x.abool)("isCompressed",e),(0,x.bytesToHex)(this.toRawBytes(e))}}d.BASE=new d(r.Gx,r.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);let h=r.nBitLength,p=(t=r.endo?Math.ceil(h/2):h,{constTimeNegate:H,hasPrecomputes:e=>1!==Y(e),unsafeLadder(e,t,r=d.ZERO){let n=e;for(;t>$;)t&q&&(r=r.add(n)),n=n.double(),t>>=q;return r},precomputeWindow(e,r){let{windows:n,windowSize:i}=z(r,t),o=[],a=e,s=a;for(let e=0;e<n;e++){s=a,o.push(s);for(let e=1;e<i;e++)s=s.add(a),o.push(s);a=s.double()}return o},wNAF(e,r,n){let i=d.ZERO,o=d.BASE,a=z(e,t);for(let e=0;e<a.windows;e++){let{nextN:t,offset:s,isZero:l,isNeg:f,isNegF:u,offsetF:c}=V(n,e,a);n=t,l?o=o.add(H(u,r[c])):i=i.add(H(f,r[s]))}return{p:i,f:o}},wNAFUnsafe(e,r,n,i=d.ZERO){let o=z(e,t);for(let e=0;e<o.windows&&n!==$;e++){let{nextN:t,offset:a,isZero:s,isNeg:l}=V(n,e,o);if(n=t,!s){let e=r[a];i=i.add(l?e.negate():e)}}return i},getPrecomputes(e,t,r){let n=Z.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&Z.set(t,r(n))),n},wNAFCached(e,t,r){let n=Y(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){let i=Y(e);return 1===i?this.unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)},setWindowSize(e,r){W(r,t),G.set(e,r),Z.delete(e)}});return{CURVE:r,ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:function(e){return(0,x.inRange)(e,ee,r.n)}}}({...r,toBytes(e,t,r){let i=t.toAffine(),o=n.toBytes(i.x),a=x.concatBytes;return((0,x.abool)("isCompressed",r),r)?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,n.toBytes(i.y))},fromBytes(e){let t=e.length,r=e[0],i=e.subarray(1);if(t===o&&(2===r||3===r)){let e,t=(0,x.bytesToNumberBE)(i);if(!(0,x.inRange)(t,ee,n.ORDER))throw Error("Point is not on curve");let o=u(t);try{e=n.sqrt(o)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&r)==1!=((e&ee)===ee)&&(e=n.neg(e)),{x:t,y:e}}if(t===a&&4===r)return{x:n.fromBytes(i.subarray(0,n.BYTES)),y:n.fromBytes(i.subarray(n.BYTES,2*n.BYTES))};throw Error("invalid Point, expected length of "+o+", or uncompressed "+a+", got "+t)}}),d=e=>(0,x.bytesToHex)((0,x.numberToBytesBE)(e,r.nByteLength)),h=(e,t,r)=>(0,x.bytesToNumberBE)(e.slice(t,r));class p{constructor(e,t,r){(0,x.aInRange)("r",e,ee,i),(0,x.aInRange)("s",t,ee,i),this.r=e,this.s=t,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(e){let t=r.nByteLength;return new p(h(e=(0,x.ensureBytes)("compactSignature",e,2*t),0,t),h(e,t,2*t))}static fromDER(e){let{r:t,s:r}=X.toSig((0,x.ensureBytes)("DER",e));return new p(t,r)}assertValidity(){}addRecoveryBit(e){return new p(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:o,recovery:a}=this,f=b((0,x.ensureBytes)("msgHash",e));if(null==a||![0,1,2,3].includes(a))throw Error("recovery id invalid");let u=2===a||3===a?t+r.n:t;if(u>=n.ORDER)throw Error("recovery id 2 or 3 invalid");let c=(1&a)==0?"02":"03",h=l.fromHex(c+d(u)),p=P(u,i),g=s(-f*p),y=s(o*p),m=l.BASE.multiplyAndAddUnsafe(h,g,y);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>i>>ee}normalizeS(){return this.hasHighS()?new p(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return(0,x.hexToBytes)(this.toDERHex())}toDERHex(){return X.hexFromSig(this)}toCompactRawBytes(){return(0,x.hexToBytes)(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}function g(e){let t=(0,x.isBytes)(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===o||n===a:r?n===2*o||n===2*a:e instanceof l}let y=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=(0,x.bytesToNumberBE)(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},b=r.bits2int_modN||function(e){return s(y(e))},m=(0,x.bitMask)(r.nBitLength);function w(e){return(0,x.aInRange)("num < 2^"+r.nBitLength,e,Q,m),(0,x.numberToBytesBE)(e,r.nByteLength)}let E={lowS:r.lowS,prehash:!1},v={lowS:r.lowS,prehash:!1};return l.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return l.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(g(e))throw Error("first arg must be private key");if(!g(t))throw Error("second arg must be public key");return l.fromHex(t).multiply(f(e)).toRawBytes(r)},sign:function(e,t,o=E){let{seed:a,k2sig:u}=function(e,t,o=E){if(["recovered","canonical"].some(e=>e in o))throw Error("sign() legacy options not supported");let{hash:a,randomBytes:u}=r,{lowS:d,prehash:h,extraEntropy:g}=o;null==d&&(d=!0),e=(0,x.ensureBytes)("msgHash",e),K(o),h&&(e=(0,x.ensureBytes)("prehashed msgHash",a(e)));let m=b(e),v=f(t),_=[w(v),w(m)];if(null!=g&&!1!==g){let e=!0===g?u(n.BYTES):g;_.push((0,x.ensureBytes)("extraEntropy",e))}return{seed:(0,x.concatBytes)(..._),k2sig:function(e){var t;let r=y(e);if(!c(r))return;let n=P(r,i),o=l.BASE.multiply(r).toAffine(),a=s(o.x);if(a===Q)return;let f=s(n*s(m+a*v));if(f===Q)return;let u=2*(o.x!==a)|Number(o.y&ee),h=f;return d&&f>i>>ee&&(h=(t=f)>i>>ee?s(-t):t,u^=1),new p(a,h,u)}}}(e,t,o);return(0,x.createHmacDrbg)(r.hash.outputLen,r.nByteLength,r.hmac)(a,u)},verify:function(e,t,n,o=v){let a,f;t=(0,x.ensureBytes)("msgHash",t),n=(0,x.ensureBytes)("publicKey",n);let{lowS:u,prehash:c,format:d}=o;if(K(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw Error("format must be compact or der");
3let h="string"==typeof e||(0,x.isBytes)(e),g=!h&&!d&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!h&&!g)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(g&&(f=new p(e.r,e.s)),h){try{"compact"!==d&&(f=p.fromDER(e))}catch(e){if(!(e instanceof X.Err))throw e}f||"der"===d||(f=p.fromCompact(e))}a=l.fromHex(n)}catch(e){return!1}if(!f||u&&f.hasHighS())return!1;c&&(t=r.hash(t));let{r:y,s:m}=f,w=b(t),E=P(m,i),_=s(w*E),S=s(y*E),A=l.BASE.multiplyAndAddUnsafe(a,_,S)?.toAffine();return!!A&&s(A.x)===y},ProjectivePoint:l,Signature:p,utils:{isValidPrivateKey(e){try{return f(e),!0}catch(e){return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{let e=F(r.n);return function(e,t,r=!1){let n=e.length,i=D(t),o=F(t);if(n<16||n<o||n>1024)throw Error("expected "+o+"-1024 bytes of input, got "+n);let a=T(r?(0,x.bytesToNumberLE)(e):(0,x.bytesToNumberBE)(e),t-S)+S;return r?(0,x.numberToBytesLE)(a,i):(0,x.numberToBytesBE)(a,i)}(r.randomBytes(e),r.n)},precompute:(e=8,t=l.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...n,...{hash:e,hmac:(t,...r)=>(0,v.hmac)(e,t,(0,E.concatBytes)(...r)),randomBytes:E.randomBytes}}))(i),create:t}),ed=(BigInt(0),{});ec.ProjectivePoint;x.bytesToNumberBE;let eh=(r=[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e))).map(e=>Array.from(e).reverse()),(e,t)=>{let[n,i,o,a]=r.map(t=>t.reduce((t,r)=>eu.add(eu.mul(t,e),r))),[s,l]=C(eu,[i,a],!0);return e=eu.mul(n,s),t=eu.mul(t,eu.mul(o,l)),{x:e,y:t}}),ep=function(e,t){if(j(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw Error("mapToCurveSimpleSWU: invalid opts");let r=function(e,t){let r=e.ORDER,n=Q;for(let e=r-ee;e%et===Q;e/=et)n+=ee;let i=n,o=et<<i-ee-ee,a=o*et,s=(r-ee)/a,l=(s-ee)/et,f=a-ee,u=e.pow(t,s),c=e.pow(t,(s+ee)/et),d=(t,r)=>{let n=u,a=e.pow(r,f),s=e.sqr(a);s=e.mul(s,r);let d=e.mul(t,s);d=e.pow(d,l),d=e.mul(d,a),a=e.mul(d,r),s=e.mul(d,t);let h=e.mul(s,a);d=e.pow(h,o);let p=e.eql(d,e.ONE);a=e.mul(s,c),d=e.mul(h,n),s=e.cmov(a,s,p),h=e.cmov(d,h,p);for(let t=i;t>ee;t--){let r=t-et;r=et<<r-ee;let i=e.pow(h,r),o=e.eql(i,e.ONE);a=e.mul(s,n),n=e.mul(n,n),i=e.mul(h,n),s=e.cmov(a,s,o),h=e.cmov(i,h,o)}return{isValid:p,value:s}};if(e.ORDER%en===er){let r=(e.ORDER-er)/en,n=e.sqrt(e.neg(t));d=(t,i)=>{let o=e.sqr(i),a=e.mul(t,i);o=e.mul(o,a);let s=e.pow(o,r);s=e.mul(s,a);let l=e.mul(s,n),f=e.mul(e.sqr(s),i),u=e.eql(f,t),c=e.cmov(l,s,u);return{isValid:u,value:c}}}return d}(e,t.Z);if(!e.isOdd)throw Error("Fp.isOdd is not implemented!");return n=>{let i,o,a,s,l,f,u,c;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),a=e.add(o,e.ONE),a=e.mul(a,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(a),f=e.sqr(s),l=e.mul(f,t.A),o=e.add(o,l),o=e.mul(o,a),f=e.mul(f,s),l=e.mul(f,t.B),o=e.add(o,l),u=e.mul(i,a);let{isValid:d,value:h}=r(o,f);c=e.mul(i,n),c=e.mul(c,h),u=e.cmov(u,a,d),c=e.cmov(c,h,d);let p=e.isOdd(n)===e.isOdd(c);c=e.cmov(e.neg(c),c,p);let g=C(e,[s],!0)[0];return{x:u=e.mul(u,g),y:c}}}(eu,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:eu.create(BigInt("-11"))});(function(e,t,r){if("function"!=typeof t)throw Error("mapToCurve() must be defined")})(ec.ProjectivePoint,e=>{let{x:t,y:r}=ep(eu.create(e[0]));return eh(t,r)},(eu.ORDER,w.sha256)),e.s(["secp256k1",0,ec],975424)},975768,e=>{"use strict";var t=e.i(247167),r=e.i(467034);e.i(602821);var n=e.i(489065),i=e.i(635457),o=e.i(599460);e.i(589485);var a=e.i(828073),s=e.i(975424),l=e.i(721479),f=e.i(908883);let u={get url(){return`file://${e.P("node_modules/@toruslabs/base-controllers/dist/lib.esm/utils/utils.js")}`}};function c(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}
3function d(e,t,o){let a=(0,n.fromSigned)(t),s=(0,n.fromSigned)(o),l=(0,n.bytesToBigInt)(e),f=c(r.Buffer.from((0,n.toUnsigned)(a)).toString("hex"),64),u=c(r.Buffer.from((0,n.toUnsigned)(s)).toString("hex"),64),d=(0,i.stripHexPrefix)((0,n.bigIntToHex)(l));return(0,n.addHexPrefix)(f.concat(u,d))}function h(e,t,r){let n=s.secp256k1.sign(e,t),i=n.toCompactRawBytes(),o=i.slice(0,32);return{r:o,s:i.slice(32,64),v:void 0===r?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(r)*BigInt(2)}}let p=async(e,t)=>{let o=r.Buffer.from(e,"hex"),a=(0,i.stripHexPrefix)(t),s=h(r.Buffer.from(a,"hex"),o);return d(r.Buffer.from((0,n.bigIntToBytes)(s.v)),r.Buffer.from(s.r),r.Buffer.from(s.s))};e.s(["addressSlicer",0,(e,t=5)=>e?e.length<11?e:"string"!=typeof e?"":`${e.slice(0,t)}...${e.slice(-t)}`:"","concatSig",0,d,"ecsignature",0,h,"formatSmallNumbers",0,(e,t="usd",r=!1)=>{let n=a.default.isBigNumber(e)?e.toNumber():e;if(!Number.isFinite(n))return"";let i="usd"===t.toLowerCase()?parseFloat(Number(n).toFixed(2)):parseFloat(Number(n).toFixed(5));return`${"usd"===t.toLowerCase()||r?"":i>0?"~ ":""}${Number(i)} ${t.toUpperCase()}`},"getCaipChainId",0,e=>{if(e)return e.chainNamespace===f.CHAIN_NAMESPACES.EIP155?`${e.chainNamespace}:${parseInt(e.chainId,16)}`:e.chainNamespace===f.CHAIN_NAMESPACES.SOLANA?`${e.chainNamespace}:${l.SOLANA_CAIP_CHAIN_MAP[e.chainId]}`:`${e.chainNamespace}:${e.chainId}`},"getCustomDeviceInfo",0,function(){var e;if(null!=(e=navigator)&&e.brave)return{browser:"Brave"}},"getEnvVariable",0,e=>{var r,n,i,o;return null!=(r=u.env)&&r[e]?null==(i=u.env)?void 0:i[e]:void 0!==t.default&&null!=(n=t.default.env)&&n[e]?null==(o=t.default.env)?void 0:o[e]:void 0},"getErrorAnalyticsProperties",0,e=>{try{let t=null==e?void 0:e.code;return{error_message:e instanceof Error?e.message:(null==e?void 0:e.message)||(null==e?void 0:e.toString()),error_code:t}}catch{return{error_message:"Unknown error",error_code:void 0}}},"getHeaders",0,(e,t)=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json; charset=utf-8","public-address":t}}),"getHostname",0,e=>{try{return new URL(e).hostname}catch{return""}},"getPopupFeatures",0,function({width:e,height:t}){let r=void 0!==window.screenLeft?window.screenLeft:window.screenX,n=void 0!==window.screenTop?window.screenTop:window.screenY,i=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,o=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,a=Math.abs((i-e)/2/1+r),s=Math.abs((o-t)/2/1+n);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=${t/1},width=${e/1},top=${s},left=${a}`},"hashMessage",0,e=>{let t=r.Buffer.from(e,"utf8"),n=(0,o.hashPersonalMessage)(t);return r.Buffer.from(n)},"isUnauthorizedError",0,e=>e instanceof Response&&401===e.status,"randomId",0,()=>Math.random().toString(36).slice(2),"signMessage",0,p,"significantDigits",0,(e,t=!1,r=2)=>{let n,i=a.default.isBigNumber(e)?e:new a.default(e);if(i.isZero())return i;t&&(i=i.times(new a.default(100))),n=i.gte(new a.default(1))?r:r-1+Math.ceil(Math.log10(new a.default("1").div(i).toNumber()));let o=new a.default(10).pow(new a.default(n));return Math.round(o.times(i).toNumber())/o.toNumber()},"timeout",0,function(e){return new Promise(t=>{let r=window.setTimeout(()=>{t(),window.clearTimeout(r)},e)})},"transactionMatchesNetwork",0,(e,t)=>void 0!==e.chainId&&e.chainId===t])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.