@zama-fhe/relayer-sdk 0.3.0-2 → 0.3.0-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
- (function(Te,Ce){typeof exports=="object"&&typeof module<"u"?Ce(exports):typeof define=="function"&&define.amd?define(["exports"],Ce):(Te=typeof globalThis<"u"?globalThis:Te||self,Ce(Te.relayerSDK={}))})(this,function(Te){"use strict";var Ce=typeof document<"u"?document.currentScript:null;const Wi=globalThis||void 0||self;var E_={},ao={};ao.byteLength=Jg,ao.toByteArray=Yg,ao.fromByteArray=ty;for(var Tn=[],je=[],Kg=typeof Uint8Array<"u"?Uint8Array:Array,ua="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ji=0,Wg=ua.length;Ji<Wg;++Ji)Tn[Ji]=ua[Ji],je[ua.charCodeAt(Ji)]=Ji;je[45]=62,je[95]=63;function v_(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");e===-1&&(e=t);var r=e===t?0:4-e%4;return[e,r]}function Jg(n){var t=v_(n),e=t[0],r=t[1];return(e+r)*3/4-r}function $g(n,t,e){return(t+e)*3/4-e}function Yg(n){var t,e=v_(n),r=e[0],i=e[1],o=new Kg($g(n,r,i)),a=0,u=i>0?r-4:r,_;for(_=0;_<u;_+=4)t=je[n.charCodeAt(_)]<<18|je[n.charCodeAt(_+1)]<<12|je[n.charCodeAt(_+2)]<<6|je[n.charCodeAt(_+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=je[n.charCodeAt(_)]<<2|je[n.charCodeAt(_+1)]>>4,o[a++]=t&255),i===1&&(t=je[n.charCodeAt(_)]<<10|je[n.charCodeAt(_+1)]<<4|je[n.charCodeAt(_+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function Zg(n){return Tn[n>>18&63]+Tn[n>>12&63]+Tn[n>>6&63]+Tn[n&63]}function Xg(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),i.push(Zg(r));return i.join("")}function ty(n){for(var t,e=n.length,r=e%3,i=[],o=16383,a=0,u=e-r;a<u;a+=o)i.push(Xg(n,a,a+o>u?u:a+o));return r===1?(t=n[e-1],i.push(Tn[t>>2]+Tn[t<<4&63]+"==")):r===2&&(t=(n[e-2]<<8)+n[e-1],i.push(Tn[t>>10]+Tn[t>>4&63]+Tn[t<<2&63]+"=")),i.join("")}var _a={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_a.read=function(n,t,e,r,i){var o,a,u=i*8-r-1,_=(1<<u)-1,l=_>>1,f=-7,g=e?i-1:0,y=e?-1:1,v=n[t+g];for(g+=y,o=v&(1<<-f)-1,v>>=-f,f+=u;f>0;o=o*256+n[t+g],g+=y,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=a*256+n[t+g],g+=y,f-=8);if(o===0)o=1-l;else{if(o===_)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(v?-1:1)*a*Math.pow(2,o-r)},_a.write=function(n,t,e,r,i,o){var a,u,_,l=o*8-i-1,f=(1<<l)-1,g=f>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,F=r?1:-1,k=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(_=Math.pow(2,-a))<1&&(a--,_*=2),a+g>=1?t+=y/_:t+=y*Math.pow(2,1-g),t*_>=2&&(a++,_/=2),a+g>=f?(u=0,a=f):a+g>=1?(u=(t*_-1)*Math.pow(2,i),a=a+g):(u=t*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;n[e+v]=u&255,v+=F,u/=256,i-=8);for(a=a<<i|u,l+=i;l>0;n[e+v]=a&255,v+=F,a/=256,l-=8);n[e+v-F]|=k*128};/*!
1
+ (function(Te,Ce){typeof exports=="object"&&typeof module<"u"?Ce(exports):typeof define=="function"&&define.amd?define(["exports"],Ce):(Te=typeof globalThis<"u"?globalThis:Te||self,Ce(Te.relayerSDK={}))})(this,function(Te){"use strict";var Ce=typeof document<"u"?document.currentScript:null;const Ji=globalThis||void 0||self;var x_={},ao={};ao.byteLength=Xg,ao.toByteArray=ey,ao.fromByteArray=iy;for(var Cn=[],je=[],Yg=typeof Uint8Array<"u"?Uint8Array:Array,ua="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$i=0,Zg=ua.length;$i<Zg;++$i)Cn[$i]=ua[$i],je[ua.charCodeAt($i)]=$i;je[45]=62,je[95]=63;function R_(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");e===-1&&(e=t);var r=e===t?0:4-e%4;return[e,r]}function Xg(n){var t=R_(n),e=t[0],r=t[1];return(e+r)*3/4-r}function ty(n,t,e){return(t+e)*3/4-e}function ey(n){var t,e=R_(n),r=e[0],i=e[1],o=new Yg(ty(n,r,i)),a=0,u=i>0?r-4:r,_;for(_=0;_<u;_+=4)t=je[n.charCodeAt(_)]<<18|je[n.charCodeAt(_+1)]<<12|je[n.charCodeAt(_+2)]<<6|je[n.charCodeAt(_+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=je[n.charCodeAt(_)]<<2|je[n.charCodeAt(_+1)]>>4,o[a++]=t&255),i===1&&(t=je[n.charCodeAt(_)]<<10|je[n.charCodeAt(_+1)]<<4|je[n.charCodeAt(_+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function ry(n){return Cn[n>>18&63]+Cn[n>>12&63]+Cn[n>>6&63]+Cn[n&63]}function ny(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),i.push(ry(r));return i.join("")}function iy(n){for(var t,e=n.length,r=e%3,i=[],o=16383,a=0,u=e-r;a<u;a+=o)i.push(ny(n,a,a+o>u?u:a+o));return r===1?(t=n[e-1],i.push(Cn[t>>2]+Cn[t<<4&63]+"==")):r===2&&(t=(n[e-2]<<8)+n[e-1],i.push(Cn[t>>10]+Cn[t>>4&63]+Cn[t<<2&63]+"=")),i.join("")}var _a={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_a.read=function(n,t,e,r,i){var o,a,u=i*8-r-1,_=(1<<u)-1,l=_>>1,f=-7,g=e?i-1:0,y=e?-1:1,v=n[t+g];for(g+=y,o=v&(1<<-f)-1,v>>=-f,f+=u;f>0;o=o*256+n[t+g],g+=y,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=a*256+n[t+g],g+=y,f-=8);if(o===0)o=1-l;else{if(o===_)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(v?-1:1)*a*Math.pow(2,o-r)},_a.write=function(n,t,e,r,i,o){var a,u,_,l=o*8-i-1,f=(1<<l)-1,g=f>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,I=r?1:-1,k=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(_=Math.pow(2,-a))<1&&(a--,_*=2),a+g>=1?t+=y/_:t+=y*Math.pow(2,1-g),t*_>=2&&(a++,_/=2),a+g>=f?(u=0,a=f):a+g>=1?(u=(t*_-1)*Math.pow(2,i),a=a+g):(u=t*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;n[e+v]=u&255,v+=I,u/=256,i-=8);for(a=a<<i|u,l+=i;l>0;n[e+v]=a&255,v+=I,a/=256,l-=8);n[e+v-I]|=k*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
5
5
  * @license MIT
6
- */(function(n){const t=ao,e=_a,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=f,n.SlowBuffer=O,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:u}=globalThis;f.TYPED_ARRAY_SUPPORT=_(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function _(){try{const b=new o(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,o.prototype),Object.setPrototypeOf(b,h),b.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function l(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const h=new o(b);return Object.setPrototypeOf(h,f.prototype),h}function f(b,h,d){if(typeof b=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(b)}return g(b,h,d)}f.poolSize=8192;function g(b,h,d){if(typeof b=="string")return k(b,h);if(a.isView(b))return E(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(le(b,a)||b&&le(b.buffer,a)||typeof u<"u"&&(le(b,u)||b&&le(b.buffer,u)))return R(b,h,d);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const P=b.valueOf&&b.valueOf();if(P!=null&&P!==b)return f.from(P,h,d);const U=B(b);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return f.from(b[Symbol.toPrimitive]("string"),h,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}f.from=function(b,h,d){return g(b,h,d)},Object.setPrototypeOf(f.prototype,o.prototype),Object.setPrototypeOf(f,o);function y(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function v(b,h,d){return y(b),b<=0?l(b):h!==void 0?typeof d=="string"?l(b).fill(h,d):l(b).fill(h):l(b)}f.alloc=function(b,h,d){return v(b,h,d)};function F(b){return y(b),l(b<0?0:z(b)|0)}f.allocUnsafe=function(b){return F(b)},f.allocUnsafeSlow=function(b){return F(b)};function k(b,h){if((typeof h!="string"||h==="")&&(h="utf8"),!f.isEncoding(h))throw new TypeError("Unknown encoding: "+h);const d=C(b,h)|0;let P=l(d);const U=P.write(b,h);return U!==d&&(P=P.slice(0,U)),P}function T(b){const h=b.length<0?0:z(b.length)|0,d=l(h);for(let P=0;P<h;P+=1)d[P]=b[P]&255;return d}function E(b){if(le(b,o)){const h=new o(b);return R(h.buffer,h.byteOffset,h.byteLength)}return T(b)}function R(b,h,d){if(h<0||b.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<h+(d||0))throw new RangeError('"length" is outside of buffer bounds');let P;return h===void 0&&d===void 0?P=new o(b):d===void 0?P=new o(b,h):P=new o(b,h,d),Object.setPrototypeOf(P,f.prototype),P}function B(b){if(f.isBuffer(b)){const h=z(b.length)|0,d=l(h);return d.length===0||b.copy(d,0,0,h),d}if(b.length!==void 0)return typeof b.length!="number"||ze(b.length)?l(0):T(b);if(b.type==="Buffer"&&Array.isArray(b.data))return T(b.data)}function z(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function O(b){return+b!=b&&(b=0),f.alloc(+b)}f.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==f.prototype},f.compare=function(h,d){if(le(h,o)&&(h=f.from(h,h.offset,h.byteLength)),le(d,o)&&(d=f.from(d,d.offset,d.byteLength)),!f.isBuffer(h)||!f.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===d)return 0;let P=h.length,U=d.length;for(let $=0,st=Math.min(P,U);$<st;++$)if(h[$]!==d[$]){P=h[$],U=d[$];break}return P<U?-1:U<P?1:0},f.isEncoding=function(h){switch(String(h).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}},f.concat=function(h,d){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return f.alloc(0);let P;if(d===void 0)for(d=0,P=0;P<h.length;++P)d+=h[P].length;const U=f.allocUnsafe(d);let $=0;for(P=0;P<h.length;++P){let st=h[P];if(le(st,o))$+st.length>U.length?(f.isBuffer(st)||(st=f.from(st)),st.copy(U,$)):o.prototype.set.call(U,st,$);else if(f.isBuffer(st))st.copy(U,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=st.length}return U};function C(b,h){if(f.isBuffer(b))return b.length;if(a.isView(b)||le(b,a))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const d=b.length,P=arguments.length>2&&arguments[2]===!0;if(!P&&d===0)return 0;let U=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return de(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Qt(b).length;default:if(U)return P?-1:de(b).length;h=(""+h).toLowerCase(),U=!0}}f.byteLength=C;function N(b,h,d){let P=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,h>>>=0,d<=h))return"";for(b||(b="utf8");;)switch(b){case"hex":return W(this,h,d);case"utf8":case"utf-8":return mt(this,h,d);case"ascii":return kt(this,h,d);case"latin1":case"binary":return jt(this,h,d);case"base64":return ht(this,h,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,h,d);default:if(P)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),P=!0}}f.prototype._isBuffer=!0;function L(b,h,d){const P=b[h];b[h]=b[d],b[d]=P}f.prototype.swap16=function(){const h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<h;d+=2)L(this,d,d+1);return this},f.prototype.swap32=function(){const h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<h;d+=4)L(this,d,d+3),L(this,d+1,d+2);return this},f.prototype.swap64=function(){const h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<h;d+=8)L(this,d,d+7),L(this,d+1,d+6),L(this,d+2,d+5),L(this,d+3,d+4);return this},f.prototype.toString=function(){const h=this.length;return h===0?"":arguments.length===0?mt(this,0,h):N.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(h){if(!f.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:f.compare(this,h)===0},f.prototype.inspect=function(){let h="";const d=n.INSPECT_MAX_BYTES;return h=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(h+=" ... "),"<Buffer "+h+">"},r&&(f.prototype[r]=f.prototype.inspect),f.prototype.compare=function(h,d,P,U,$){if(le(h,o)&&(h=f.from(h,h.offset,h.byteLength)),!f.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(d===void 0&&(d=0),P===void 0&&(P=h?h.length:0),U===void 0&&(U=0),$===void 0&&($=this.length),d<0||P>h.length||U<0||$>this.length)throw new RangeError("out of range index");if(U>=$&&d>=P)return 0;if(U>=$)return-1;if(d>=P)return 1;if(d>>>=0,P>>>=0,U>>>=0,$>>>=0,this===h)return 0;let st=$-U,Pt=P-d;const Vt=Math.min(st,Pt),qt=this.slice(U,$),Wt=h.slice(d,P);for(let Dt=0;Dt<Vt;++Dt)if(qt[Dt]!==Wt[Dt]){st=qt[Dt],Pt=Wt[Dt];break}return st<Pt?-1:Pt<st?1:0};function J(b,h,d,P,U){if(b.length===0)return-1;if(typeof d=="string"?(P=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,ze(d)&&(d=U?0:b.length-1),d<0&&(d=b.length+d),d>=b.length){if(U)return-1;d=b.length-1}else if(d<0)if(U)d=0;else return-1;if(typeof h=="string"&&(h=f.from(h,P)),f.isBuffer(h))return h.length===0?-1:nt(b,h,d,P,U);if(typeof h=="number")return h=h&255,typeof o.prototype.indexOf=="function"?U?o.prototype.indexOf.call(b,h,d):o.prototype.lastIndexOf.call(b,h,d):nt(b,[h],d,P,U);throw new TypeError("val must be string, number or Buffer")}function nt(b,h,d,P,U){let $=1,st=b.length,Pt=h.length;if(P!==void 0&&(P=String(P).toLowerCase(),P==="ucs2"||P==="ucs-2"||P==="utf16le"||P==="utf-16le")){if(b.length<2||h.length<2)return-1;$=2,st/=2,Pt/=2,d/=2}function Vt(Wt,Dt){return $===1?Wt[Dt]:Wt.readUInt16BE(Dt*$)}let qt;if(U){let Wt=-1;for(qt=d;qt<st;qt++)if(Vt(b,qt)===Vt(h,Wt===-1?0:qt-Wt)){if(Wt===-1&&(Wt=qt),qt-Wt+1===Pt)return Wt*$}else Wt!==-1&&(qt-=qt-Wt),Wt=-1}else for(d+Pt>st&&(d=st-Pt),qt=d;qt>=0;qt--){let Wt=!0;for(let Dt=0;Dt<Pt;Dt++)if(Vt(b,qt+Dt)!==Vt(h,Dt)){Wt=!1;break}if(Wt)return qt}return-1}f.prototype.includes=function(h,d,P){return this.indexOf(h,d,P)!==-1},f.prototype.indexOf=function(h,d,P){return J(this,h,d,P,!0)},f.prototype.lastIndexOf=function(h,d,P){return J(this,h,d,P,!1)};function dt(b,h,d,P){d=Number(d)||0;const U=b.length-d;P?(P=Number(P),P>U&&(P=U)):P=U;const $=h.length;P>$/2&&(P=$/2);let st;for(st=0;st<P;++st){const Pt=parseInt(h.substr(st*2,2),16);if(ze(Pt))return st;b[d+st]=Pt}return st}function D(b,h,d,P){return ge(de(h,b.length-d),b,d,P)}function vt(b,h,d,P){return ge(we(h),b,d,P)}function wt(b,h,d,P){return ge(Qt(h),b,d,P)}function at(b,h,d,P){return ge(Gt(h,b.length-d),b,d,P)}f.prototype.write=function(h,d,P,U){if(d===void 0)U="utf8",P=this.length,d=0;else if(P===void 0&&typeof d=="string")U=d,P=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(P)?(P=P>>>0,U===void 0&&(U="utf8")):(U=P,P=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $=this.length-d;if((P===void 0||P>$)&&(P=$),h.length>0&&(P<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");let st=!1;for(;;)switch(U){case"hex":return dt(this,h,d,P);case"utf8":case"utf-8":return D(this,h,d,P);case"ascii":case"latin1":case"binary":return vt(this,h,d,P);case"base64":return wt(this,h,d,P);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,h,d,P);default:if(st)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),st=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ht(b,h,d){return h===0&&d===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(h,d))}function mt(b,h,d){d=Math.min(b.length,d);const P=[];let U=h;for(;U<d;){const $=b[U];let st=null,Pt=$>239?4:$>223?3:$>191?2:1;if(U+Pt<=d){let Vt,qt,Wt,Dt;switch(Pt){case 1:$<128&&(st=$);break;case 2:Vt=b[U+1],(Vt&192)===128&&(Dt=($&31)<<6|Vt&63,Dt>127&&(st=Dt));break;case 3:Vt=b[U+1],qt=b[U+2],(Vt&192)===128&&(qt&192)===128&&(Dt=($&15)<<12|(Vt&63)<<6|qt&63,Dt>2047&&(Dt<55296||Dt>57343)&&(st=Dt));break;case 4:Vt=b[U+1],qt=b[U+2],Wt=b[U+3],(Vt&192)===128&&(qt&192)===128&&(Wt&192)===128&&(Dt=($&15)<<18|(Vt&63)<<12|(qt&63)<<6|Wt&63,Dt>65535&&Dt<1114112&&(st=Dt))}}st===null?(st=65533,Pt=1):st>65535&&(st-=65536,P.push(st>>>10&1023|55296),st=56320|st&1023),P.push(st),U+=Pt}return xt(P)}const Rt=4096;function xt(b){const h=b.length;if(h<=Rt)return String.fromCharCode.apply(String,b);let d="",P=0;for(;P<h;)d+=String.fromCharCode.apply(String,b.slice(P,P+=Rt));return d}function kt(b,h,d){let P="";d=Math.min(b.length,d);for(let U=h;U<d;++U)P+=String.fromCharCode(b[U]&127);return P}function jt(b,h,d){let P="";d=Math.min(b.length,d);for(let U=h;U<d;++U)P+=String.fromCharCode(b[U]);return P}function W(b,h,d){const P=b.length;(!h||h<0)&&(h=0),(!d||d<0||d>P)&&(d=P);let U="";for(let $=h;$<d;++$)U+=Ie[b[$]];return U}function Z(b,h,d){const P=b.slice(h,d);let U="";for(let $=0;$<P.length-1;$+=2)U+=String.fromCharCode(P[$]+P[$+1]*256);return U}f.prototype.slice=function(h,d){const P=this.length;h=~~h,d=d===void 0?P:~~d,h<0?(h+=P,h<0&&(h=0)):h>P&&(h=P),d<0?(d+=P,d<0&&(d=0)):d>P&&(d=P),d<h&&(d=h);const U=this.subarray(h,d);return Object.setPrototypeOf(U,f.prototype),U};function rt(b,h,d){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+h>d)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(h,d,P){h=h>>>0,d=d>>>0,P||rt(h,d,this.length);let U=this[h],$=1,st=0;for(;++st<d&&($*=256);)U+=this[h+st]*$;return U},f.prototype.readUintBE=f.prototype.readUIntBE=function(h,d,P){h=h>>>0,d=d>>>0,P||rt(h,d,this.length);let U=this[h+--d],$=1;for(;d>0&&($*=256);)U+=this[h+--d]*$;return U},f.prototype.readUint8=f.prototype.readUInt8=function(h,d){return h=h>>>0,d||rt(h,1,this.length),this[h]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(h,d){return h=h>>>0,d||rt(h,2,this.length),this[h]|this[h+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(h,d){return h=h>>>0,d||rt(h,2,this.length),this[h]<<8|this[h+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(h,d){return h=h>>>0,d||rt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(h,d){return h=h>>>0,d||rt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},f.prototype.readBigUInt64LE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&Bt(h,this.length-8);const U=d+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,$=this[++h]+this[++h]*2**8+this[++h]*2**16+P*2**24;return BigInt(U)+(BigInt($)<<BigInt(32))}),f.prototype.readBigUInt64BE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&Bt(h,this.length-8);const U=d*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],$=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+P;return(BigInt(U)<<BigInt(32))+BigInt($)}),f.prototype.readIntLE=function(h,d,P){h=h>>>0,d=d>>>0,P||rt(h,d,this.length);let U=this[h],$=1,st=0;for(;++st<d&&($*=256);)U+=this[h+st]*$;return $*=128,U>=$&&(U-=Math.pow(2,8*d)),U},f.prototype.readIntBE=function(h,d,P){h=h>>>0,d=d>>>0,P||rt(h,d,this.length);let U=d,$=1,st=this[h+--U];for(;U>0&&($*=256);)st+=this[h+--U]*$;return $*=128,st>=$&&(st-=Math.pow(2,8*d)),st},f.prototype.readInt8=function(h,d){return h=h>>>0,d||rt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},f.prototype.readInt16LE=function(h,d){h=h>>>0,d||rt(h,2,this.length);const P=this[h]|this[h+1]<<8;return P&32768?P|4294901760:P},f.prototype.readInt16BE=function(h,d){h=h>>>0,d||rt(h,2,this.length);const P=this[h+1]|this[h]<<8;return P&32768?P|4294901760:P},f.prototype.readInt32LE=function(h,d){return h=h>>>0,d||rt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},f.prototype.readInt32BE=function(h,d){return h=h>>>0,d||rt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},f.prototype.readBigInt64LE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&Bt(h,this.length-8);const U=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(P<<24);return(BigInt(U)<<BigInt(32))+BigInt(d+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),f.prototype.readBigInt64BE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&Bt(h,this.length-8);const U=(d<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(U)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+P)}),f.prototype.readFloatLE=function(h,d){return h=h>>>0,d||rt(h,4,this.length),e.read(this,h,!0,23,4)},f.prototype.readFloatBE=function(h,d){return h=h>>>0,d||rt(h,4,this.length),e.read(this,h,!1,23,4)},f.prototype.readDoubleLE=function(h,d){return h=h>>>0,d||rt(h,8,this.length),e.read(this,h,!0,52,8)},f.prototype.readDoubleBE=function(h,d){return h=h>>>0,d||rt(h,8,this.length),e.read(this,h,!1,52,8)};function gt(b,h,d,P,U,$){if(!f.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>U||h<$)throw new RangeError('"value" argument is out of bounds');if(d+P>b.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(h,d,P,U){if(h=+h,d=d>>>0,P=P>>>0,!U){const Pt=Math.pow(2,8*P)-1;gt(this,h,d,P,Pt,0)}let $=1,st=0;for(this[d]=h&255;++st<P&&($*=256);)this[d+st]=h/$&255;return d+P},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(h,d,P,U){if(h=+h,d=d>>>0,P=P>>>0,!U){const Pt=Math.pow(2,8*P)-1;gt(this,h,d,P,Pt,0)}let $=P-1,st=1;for(this[d+$]=h&255;--$>=0&&(st*=256);)this[d+$]=h/st&255;return d+P},f.prototype.writeUint8=f.prototype.writeUInt8=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,1,255,0),this[d]=h&255,d+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,2,65535,0),this[d]=h&255,this[d+1]=h>>>8,d+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,2,65535,0),this[d]=h>>>8,this[d+1]=h&255,d+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,4,4294967295,0),this[d+3]=h>>>24,this[d+2]=h>>>16,this[d+1]=h>>>8,this[d]=h&255,d+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,4,4294967295,0),this[d]=h>>>24,this[d+1]=h>>>16,this[d+2]=h>>>8,this[d+3]=h&255,d+4};function G(b,h,d,P,U){zt(h,P,U,b,d,7);let $=Number(h&BigInt(4294967295));b[d++]=$,$=$>>8,b[d++]=$,$=$>>8,b[d++]=$,$=$>>8,b[d++]=$;let st=Number(h>>BigInt(32)&BigInt(4294967295));return b[d++]=st,st=st>>8,b[d++]=st,st=st>>8,b[d++]=st,st=st>>8,b[d++]=st,d}function M(b,h,d,P,U){zt(h,P,U,b,d,7);let $=Number(h&BigInt(4294967295));b[d+7]=$,$=$>>8,b[d+6]=$,$=$>>8,b[d+5]=$,$=$>>8,b[d+4]=$;let st=Number(h>>BigInt(32)&BigInt(4294967295));return b[d+3]=st,st=st>>8,b[d+2]=st,st=st>>8,b[d+1]=st,st=st>>8,b[d]=st,d+8}f.prototype.writeBigUInt64LE=_e(function(h,d=0){return G(this,h,d,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=_e(function(h,d=0){return M(this,h,d,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(h,d,P,U){if(h=+h,d=d>>>0,!U){const Vt=Math.pow(2,8*P-1);gt(this,h,d,P,Vt-1,-Vt)}let $=0,st=1,Pt=0;for(this[d]=h&255;++$<P&&(st*=256);)h<0&&Pt===0&&this[d+$-1]!==0&&(Pt=1),this[d+$]=(h/st>>0)-Pt&255;return d+P},f.prototype.writeIntBE=function(h,d,P,U){if(h=+h,d=d>>>0,!U){const Vt=Math.pow(2,8*P-1);gt(this,h,d,P,Vt-1,-Vt)}let $=P-1,st=1,Pt=0;for(this[d+$]=h&255;--$>=0&&(st*=256);)h<0&&Pt===0&&this[d+$+1]!==0&&(Pt=1),this[d+$]=(h/st>>0)-Pt&255;return d+P},f.prototype.writeInt8=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,1,127,-128),h<0&&(h=255+h+1),this[d]=h&255,d+1},f.prototype.writeInt16LE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,2,32767,-32768),this[d]=h&255,this[d+1]=h>>>8,d+2},f.prototype.writeInt16BE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,2,32767,-32768),this[d]=h>>>8,this[d+1]=h&255,d+2},f.prototype.writeInt32LE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,4,2147483647,-2147483648),this[d]=h&255,this[d+1]=h>>>8,this[d+2]=h>>>16,this[d+3]=h>>>24,d+4},f.prototype.writeInt32BE=function(h,d,P){return h=+h,d=d>>>0,P||gt(this,h,d,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[d]=h>>>24,this[d+1]=h>>>16,this[d+2]=h>>>8,this[d+3]=h&255,d+4},f.prototype.writeBigInt64LE=_e(function(h,d=0){return G(this,h,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=_e(function(h,d=0){return M(this,h,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function X(b,h,d,P,U,$){if(d+P>b.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function ct(b,h,d,P,U){return h=+h,d=d>>>0,U||X(b,h,d,4),e.write(b,h,d,P,23,4),d+4}f.prototype.writeFloatLE=function(h,d,P){return ct(this,h,d,!0,P)},f.prototype.writeFloatBE=function(h,d,P){return ct(this,h,d,!1,P)};function _t(b,h,d,P,U){return h=+h,d=d>>>0,U||X(b,h,d,8),e.write(b,h,d,P,52,8),d+8}f.prototype.writeDoubleLE=function(h,d,P){return _t(this,h,d,!0,P)},f.prototype.writeDoubleBE=function(h,d,P){return _t(this,h,d,!1,P)},f.prototype.copy=function(h,d,P,U){if(!f.isBuffer(h))throw new TypeError("argument should be a Buffer");if(P||(P=0),!U&&U!==0&&(U=this.length),d>=h.length&&(d=h.length),d||(d=0),U>0&&U<P&&(U=P),U===P||h.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(P<0||P>=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),h.length-d<U-P&&(U=h.length-d+P);const $=U-P;return this===h&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,P,U):o.prototype.set.call(h,this.subarray(P,U),d),$},f.prototype.fill=function(h,d,P,U){if(typeof h=="string"){if(typeof d=="string"?(U=d,d=0,P=this.length):typeof P=="string"&&(U=P,P=this.length),U!==void 0&&typeof U!="string")throw new TypeError("encoding must be a string");if(typeof U=="string"&&!f.isEncoding(U))throw new TypeError("Unknown encoding: "+U);if(h.length===1){const st=h.charCodeAt(0);(U==="utf8"&&st<128||U==="latin1")&&(h=st)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(d<0||this.length<d||this.length<P)throw new RangeError("Out of range index");if(P<=d)return this;d=d>>>0,P=P===void 0?this.length:P>>>0,h||(h=0);let $;if(typeof h=="number")for($=d;$<P;++$)this[$]=h;else{const st=f.isBuffer(h)?h:f.from(h,U),Pt=st.length;if(Pt===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for($=0;$<P-d;++$)this[$+d]=st[$%Pt]}return this};const x={};function S(b,h,d){x[b]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(U){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:U,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}S("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),S("ERR_INVALID_ARG_TYPE",function(b,h){return`The "${b}" argument must be of type number. Received type ${typeof h}`},TypeError),S("ERR_OUT_OF_RANGE",function(b,h,d){let P=`The value of "${b}" is out of range.`,U=d;return Number.isInteger(d)&&Math.abs(d)>2**32?U=et(String(d)):typeof d=="bigint"&&(U=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(U=et(U)),U+="n"),P+=` It must be ${h}. Received ${U}`,P},RangeError);function et(b){let h="",d=b.length;const P=b[0]==="-"?1:0;for(;d>=P+4;d-=3)h=`_${b.slice(d-3,d)}${h}`;return`${b.slice(0,d)}${h}`}function ft(b,h,d){bt(h,"offset"),(b[h]===void 0||b[h+d]===void 0)&&Bt(h,b.length-(d+1))}function zt(b,h,d,P,U,$){if(b>d||b<h){const st=typeof h=="bigint"?"n":"";let Pt;throw h===0||h===BigInt(0)?Pt=`>= 0${st} and < 2${st} ** ${($+1)*8}${st}`:Pt=`>= -(2${st} ** ${($+1)*8-1}${st}) and < 2 ** ${($+1)*8-1}${st}`,new x.ERR_OUT_OF_RANGE("value",Pt,b)}ft(P,U,$)}function bt(b,h){if(typeof b!="number")throw new x.ERR_INVALID_ARG_TYPE(h,"number",b)}function Bt(b,h,d){throw Math.floor(b)!==b?(bt(b,d),new x.ERR_OUT_OF_RANGE("offset","an integer",b)):h<0?new x.ERR_BUFFER_OUT_OF_BOUNDS:new x.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,b)}const pe=/[^+/0-9A-Za-z-_]/g;function it(b){if(b=b.split("=")[0],b=b.trim().replace(pe,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function de(b,h){h=h||1/0;let d;const P=b.length;let U=null;const $=[];for(let st=0;st<P;++st){if(d=b.charCodeAt(st),d>55295&&d<57344){if(!U){if(d>56319){(h-=3)>-1&&$.push(239,191,189);continue}else if(st+1===P){(h-=3)>-1&&$.push(239,191,189);continue}U=d;continue}if(d<56320){(h-=3)>-1&&$.push(239,191,189),U=d;continue}d=(U-55296<<10|d-56320)+65536}else U&&(h-=3)>-1&&$.push(239,191,189);if(U=null,d<128){if((h-=1)<0)break;$.push(d)}else if(d<2048){if((h-=2)<0)break;$.push(d>>6|192,d&63|128)}else if(d<65536){if((h-=3)<0)break;$.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((h-=4)<0)break;$.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return $}function we(b){const h=[];for(let d=0;d<b.length;++d)h.push(b.charCodeAt(d)&255);return h}function Gt(b,h){let d,P,U;const $=[];for(let st=0;st<b.length&&!((h-=2)<0);++st)d=b.charCodeAt(st),P=d>>8,U=d%256,$.push(U),$.push(P);return $}function Qt(b){return t.toByteArray(it(b))}function ge(b,h,d,P){let U;for(U=0;U<P&&!(U+d>=h.length||U>=b.length);++U)h[U+d]=b[U];return U}function le(b,h){return b instanceof h||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===h.name}function ze(b){return b!==b}const Ie=function(){const b="0123456789abcdef",h=new Array(256);for(let d=0;d<16;++d){const P=d*16;for(let U=0;U<16;++U)h[P+U]=b[d]+b[U]}return h}();function _e(b){return typeof BigInt>"u"?$e:b}function $e(){throw new Error("BigInt not supported")}})(E_);const Ne=E_.Buffer,ey="6.15.0";function ry(n,t,e){const r=t.split("|").map(o=>o.trim());for(let o=0;o<r.length;o++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof n===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${e}`,i.value=n,i}async function Ee(n){const t=Object.keys(n);return(await Promise.all(t.map(r=>Promise.resolve(n[r])))).reduce((r,i,o)=>(r[t[o]]=i,r),{})}function St(n,t,e){for(let r in t){let i=t[r];const o=e?e[r]:null;o&&ry(i,o,r),Object.defineProperty(n,r,{enumerable:!0,value:i,writable:!1})}}function $i(n,t){if(n==null)return"null";if(t==null&&(t=new Set),typeof n=="object"){if(t.has(n))return"[Circular]";t.add(n)}if(Array.isArray(n))return"[ "+n.map(e=>$i(e,t)).join(", ")+" ]";if(n instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let i=0;i<n.length;i++)r+=e[n[i]>>4],r+=e[n[i]&15];return r}if(typeof n=="object"&&typeof n.toJSON=="function")return $i(n.toJSON(),t);switch(typeof n){case"boolean":case"number":case"symbol":return n.toString();case"bigint":return BigInt(n).toString();case"string":return JSON.stringify(n);case"object":{const e=Object.keys(n);return e.sort(),"{ "+e.map(r=>`${$i(r,t)}: ${$i(n[r],t)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function me(n,t){return n&&n.code===t}function fa(n){return me(n,"CALL_EXCEPTION")}function ee(n,t,e){let r=n;{const o=[];if(e){if("message"in e||"code"in e||"name"in e)throw new Error(`value will overwrite populated values: ${$i(e)}`);for(const a in e){if(a==="shortMessage")continue;const u=e[a];o.push(a+"="+$i(u))}}o.push(`code=${t}`),o.push(`version=${ey}`),o.length&&(n+=" ("+o.join(", ")+")")}let i;switch(t){case"INVALID_ARGUMENT":i=new TypeError(n);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(n);break;default:i=new Error(n)}return St(i,{code:t}),e&&Object.assign(i,e),i.shortMessage==null&&St(i,{shortMessage:r}),i}function ut(n,t,e,r){if(!n)throw ee(t,e,r)}function V(n,t,e,r){ut(n,t,"INVALID_ARGUMENT",{argument:e,value:r})}function x_(n,t,e){e==null&&(e=""),e&&(e=": "+e),ut(n>=t,"missing argument"+e,"MISSING_ARGUMENT",{count:n,expectedCount:t}),ut(n<=t,"too many arguments"+e,"UNEXPECTED_ARGUMENT",{count:n,expectedCount:t})}["NFD","NFC","NFKD","NFKC"].reduce((n,t)=>{try{if("test".normalize(t)!=="test")throw new Error("bad");if(t==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");n.push(t)}catch{}return n},[]);function co(n,t,e){if(e==null&&(e=""),n!==t){let r=e,i="new";e&&(r+=".",i+=" "+e),ut(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function R_(n,t,e){if(n instanceof Uint8Array)return e?new Uint8Array(n):n;if(typeof n=="string"&&n.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((n.length-2)/2);let i=2;for(let o=0;o<r.length;o++)r[o]=parseInt(n.substring(i,i+2),16),i+=2;return r}V(!1,"invalid BytesLike value",t||"value",n)}function Ot(n,t){return R_(n,t,!1)}function ve(n,t){return R_(n,t,!0)}function $t(n,t){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||typeof t=="number"&&n.length!==2+2*t||t===!0&&n.length%2!==0)}function la(n){return $t(n,!0)||n instanceof Uint8Array}const S_="0123456789abcdef";function yt(n){const t=Ot(n);let e="0x";for(let r=0;r<t.length;r++){const i=t[r];e+=S_[(i&240)>>4]+S_[i&15]}return e}function ne(n){return"0x"+n.map(t=>yt(t).substring(2)).join("")}function Yi(n){return $t(n,!0)?(n.length-2)/2:Ot(n).length}function ie(n,t,e){const r=Ot(n);return e!=null&&e>r.length&&ut(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:e}),yt(r.slice(t??0,e??r.length))}function z_(n,t,e){const r=Ot(n);ut(t>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:t,offset:t+1});const i=new Uint8Array(t);return i.fill(0),e?i.set(r,t-r.length):i.set(r,0),yt(i)}function qn(n,t){return z_(n,t,!0)}function ny(n,t){return z_(n,t,!1)}const uo=BigInt(0),Ze=BigInt(1),Zi=9007199254740991;function iy(n,t){const e=_o(n,"value"),r=BigInt(Tt(t,"width"));if(ut(e>>r===uo,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:n}),e>>r-Ze){const i=(Ze<<r)-Ze;return-((~e&i)+Ze)}return e}function B_(n,t){let e=Et(n,"value");const r=BigInt(Tt(t,"width")),i=Ze<<r-Ze;if(e<uo){e=-e,ut(e<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});const o=(Ze<<r)-Ze;return(~e&o)+Ze}else ut(e<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});return e}function Ss(n,t){const e=_o(n,"value"),r=BigInt(Tt(t,"bits"));return e&(Ze<<r)-Ze}function Et(n,t){switch(typeof n){case"bigint":return n;case"number":return V(Number.isInteger(n),"underflow",t||"value",n),V(n>=-Zi&&n<=Zi,"overflow",t||"value",n),BigInt(n);case"string":try{if(n==="")throw new Error("empty string");return n[0]==="-"&&n[1]!=="-"?-BigInt(n.substring(1)):BigInt(n)}catch(e){V(!1,`invalid BigNumberish string: ${e.message}`,t||"value",n)}}V(!1,"invalid BigNumberish value",t||"value",n)}function _o(n,t){const e=Et(n,t);return ut(e>=uo,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:n}),e}const k_="0123456789abcdef";function ha(n){if(n instanceof Uint8Array){let t="0x0";for(const e of n)t+=k_[e>>4],t+=k_[e&15];return BigInt(t)}return Et(n)}function Tt(n,t){switch(typeof n){case"bigint":return V(n>=-Zi&&n<=Zi,"overflow",t||"value",n),Number(n);case"number":return V(Number.isInteger(n),"underflow",t||"value",n),V(n>=-Zi&&n<=Zi,"overflow",t||"value",n),n;case"string":try{if(n==="")throw new Error("empty string");return Tt(BigInt(n),t)}catch(e){V(!1,`invalid numeric string: ${e.message}`,t||"value",n)}}V(!1,"invalid numeric value",t||"value",n)}function sy(n){return Tt(ha(n))}function ii(n,t){let r=_o(n,"value").toString(16);if(t==null)r.length%2&&(r="0"+r);else{const i=Tt(t,"width");for(ut(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:n});r.length<i*2;)r="0"+r}return"0x"+r}function he(n){const t=_o(n,"value");if(t===uo)return new Uint8Array([]);let e=t.toString(16);e.length%2&&(e="0"+e);const r=new Uint8Array(e.length/2);for(let i=0;i<r.length;i++){const o=i*2;r[i]=parseInt(e.substring(o,o+2),16)}return r}function Xe(n){let t=yt(la(n)?n:he(n)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return t===""&&(t="0"),"0x"+t}const P_="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);const F_=BigInt(58);function oy(n){const t=Ot(n);let e=ha(t),r="";for(;e;)r=P_[Number(e%F_)]+r,e/=F_;for(let i=0;i<t.length&&!t[i];i++)r=P_[0]+r;return r}function ay(n){n=atob(n);const t=new Uint8Array(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return Ot(t)}function cy(n){const t=Ot(n);let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}class I_{filter;emitter;#t;constructor(t,e,r){this.#t=e,St(this,{emitter:t,filter:r})}async removeListener(){this.#t!=null&&await this.emitter.off(this.filter,this.#t)}}function uy(n,t,e,r,i){V(!1,`invalid codepoint at offset ${t}; ${n}`,"bytes",e)}function O_(n,t,e,r,i){if(n==="BAD_PREFIX"||n==="UNEXPECTED_CONTINUE"){let o=0;for(let a=t+1;a<e.length&&e[a]>>6===2;a++)o++;return o}return n==="OVERRUN"?e.length-t-1:0}function _y(n,t,e,r,i){return n==="OVERLONG"?(V(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),O_(n,t,e))}const fy=Object.freeze({error:uy,ignore:O_,replace:_y});function ly(n,t){t==null&&(t=fy.error);const e=Ot(n,"bytes"),r=[];let i=0;for(;i<e.length;){const o=e[i++];if(o>>7===0){r.push(o);continue}let a=null,u=null;if((o&224)===192)a=1,u=127;else if((o&240)===224)a=2,u=2047;else if((o&248)===240)a=3,u=65535;else{(o&192)===128?i+=t("UNEXPECTED_CONTINUE",i-1,e,r):i+=t("BAD_PREFIX",i-1,e,r);continue}if(i-1+a>=e.length){i+=t("OVERRUN",i-1,e,r);continue}let _=o&(1<<8-a-1)-1;for(let l=0;l<a;l++){let f=e[i];if((f&192)!=128){i+=t("MISSING_CONTINUE",i,e,r),_=null;break}_=_<<6|f&63,i++}if(_!==null){if(_>1114111){i+=t("OUT_OF_RANGE",i-1-a,e,r,_);continue}if(_>=55296&&_<=57343){i+=t("UTF16_SURROGATE",i-1-a,e,r,_);continue}if(_<=u){i+=t("OVERLONG",i-1-a,e,r,_);continue}r.push(_)}}return r}function Qn(n,t){V(typeof n=="string","invalid string value","str",n);let e=[];for(let r=0;r<n.length;r++){const i=n.charCodeAt(r);if(i<128)e.push(i);else if(i<2048)e.push(i>>6|192),e.push(i&63|128);else if((i&64512)==55296){r++;const o=n.charCodeAt(r);V(r<n.length&&(o&64512)===56320,"invalid surrogate pair","str",n);const a=65536+((i&1023)<<10)+(o&1023);e.push(a>>18|240),e.push(a>>12&63|128),e.push(a>>6&63|128),e.push(a&63|128)}else e.push(i>>12|224),e.push(i>>6&63|128),e.push(i&63|128)}return new Uint8Array(e)}function hy(n){return n.map(t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10&1023)+55296,(t&1023)+56320))).join("")}function fo(n,t){return hy(ly(n,t))}function T_(n){async function t(e,r){ut(r==null||!r.cancelled,"request cancelled before sending","CANCELLED");const i=e.url.split(":")[0].toLowerCase();ut(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ut(i==="https"||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let o=null;const a=new AbortController,u=setTimeout(()=>{o=ee("request timeout","TIMEOUT"),a.abort()},e.timeout);r&&r.addListener(()=>{o=ee("request cancelled","CANCELLED"),a.abort()});const _=Object.assign({},n,{method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:a.signal});let l;try{l=await fetch(e.url,_)}catch(v){throw clearTimeout(u),o||v}clearTimeout(u);const f={};l.headers.forEach((v,F)=>{f[F.toLowerCase()]=v});const g=await l.arrayBuffer(),y=g==null?null:new Uint8Array(g);return{statusCode:l.status,statusMessage:l.statusText,headers:f,body:y}}return t}const py=12,dy=250;let C_=T_();const wy=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),gy=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let pa=!1;async function N_(n,t){try{const e=n.match(wy);if(!e)throw new Error("invalid data");return new si(200,"OK",{"content-type":e[1]||"text/plain"},e[2]?ay(e[3]):by(e[3]))}catch{return new si(599,"BAD REQUEST (invalid data: URI)",{},null,new Cn(n))}}function L_(n){async function t(e,r){try{const i=e.match(gy);if(!i)throw new Error("invalid link");return new Cn(`${n}${i[2]}`)}catch{return new si(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Cn(e))}}return t}const lo={data:N_,ipfs:L_("https://gateway.ipfs.io/ipfs/")},D_=new WeakMap;class yy{#t;#e;constructor(t){this.#t=[],this.#e=!1,D_.set(t,()=>{if(!this.#e){this.#e=!0;for(const e of this.#t)setTimeout(()=>{e()},0);this.#t=[]}})}addListener(t){ut(!this.#e,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#t.push(t)}get cancelled(){return this.#e}checkSignal(){ut(!this.cancelled,"cancelled","CANCELLED",{})}}function ho(n){if(n==null)throw new Error("missing signal; should not happen");return n.checkSignal(),n}class Cn{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#d;#c;#_;#f;get url(){return this.#o}set url(t){this.#o=String(t)}get body(){return this.#s==null?null:new Uint8Array(this.#s)}set body(t){if(t==null)this.#s=void 0,this.#a=void 0;else if(typeof t=="string")this.#s=Qn(t),this.#a="text/plain";else if(t instanceof Uint8Array)this.#s=t,this.#a="application/octet-stream";else if(typeof t=="object")this.#s=Qn(JSON.stringify(t)),this.#a="application/json";else throw new Error("invalid body")}hasBody(){return this.#s!=null}get method(){return this.#n?this.#n:this.hasBody()?"POST":"GET"}set method(t){t==null&&(t=""),this.#n=String(t).toUpperCase()}get headers(){const t=Object.assign({},this.#r);return this.#h&&(t.authorization=`Basic ${cy(Qn(this.#h))}`),this.allowGzip&&(t["accept-encoding"]="gzip"),t["content-type"]==null&&this.#a&&(t["content-type"]=this.#a),this.body&&(t["content-length"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,e){this.#r[String(t).toLowerCase()]=String(e)}clearHeaders(){this.#r={}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#h||null}setCredentials(t,e){V(!t.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#h=`${t}:${e}`}get allowGzip(){return this.#e}set allowGzip(t){this.#e=!!t}get allowInsecureAuthentication(){return!!this.#t}set allowInsecureAuthentication(t){this.#t=!!t}get timeout(){return this.#i}set timeout(t){V(t>=0,"timeout must be non-zero","timeout",t),this.#i=t}get preflightFunc(){return this.#u||null}set preflightFunc(t){this.#u=t}get processFunc(){return this.#p||null}set processFunc(t){this.#p=t}get retryFunc(){return this.#d||null}set retryFunc(t){this.#d=t}get getUrlFunc(){return this.#f||C_}set getUrlFunc(t){this.#f=t}constructor(t){this.#o=String(t),this.#t=!1,this.#e=!0,this.#r={},this.#n="",this.#i=3e5,this.#_={slotInterval:dy,maxAttempts:py},this.#f=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#s?yt(this.#s):"null"}>`}setThrottleParams(t){t.slotInterval!=null&&(this.#_.slotInterval=t.slotInterval),t.maxAttempts!=null&&(this.#_.maxAttempts=t.maxAttempts)}async#l(t,e,r,i,o){if(t>=this.#_.maxAttempts)return o.makeServerError("exceeded maximum retry limit");ut(U_()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await my(r);let a=this.clone();const u=(a.url.split(":")[0]||"").toLowerCase();if(u in lo){const f=await lo[u](a.url,ho(i.#c));if(f instanceof si){let g=f;if(this.processFunc){ho(i.#c);try{g=await this.processFunc(a,g)}catch(y){(y.throttle==null||typeof y.stall!="number")&&g.makeServerError("error in post-processing function",y).assertOk()}}return g}a=f}this.preflightFunc&&(a=await this.preflightFunc(a));const _=await this.getUrlFunc(a,ho(i.#c));let l=new si(_.statusCode,_.statusMessage,_.headers,_.body,i);if(l.statusCode===301||l.statusCode===302){try{const f=l.headers.location||"";return a.redirect(f).#l(t+1,e,0,i,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(a,l,t))){const f=l.headers["retry-after"];let g=this.#_.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof f=="string"&&f.match(/^[1-9][0-9]*$/)&&(g=parseInt(f)),a.clone().#l(t+1,e,g,i,l)}if(this.processFunc){ho(i.#c);try{l=await this.processFunc(a,l)}catch(f){(f.throttle==null||typeof f.stall!="number")&&l.makeServerError("error in post-processing function",f).assertOk();let g=this.#_.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return f.stall>=0&&(g=f.stall),a.clone().#l(t+1,e,g,i,l)}}return l}send(){return ut(this.#c==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#c=new yy(this),this.#l(0,U_()+this.timeout,0,this,new si(0,"",{},null,this))}cancel(){ut(this.#c!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const t=D_.get(this);if(!t)throw new Error("missing signal; should not happen");t()}redirect(t){const e=this.url.split(":")[0].toLowerCase(),r=t.split(":")[0].toLowerCase();ut(this.method==="GET"&&(e!=="https"||r!=="http")&&t.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const i=new Cn(t);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,i.#r=Object.assign({},this.#r),this.#s&&(i.#s=new Uint8Array(this.#s)),i.#a=this.#a,i}clone(){const t=new Cn(this.url);return t.#n=this.#n,this.#s&&(t.#s=this.#s),t.#a=this.#a,t.#r=Object.assign({},this.#r),t.#h=this.#h,this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),t.#u=this.#u,t.#p=this.#p,t.#d=this.#d,t.#_=Object.assign({},this.#_),t.#f=this.#f,t}static lockConfig(){pa=!0}static getGateway(t){return lo[t.toLowerCase()]||null}static registerGateway(t,e){if(t=t.toLowerCase(),t==="http"||t==="https")throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(pa)throw new Error("gateways locked");lo[t]=e}static registerGetUrl(t){if(pa)throw new Error("gateways locked");C_=t}static createGetUrlFunc(t){return T_(t)}static createDataGateway(){return N_}static createIpfsGatewayFunc(t){return L_(t)}}class si{#t;#e;#r;#n;#i;#o;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#n?yt(this.#n):"null"}>`}get statusCode(){return this.#t}get statusMessage(){return this.#e}get headers(){return Object.assign({},this.#r)}get body(){return this.#n==null?null:new Uint8Array(this.#n)}get bodyText(){try{return this.#n==null?"":fo(this.#n)}catch{ut(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ut(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}constructor(t,e,r,i,o){this.#t=t,this.#e=e,this.#r=Object.keys(r).reduce((a,u)=>(a[u.toLowerCase()]=String(r[u]),a),{}),this.#n=i==null?null:new Uint8Array(i),this.#i=o||null,this.#o={message:""}}makeServerError(t,e){let r;t?r=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${t})`:(t=`${this.statusCode} ${this.statusMessage}`,r=`CLIENT ESCALATED SERVER ERROR (${t})`);const i=new si(599,r,this.headers,this.body,this.#i||void 0);return i.#o={message:t,error:e},i}throwThrottleError(t,e){e==null?e=-1:V(Number.isInteger(e)&&e>=0,"invalid stall timeout","stall",e);const r=new Error(t||"throttling requests");throw St(r,{stall:e,throttle:!0}),r}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return this.#n!=null}get request(){return this.#i}ok(){return this.#o.message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:t,error:e}=this.#o;t===""&&(t=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let i=null;try{this.#n&&(i=fo(this.#n))}catch{}ut(!1,t,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:e,info:{requestUrl:r,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function U_(){return new Date().getTime()}function by(n){return Qn(n.replace(/%([0-9a-f][0-9a-f])/gi,(t,e)=>String.fromCharCode(parseInt(e,16))))}function my(n){return new Promise(t=>setTimeout(t,n))}function Ay(n){let t=n.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function M_(n,t,e){let r=0;for(let i=0;i<e;i++)r=r*256+n[t+i];return r}function j_(n,t,e,r){const i=[];for(;e<t+1+r;){const o=G_(n,e);i.push(o.result),e+=o.consumed,ut(e<=t+1+r,"child data too short","BUFFER_OVERRUN",{buffer:n,length:r,offset:t})}return{consumed:1+r,result:i}}function G_(n,t){ut(n.length!==0,"data too short","BUFFER_OVERRUN",{buffer:n,length:0,offset:1});const e=r=>{ut(r<=n.length,"data short segment too short","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r})};if(n[t]>=248){const r=n[t]-247;e(t+1+r);const i=M_(n,t+1,r);return e(t+1+r+i),j_(n,t,t+1+r,r+i)}else if(n[t]>=192){const r=n[t]-192;return e(t+1+r),j_(n,t,t+1,r)}else if(n[t]>=184){const r=n[t]-183;e(t+1+r);const i=M_(n,t+1,r);e(t+1+r+i);const o=yt(n.slice(t+1+r,t+1+r+i));return{consumed:1+r+i,result:o}}else if(n[t]>=128){const r=n[t]-128;e(t+1+r);const i=yt(n.slice(t+1,t+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:Ay(n[t])}}function zs(n){const t=Ot(n,"data"),e=G_(t,0);return V(e.consumed===t.length,"unexpected junk after rlp payload","data",n),e.result}function H_(n){const t=[];for(;n;)t.unshift(n&255),n>>=8;return t}function V_(n){if(Array.isArray(n)){let r=[];if(n.forEach(function(o){r=r.concat(V_(o))}),r.length<=55)return r.unshift(192+r.length),r;const i=H_(r.length);return i.unshift(247+i.length),i.concat(r)}const t=Array.prototype.slice.call(Ot(n,"object"));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const e=H_(t.length);return e.unshift(183+e.length),e.concat(t)}const q_="0123456789abcdef";function oi(n){let t="0x";for(const e of V_(n))t+=q_[e>>4],t+=q_[e&15];return t}const xe=32,da=new Uint8Array(xe),Ey=["then"],po={},Q_=new WeakMap;function bi(n){return Q_.get(n)}function K_(n,t){Q_.set(n,t)}function Bs(n,t){const e=new Error(`deferred error during ABI decoding triggered accessing ${n}`);throw e.error=t,e}function wa(n,t,e){return n.indexOf(null)>=0?t.map((r,i)=>r instanceof Kn?wa(bi(r),r,e):r):n.reduce((r,i,o)=>{let a=t.getValue(i);return i in r||(e&&a instanceof Kn&&(a=wa(bi(a),a,e)),r[i]=a),r},{})}class Kn extends Array{#t;constructor(...t){const e=t[0];let r=t[1],i=(t[2]||[]).slice(),o=!0;e!==po&&(r=t,i=[],o=!1),super(r.length),r.forEach((_,l)=>{this[l]=_});const a=i.reduce((_,l)=>(typeof l=="string"&&_.set(l,(_.get(l)||0)+1),_),new Map);if(K_(this,Object.freeze(r.map((_,l)=>{const f=i[l];return f!=null&&a.get(f)===1?f:null}))),this.#t=[],this.#t==null&&this.#t,!o)return;Object.freeze(this);const u=new Proxy(this,{get:(_,l,f)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){const y=Tt(l,"%index");if(y<0||y>=this.length)throw new RangeError("out of result range");const v=_[y];return v instanceof Error&&Bs(`index ${y}`,v),v}if(Ey.indexOf(l)>=0)return Reflect.get(_,l,f);const g=_[l];if(g instanceof Function)return function(...y){return g.apply(this===f?_:this,y)};if(!(l in _))return _.getValue.apply(this===f?_:this,[l])}return Reflect.get(_,l,f)}});return K_(u,bi(this)),u}toArray(t){const e=[];return this.forEach((r,i)=>{r instanceof Error&&Bs(`index ${i}`,r),t&&r instanceof Kn&&(r=r.toArray(t)),e.push(r)}),e}toObject(t){const e=bi(this);return e.reduce((r,i,o)=>(ut(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),wa(e,this,t)),{})}slice(t,e){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),e==null&&(e=this.length),e<0&&(e+=this.length,e<0&&(e=0)),e>this.length&&(e=this.length);const r=bi(this),i=[],o=[];for(let a=t;a<e;a++)i.push(this[a]),o.push(r[a]);return new Kn(po,i,o)}filter(t,e){const r=bi(this),i=[],o=[];for(let a=0;a<this.length;a++){const u=this[a];u instanceof Error&&Bs(`index ${a}`,u),t.call(e,u,a,this)&&(i.push(u),o.push(r[a]))}return new Kn(po,i,o)}map(t,e){const r=[];for(let i=0;i<this.length;i++){const o=this[i];o instanceof Error&&Bs(`index ${i}`,o),r.push(t.call(e,o,i,this))}return r}getValue(t){const e=bi(this).indexOf(t);if(e===-1)return;const r=this[e];return r instanceof Error&&Bs(`property ${JSON.stringify(t)}`,r.error),r}static fromItems(t,e){return new Kn(po,t,e)}}function W_(n){let t=he(n);return ut(t.length<=xe,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:xe,offset:t.length}),t.length!==xe&&(t=ve(ne([da.slice(t.length%xe),t]))),t}class Wn{name;type;localName;dynamic;constructor(t,e,r,i){St(this,{name:t,type:e,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(t,e){V(!1,t,this.localName,e)}}class ga{#t;#e;constructor(){this.#t=[],this.#e=0}get data(){return ne(this.#t)}get length(){return this.#e}#r(t){return this.#t.push(t),this.#e+=t.length,t.length}appendWriter(t){return this.#r(ve(t.data))}writeBytes(t){let e=ve(t);const r=e.length%xe;return r&&(e=ve(ne([e,da.slice(r)]))),this.#r(e)}writeValue(t){return this.#r(W_(t))}writeUpdatableValue(){const t=this.#t.length;return this.#t.push(da),this.#e+=xe,e=>{this.#t[t]=W_(e)}}}class ya{allowLoose;#t;#e;#r;#n;#i;constructor(t,e,r){St(this,{allowLoose:!!e}),this.#t=ve(t),this.#r=0,this.#n=null,this.#i=r??1024,this.#e=0}get data(){return yt(this.#t)}get dataLength(){return this.#t.length}get consumed(){return this.#e}get bytes(){return new Uint8Array(this.#t)}#o(t){if(this.#n)return this.#n.#o(t);this.#r+=t,ut(this.#i<1||this.#r<=this.#i*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#i} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:ve(this.#t),offset:this.#e,length:t,info:{bytesRead:this.#r,dataLength:this.dataLength}})}#s(t,e,r){let i=Math.ceil(e/xe)*xe;return this.#e+i>this.#t.length&&(this.allowLoose&&r&&this.#e+e<=this.#t.length?i=e:ut(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:ve(this.#t),length:this.#t.length,offset:this.#e+i})),this.#t.slice(this.#e,this.#e+i)}subReader(t){const e=new ya(this.#t.slice(this.#e+t),this.allowLoose,this.#i);return e.#n=this,e}readBytes(t,e){let r=this.#s(0,t,!!e);return this.#o(t),this.#e+=r.length,r.slice(0,t)}readValue(){return ha(this.readBytes(xe))}readIndex(){return sy(this.readBytes(xe))}}function wo(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function ba(n,...t){if(!(n instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(n.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${n.length}`)}function vy(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");wo(n.outputLen),wo(n.blockLen)}function Xi(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function J_(n,t){ba(n);const e=t.outputLen;if(n.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}const ma=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const $_=n=>n instanceof Uint8Array,xy=n=>new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4)),Aa=n=>new DataView(n.buffer,n.byteOffset,n.byteLength),Nn=(n,t)=>n<<32-t|n>>>t;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");function Ry(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function go(n){if(typeof n=="string"&&(n=Ry(n)),!$_(n))throw new Error(`expected Uint8Array, got ${typeof n}`);return n}function Sy(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!$_(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}class Ea{clone(){return this._cloneInto()}}function va(n){const t=r=>n().update(go(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function zy(n=32){if(ma&&typeof ma.getRandomValues=="function")return ma.getRandomValues(new Uint8Array(n));throw new Error("crypto.getRandomValues must be defined")}class Y_ extends Ea{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,vy(t);const r=go(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let a=0;a<o.length;a++)o[a]^=54;this.iHash.update(o),this.oHash=t.create();for(let a=0;a<o.length;a++)o[a]^=106;this.oHash.update(o),o.fill(0)}update(t){return Xi(this),this.iHash.update(t),this}digestInto(t){Xi(this),ba(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:i,destroyed:o,blockLen:a,outputLen:u}=this;return t=t,t.finished=i,t.destroyed=o,t.blockLen=a,t.outputLen=u,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Z_=(n,t,e)=>new Y_(n,t).update(e).digest();Z_.create=(n,t)=>new Y_(n,t);function By(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),o=BigInt(4294967295),a=Number(e>>i&o),u=Number(e&o),_=r?4:0,l=r?0:4;n.setUint32(t+_,a,r),n.setUint32(t+l,u,r)}class X_ extends Ea{constructor(t,e,r,i){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Aa(this.buffer)}update(t){Xi(this);const{view:e,buffer:r,blockLen:i}=this;t=go(t);const o=t.length;for(let a=0;a<o;){const u=Math.min(i-this.pos,o-a);if(u===i){const _=Aa(t);for(;i<=o-a;a+=i)this.process(_,a);continue}r.set(t.subarray(a,a+u),this.pos),this.pos+=u,a+=u,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Xi(this),J_(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:i,isLE:o}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(r,0),a=0);for(let g=a;g<i;g++)e[g]=0;By(r,i-8,BigInt(this.length*8),o),this.process(r,0);const u=Aa(t),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=_/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let g=0;g<l;g++)u.setUint32(4*g,f[g],o)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:i,finished:o,destroyed:a,pos:u}=this;return t.length=i,t.pos=u,t.finished=o,t.destroyed=a,i%e&&t.buffer.set(r),t}}const ky=(n,t,e)=>n&t^~n&e,Py=(n,t,e)=>n&t^n&e^t&e,Fy=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ai=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ci=new Uint32Array(64);class Iy extends X_{constructor(){super(64,32,8,!1),this.A=ai[0]|0,this.B=ai[1]|0,this.C=ai[2]|0,this.D=ai[3]|0,this.E=ai[4]|0,this.F=ai[5]|0,this.G=ai[6]|0,this.H=ai[7]|0}get(){const{A:t,B:e,C:r,D:i,E:o,F:a,G:u,H:_}=this;return[t,e,r,i,o,a,u,_]}set(t,e,r,i,o,a,u,_){this.A=t|0,this.B=e|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=a|0,this.G=u|0,this.H=_|0}process(t,e){for(let g=0;g<16;g++,e+=4)ci[g]=t.getUint32(e,!1);for(let g=16;g<64;g++){const y=ci[g-15],v=ci[g-2],F=Nn(y,7)^Nn(y,18)^y>>>3,k=Nn(v,17)^Nn(v,19)^v>>>10;ci[g]=k+ci[g-7]+F+ci[g-16]|0}let{A:r,B:i,C:o,D:a,E:u,F:_,G:l,H:f}=this;for(let g=0;g<64;g++){const y=Nn(u,6)^Nn(u,11)^Nn(u,25),v=f+y+ky(u,_,l)+Fy[g]+ci[g]|0,k=(Nn(r,2)^Nn(r,13)^Nn(r,22))+Py(r,i,o)|0;f=l,l=_,_=u,u=a+v|0,a=o,o=i,i=r,r=v+k|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,a=a+this.D|0,u=u+this.E|0,_=_+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,i,o,a,u,_,l,f)}roundClean(){ci.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const tf=va(()=>new Iy),yo=BigInt(2**32-1),xa=BigInt(32);function ef(n,t=!1){return t?{h:Number(n&yo),l:Number(n>>xa&yo)}:{h:Number(n>>xa&yo)|0,l:Number(n&yo)|0}}function rf(n,t=!1){let e=new Uint32Array(n.length),r=new Uint32Array(n.length);for(let i=0;i<n.length;i++){const{h:o,l:a}=ef(n[i],t);[e[i],r[i]]=[o,a]}return[e,r]}const Oy=(n,t)=>BigInt(n>>>0)<<xa|BigInt(t>>>0),Ty=(n,t,e)=>n>>>e,Cy=(n,t,e)=>n<<32-e|t>>>e,Ny=(n,t,e)=>n>>>e|t<<32-e,Ly=(n,t,e)=>n<<32-e|t>>>e,Dy=(n,t,e)=>n<<64-e|t>>>e-32,Uy=(n,t,e)=>n>>>e-32|t<<64-e,My=(n,t)=>t,jy=(n,t)=>n,nf=(n,t,e)=>n<<e|t>>>32-e,sf=(n,t,e)=>t<<e|n>>>32-e,of=(n,t,e)=>t<<e-32|n>>>64-e,af=(n,t,e)=>n<<e-32|t>>>64-e;function Gy(n,t,e,r){const i=(t>>>0)+(r>>>0);return{h:n+e+(i/2**32|0)|0,l:i|0}}const It={fromBig:ef,split:rf,toBig:Oy,shrSH:Ty,shrSL:Cy,rotrSH:Ny,rotrSL:Ly,rotrBH:Dy,rotrBL:Uy,rotr32H:My,rotr32L:jy,rotlSH:nf,rotlSL:sf,rotlBH:of,rotlBL:af,add:Gy,add3L:(n,t,e)=>(n>>>0)+(t>>>0)+(e>>>0),add3H:(n,t,e,r)=>t+e+r+(n/2**32|0)|0,add4L:(n,t,e,r)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0),add4H:(n,t,e,r,i)=>t+e+r+i+(n/2**32|0)|0,add5H:(n,t,e,r,i,o)=>t+e+r+i+o+(n/2**32|0)|0,add5L:(n,t,e,r,i)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0)+(i>>>0)},[Hy,Vy]=It.split(["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","0xf40e35855771202a","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(n=>BigInt(n))),ui=new Uint32Array(80),_i=new Uint32Array(80);class qy extends X_{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:r,Bl:i,Ch:o,Cl:a,Dh:u,Dl:_,Eh:l,El:f,Fh:g,Fl:y,Gh:v,Gl:F,Hh:k,Hl:T}=this;return[t,e,r,i,o,a,u,_,l,f,g,y,v,F,k,T]}set(t,e,r,i,o,a,u,_,l,f,g,y,v,F,k,T){this.Ah=t|0,this.Al=e|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=a|0,this.Dh=u|0,this.Dl=_|0,this.Eh=l|0,this.El=f|0,this.Fh=g|0,this.Fl=y|0,this.Gh=v|0,this.Gl=F|0,this.Hh=k|0,this.Hl=T|0}process(t,e){for(let B=0;B<16;B++,e+=4)ui[B]=t.getUint32(e),_i[B]=t.getUint32(e+=4);for(let B=16;B<80;B++){const z=ui[B-15]|0,O=_i[B-15]|0,C=It.rotrSH(z,O,1)^It.rotrSH(z,O,8)^It.shrSH(z,O,7),N=It.rotrSL(z,O,1)^It.rotrSL(z,O,8)^It.shrSL(z,O,7),L=ui[B-2]|0,J=_i[B-2]|0,nt=It.rotrSH(L,J,19)^It.rotrBH(L,J,61)^It.shrSH(L,J,6),dt=It.rotrSL(L,J,19)^It.rotrBL(L,J,61)^It.shrSL(L,J,6),D=It.add4L(N,dt,_i[B-7],_i[B-16]),vt=It.add4H(D,C,nt,ui[B-7],ui[B-16]);ui[B]=vt|0,_i[B]=D|0}let{Ah:r,Al:i,Bh:o,Bl:a,Ch:u,Cl:_,Dh:l,Dl:f,Eh:g,El:y,Fh:v,Fl:F,Gh:k,Gl:T,Hh:E,Hl:R}=this;for(let B=0;B<80;B++){const z=It.rotrSH(g,y,14)^It.rotrSH(g,y,18)^It.rotrBH(g,y,41),O=It.rotrSL(g,y,14)^It.rotrSL(g,y,18)^It.rotrBL(g,y,41),C=g&v^~g&k,N=y&F^~y&T,L=It.add5L(R,O,N,Vy[B],_i[B]),J=It.add5H(L,E,z,C,Hy[B],ui[B]),nt=L|0,dt=It.rotrSH(r,i,28)^It.rotrBH(r,i,34)^It.rotrBH(r,i,39),D=It.rotrSL(r,i,28)^It.rotrBL(r,i,34)^It.rotrBL(r,i,39),vt=r&o^r&u^o&u,wt=i&a^i&_^a&_;E=k|0,R=T|0,k=v|0,T=F|0,v=g|0,F=y|0,{h:g,l:y}=It.add(l|0,f|0,J|0,nt|0),l=u|0,f=_|0,u=o|0,_=a|0,o=r|0,a=i|0;const at=It.add3L(nt,D,wt);r=It.add3H(at,J,dt,vt),i=at|0}({h:r,l:i}=It.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:a}=It.add(this.Bh|0,this.Bl|0,o|0,a|0),{h:u,l:_}=It.add(this.Ch|0,this.Cl|0,u|0,_|0),{h:l,l:f}=It.add(this.Dh|0,this.Dl|0,l|0,f|0),{h:g,l:y}=It.add(this.Eh|0,this.El|0,g|0,y|0),{h:v,l:F}=It.add(this.Fh|0,this.Fl|0,v|0,F|0),{h:k,l:T}=It.add(this.Gh|0,this.Gl|0,k|0,T|0),{h:E,l:R}=It.add(this.Hh|0,this.Hl|0,E|0,R|0),this.set(r,i,o,a,u,_,l,f,g,y,v,F,k,T,E,R)}roundClean(){ui.fill(0),_i.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Qy=va(()=>new qy);function Ky(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Wi<"u")return Wi;throw new Error("unable to locate global object")}const cf=Ky();cf.crypto||cf.msCrypto;function Wy(n){switch(n){case"sha256":return tf.create();case"sha512":return Qy.create()}V(!1,"invalid hashing algorithm name","algorithm",n)}const[uf,_f,ff]=[[],[],[]],Jy=BigInt(0),ks=BigInt(1),$y=BigInt(2),Yy=BigInt(7),Zy=BigInt(256),Xy=BigInt(113);for(let n=0,t=ks,e=1,r=0;n<24;n++){[e,r]=[r,(2*e+3*r)%5],uf.push(2*(5*r+e)),_f.push((n+1)*(n+2)/2%64);let i=Jy;for(let o=0;o<7;o++)t=(t<<ks^(t>>Yy)*Xy)%Zy,t&$y&&(i^=ks<<(ks<<BigInt(o))-ks);ff.push(i)}const[t0,e0]=rf(ff,!0),lf=(n,t,e)=>e>32?of(n,t,e):nf(n,t,e),hf=(n,t,e)=>e>32?af(n,t,e):sf(n,t,e);function r0(n,t=24){const e=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)e[a]=n[a]^n[a+10]^n[a+20]^n[a+30]^n[a+40];for(let a=0;a<10;a+=2){const u=(a+8)%10,_=(a+2)%10,l=e[_],f=e[_+1],g=lf(l,f,1)^e[u],y=hf(l,f,1)^e[u+1];for(let v=0;v<50;v+=10)n[a+v]^=g,n[a+v+1]^=y}let i=n[2],o=n[3];for(let a=0;a<24;a++){const u=_f[a],_=lf(i,o,u),l=hf(i,o,u),f=uf[a];i=n[f],o=n[f+1],n[f]=_,n[f+1]=l}for(let a=0;a<50;a+=10){for(let u=0;u<10;u++)e[u]=n[a+u];for(let u=0;u<10;u++)n[a+u]^=~e[(u+2)%10]&e[(u+4)%10]}n[0]^=t0[r],n[1]^=e0[r]}e.fill(0)}class Ra extends Ea{constructor(t,e,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,wo(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=xy(this.state)}keccak(){r0(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Xi(this);const{blockLen:e,state:r}=this;t=go(t);const i=t.length;for(let o=0;o<i;){const a=Math.min(e-this.pos,i-o);for(let u=0;u<a;u++)r[this.pos++]^=t[o++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,(e&128)!==0&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){Xi(this,!1),ba(t),this.finish();const e=this.state,{blockLen:r}=this;for(let i=0,o=t.length;i<o;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,o-i);t.set(e.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return wo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(J_(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:i,rounds:o,enableXOF:a}=this;return t||(t=new Ra(e,r,i,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=a,t.destroyed=this.destroyed,t}}const n0=((n,t,e)=>va(()=>new Ra(t,n,e)))(1,136,256/8);let pf=!1;const df=function(n){return n0(n)};let wf=df;function fe(n){const t=Ot(n,"data");return yt(wf(t))}fe._=df,fe.lock=function(){pf=!0},fe.register=function(n){if(pf)throw new TypeError("keccak256 is locked");wf=n},Object.freeze(fe);const gf=function(n){return Wy("sha256").update(n).digest()};let yf=gf,bf=!1;function ts(n){const t=Ot(n,"data");return yt(yf(t))}ts._=gf,ts.lock=function(){bf=!0},ts.register=function(n){if(bf)throw new Error("sha256 is locked");yf=n},Object.freeze(ts),Object.freeze(ts);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const mf=BigInt(0),bo=BigInt(1),i0=BigInt(2),mo=n=>n instanceof Uint8Array,s0=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function es(n){if(!mo(n))throw new Error("Uint8Array expected");let t="";for(let e=0;e<n.length;e++)t+=s0[n[e]];return t}function Af(n){const t=n.toString(16);return t.length&1?`0${t}`:t}function Sa(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return BigInt(n===""?"0":`0x${n}`)}function rs(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);const t=n.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const e=new Uint8Array(t/2);for(let r=0;r<e.length;r++){const i=r*2,o=n.slice(i,i+2),a=Number.parseInt(o,16);if(Number.isNaN(a)||a<0)throw new Error("Invalid byte sequence");e[r]=a}return e}function mi(n){return Sa(es(n))}function za(n){if(!mo(n))throw new Error("Uint8Array expected");return Sa(es(Uint8Array.from(n).reverse()))}function ns(n,t){return rs(n.toString(16).padStart(t*2,"0"))}function Ba(n,t){return ns(n,t).reverse()}function o0(n){return rs(Af(n))}function tr(n,t,e){let r;if(typeof t=="string")try{r=rs(t)}catch(o){throw new Error(`${n} must be valid hex string, got "${t}". Cause: ${o}`)}else if(mo(t))r=Uint8Array.from(t);else throw new Error(`${n} must be hex string or Uint8Array`);const i=r.length;if(typeof e=="number"&&i!==e)throw new Error(`${n} expected ${e} bytes, got ${i}`);return r}function Ps(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!mo(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}function a0(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function c0(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function u0(n){let t;for(t=0;n>mf;n>>=bo,t+=1);return t}function _0(n,t){return n>>BigInt(t)&bo}const f0=(n,t,e)=>n|(e?bo:mf)<<BigInt(t),ka=n=>(i0<<BigInt(n-1))-bo,Pa=n=>new Uint8Array(n),Ef=n=>Uint8Array.from(n);function vf(n,t,e){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Pa(n),i=Pa(n),o=0;const a=()=>{r.fill(1),i.fill(0),o=0},u=(...g)=>e(i,r,...g),_=(g=Pa())=>{i=u(Ef([0]),g),r=u(),g.length!==0&&(i=u(Ef([1]),g),r=u())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let g=0;const y=[];for(;g<t;){r=u();const v=r.slice();y.push(v),g+=r.length}return Ps(...y)};return(g,y)=>{a(),_(g);let v;for(;!(v=y(l()));)_();return a(),v}}const l0={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||n instanceof Uint8Array,isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,t)=>t.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function Fs(n,t,e={}){const r=(i,o,a)=>{const u=l0[o];if(typeof u!="function")throw new Error(`Invalid validator "${o}", expected function`);const _=n[i];if(!(a&&_===void 0)&&!u(_,n))throw new Error(`Invalid param ${String(i)}=${_} (${typeof _}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(e))r(i,o,!0);return n}const h0=Object.freeze(Object.defineProperty({__proto__:null,bitGet:_0,bitLen:u0,bitMask:ka,bitSet:f0,bytesToHex:es,bytesToNumberBE:mi,bytesToNumberLE:za,concatBytes:Ps,createHmacDrbg:vf,ensureBytes:tr,equalBytes:a0,hexToBytes:rs,hexToNumber:Sa,numberToBytesBE:ns,numberToBytesLE:Ba,numberToHexUnpadded:Af,numberToVarBytesBE:o0,utf8ToBytes:c0,validateObject:Fs},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ye=BigInt(0),ae=BigInt(1),Ai=BigInt(2),p0=BigInt(3),Fa=BigInt(4),xf=BigInt(5),Rf=BigInt(8);BigInt(9),BigInt(16);function Be(n,t){const e=n%t;return e>=ye?e:t+e}function d0(n,t,e){if(e<=ye||t<ye)throw new Error("Expected power/modulo > 0");if(e===ae)return ye;let r=ae;for(;t>ye;)t&ae&&(r=r*n%e),n=n*n%e,t>>=ae;return r}function Ge(n,t,e){let r=n;for(;t-- >ye;)r*=r,r%=e;return r}function Ia(n,t){if(n===ye||t<=ye)throw new Error(`invert: expected positive integers, got n=${n} mod=${t}`);let e=Be(n,t),r=t,i=ye,o=ae;for(;e!==ye;){const u=r/e,_=r%e,l=i-o*u;r=e,e=_,i=o,o=l}if(r!==ae)throw new Error("invert: does not exist");return Be(i,t)}function w0(n){const t=(n-ae)/Ai;let e,r,i;for(e=n-ae,r=0;e%Ai===ye;e/=Ai,r++);for(i=Ai;i<n&&d0(i,t,n)!==n-ae;i++);if(r===1){const a=(n+ae)/Fa;return function(_,l){const f=_.pow(l,a);if(!_.eql(_.sqr(f),l))throw new Error("Cannot find square root");return f}}const o=(e+ae)/Ai;return function(u,_){if(u.pow(_,t)===u.neg(u.ONE))throw new Error("Cannot find square root");let l=r,f=u.pow(u.mul(u.ONE,i),e),g=u.pow(_,o),y=u.pow(_,e);for(;!u.eql(y,u.ONE);){if(u.eql(y,u.ZERO))return u.ZERO;let v=1;for(let k=u.sqr(y);v<l&&!u.eql(k,u.ONE);v++)k=u.sqr(k);const F=u.pow(f,ae<<BigInt(l-v-1));f=u.sqr(F),g=u.mul(g,F),y=u.mul(y,f),l=v}return g}}function g0(n){if(n%Fa===p0){const t=(n+ae)/Fa;return function(r,i){const o=r.pow(i,t);if(!r.eql(r.sqr(o),i))throw new Error("Cannot find square root");return o}}if(n%Rf===xf){const t=(n-xf)/Rf;return function(r,i){const o=r.mul(i,Ai),a=r.pow(o,t),u=r.mul(i,a),_=r.mul(r.mul(u,Ai),a),l=r.mul(u,r.sub(_,r.ONE));if(!r.eql(r.sqr(l),i))throw new Error("Cannot find square root");return l}}return w0(n)}const y0=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b0(n){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=y0.reduce((r,i)=>(r[i]="function",r),t);return Fs(n,e)}function m0(n,t,e){if(e<ye)throw new Error("Expected power > 0");if(e===ye)return n.ONE;if(e===ae)return t;let r=n.ONE,i=t;for(;e>ye;)e&ae&&(r=n.mul(r,i)),i=n.sqr(i),e>>=ae;return r}function A0(n,t){const e=new Array(t.length),r=t.reduce((o,a,u)=>n.is0(a)?o:(e[u]=o,n.mul(o,a)),n.ONE),i=n.inv(r);return t.reduceRight((o,a,u)=>n.is0(a)?o:(e[u]=n.mul(o,e[u]),n.mul(o,a)),i),e}function Sf(n,t){const e=t!==void 0?t:n.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function E0(n,t,e=!1,r={}){if(n<=ye)throw new Error(`Expected Field ORDER > 0, got ${n}`);const{nBitLength:i,nByteLength:o}=Sf(n,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=g0(n),u=Object.freeze({ORDER:n,BITS:i,BYTES:o,MASK:ka(i),ZERO:ye,ONE:ae,create:_=>Be(_,n),isValid:_=>{if(typeof _!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof _}`);return ye<=_&&_<n},is0:_=>_===ye,isOdd:_=>(_&ae)===ae,neg:_=>Be(-_,n),eql:(_,l)=>_===l,sqr:_=>Be(_*_,n),add:(_,l)=>Be(_+l,n),sub:(_,l)=>Be(_-l,n),mul:(_,l)=>Be(_*l,n),pow:(_,l)=>m0(u,_,l),div:(_,l)=>Be(_*Ia(l,n),n),sqrN:_=>_*_,addN:(_,l)=>_+l,subN:(_,l)=>_-l,mulN:(_,l)=>_*l,inv:_=>Ia(_,n),sqrt:r.sqrt||(_=>a(u,_)),invertBatch:_=>A0(u,_),cmov:(_,l,f)=>f?l:_,toBytes:_=>e?Ba(_,o):ns(_,o),fromBytes:_=>{if(_.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${_.length}`);return e?za(_):mi(_)}});return Object.freeze(u)}function zf(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const t=n.toString(2).length;return Math.ceil(t/8)}function Bf(n){const t=zf(n);return t+Math.ceil(t/2)}function v0(n,t,e=!1){const r=n.length,i=zf(t),o=Bf(t);if(r<16||r<o||r>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const a=e?mi(n):za(n),u=Be(a,t-ae)+ae;return e?Ba(u,i):ns(u,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const x0=BigInt(0),Oa=BigInt(1);function R0(n,t){const e=(i,o)=>{const a=o.negate();return i?a:o},r=i=>{const o=Math.ceil(t/i)+1,a=2**(i-1);return{windows:o,windowSize:a}};return{constTimeNegate:e,unsafeLadder(i,o){let a=n.ZERO,u=i;for(;o>x0;)o&Oa&&(a=a.add(u)),u=u.double(),o>>=Oa;return a},precomputeWindow(i,o){const{windows:a,windowSize:u}=r(o),_=[];let l=i,f=l;for(let g=0;g<a;g++){f=l,_.push(f);for(let y=1;y<u;y++)f=f.add(l),_.push(f);l=f.double()}return _},wNAF(i,o,a){const{windows:u,windowSize:_}=r(i);let l=n.ZERO,f=n.BASE;const g=BigInt(2**i-1),y=2**i,v=BigInt(i);for(let F=0;F<u;F++){const k=F*_;let T=Number(a&g);a>>=v,T>_&&(T-=y,a+=Oa);const E=k,R=k+Math.abs(T)-1,B=F%2!==0,z=T<0;T===0?f=f.add(e(B,o[E])):l=l.add(e(z,o[R]))}return{p:l,f}},wNAFCached(i,o,a,u){const _=i._WINDOW_SIZE||1;let l=o.get(i);return l||(l=this.precomputeWindow(i,_),_!==1&&o.set(i,u(l))),this.wNAF(_,l,a)}}}function kf(n){return b0(n.Fp),Fs(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Sf(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function S0(n){const t=kf(n);Fs(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:r,a:i}=t;if(e){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:z0,hexToBytes:B0}=h0,Ei={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(n){const{Err:t}=Ei;if(n.length<2||n[0]!==2)throw new t("Invalid signature integer tag");const e=n[1],r=n.subarray(2,e+2);if(!e||r.length!==e)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:z0(r),l:n.subarray(e+2)}},toSig(n){const{Err:t}=Ei,e=typeof n=="string"?B0(n):n;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let r=e.length;if(r<2||e[0]!=48)throw new t("Invalid signature tag");if(e[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=Ei._parseInt(e.subarray(2)),{d:a,l:u}=Ei._parseInt(o);if(u.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(n){const t=l=>Number.parseInt(l[0],16)&8?"00"+l:l,e=l=>{const f=l.toString(16);return f.length&1?`0${f}`:f},r=t(e(n.s)),i=t(e(n.r)),o=r.length/2,a=i.length/2,u=e(o),_=e(a);return`30${e(a+o+4)}02${_}${i}02${u}${r}`}},Jn=BigInt(0),He=BigInt(1);BigInt(2);const Pf=BigInt(3);BigInt(4);function k0(n){const t=S0(n),{Fp:e}=t,r=t.toBytes||((F,k,T)=>{const E=k.toAffine();return Ps(Uint8Array.from([4]),e.toBytes(E.x),e.toBytes(E.y))}),i=t.fromBytes||(F=>{const k=F.subarray(1),T=e.fromBytes(k.subarray(0,e.BYTES)),E=e.fromBytes(k.subarray(e.BYTES,2*e.BYTES));return{x:T,y:E}});function o(F){const{a:k,b:T}=t,E=e.sqr(F),R=e.mul(E,F);return e.add(e.add(R,e.mul(F,k)),T)}if(!e.eql(e.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function a(F){return typeof F=="bigint"&&Jn<F&&F<t.n}function u(F){if(!a(F))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function _(F){const{allowedPrivateKeyLengths:k,nByteLength:T,wrapPrivateKey:E,n:R}=t;if(k&&typeof F!="bigint"){if(F instanceof Uint8Array&&(F=es(F)),typeof F!="string"||!k.includes(F.length))throw new Error("Invalid key");F=F.padStart(T*2,"0")}let B;try{B=typeof F=="bigint"?F:mi(tr("private key",F,T))}catch{throw new Error(`private key must be ${T} bytes, hex or bigint, not ${typeof F}`)}return E&&(B=Be(B,R)),u(B),B}const l=new Map;function f(F){if(!(F instanceof g))throw new Error("ProjectivePoint expected")}class g{constructor(k,T,E){if(this.px=k,this.py=T,this.pz=E,k==null||!e.isValid(k))throw new Error("x required");if(T==null||!e.isValid(T))throw new Error("y required");if(E==null||!e.isValid(E))throw new Error("z required")}static fromAffine(k){const{x:T,y:E}=k||{};if(!k||!e.isValid(T)||!e.isValid(E))throw new Error("invalid affine point");if(k instanceof g)throw new Error("projective point not allowed");const R=B=>e.eql(B,e.ZERO);return R(T)&&R(E)?g.ZERO:new g(T,E,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(k){const T=e.invertBatch(k.map(E=>E.pz));return k.map((E,R)=>E.toAffine(T[R])).map(g.fromAffine)}static fromHex(k){const T=g.fromAffine(i(tr("pointHex",k)));return T.assertValidity(),T}static fromPrivateKey(k){return g.BASE.multiply(_(k))}_setWindowSize(k){this._WINDOW_SIZE=k,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!e.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:k,y:T}=this.toAffine();if(!e.isValid(k)||!e.isValid(T))throw new Error("bad point: x or y not FE");const E=e.sqr(T),R=o(k);if(!e.eql(E,R))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:k}=this.toAffine();if(e.isOdd)return!e.isOdd(k);throw new Error("Field doesn't support isOdd")}equals(k){f(k);const{px:T,py:E,pz:R}=this,{px:B,py:z,pz:O}=k,C=e.eql(e.mul(T,O),e.mul(B,R)),N=e.eql(e.mul(E,O),e.mul(z,R));return C&&N}negate(){return new g(this.px,e.neg(this.py),this.pz)}double(){const{a:k,b:T}=t,E=e.mul(T,Pf),{px:R,py:B,pz:z}=this;let O=e.ZERO,C=e.ZERO,N=e.ZERO,L=e.mul(R,R),J=e.mul(B,B),nt=e.mul(z,z),dt=e.mul(R,B);return dt=e.add(dt,dt),N=e.mul(R,z),N=e.add(N,N),O=e.mul(k,N),C=e.mul(E,nt),C=e.add(O,C),O=e.sub(J,C),C=e.add(J,C),C=e.mul(O,C),O=e.mul(dt,O),N=e.mul(E,N),nt=e.mul(k,nt),dt=e.sub(L,nt),dt=e.mul(k,dt),dt=e.add(dt,N),N=e.add(L,L),L=e.add(N,L),L=e.add(L,nt),L=e.mul(L,dt),C=e.add(C,L),nt=e.mul(B,z),nt=e.add(nt,nt),L=e.mul(nt,dt),O=e.sub(O,L),N=e.mul(nt,J),N=e.add(N,N),N=e.add(N,N),new g(O,C,N)}add(k){f(k);const{px:T,py:E,pz:R}=this,{px:B,py:z,pz:O}=k;let C=e.ZERO,N=e.ZERO,L=e.ZERO;const J=t.a,nt=e.mul(t.b,Pf);let dt=e.mul(T,B),D=e.mul(E,z),vt=e.mul(R,O),wt=e.add(T,E),at=e.add(B,z);wt=e.mul(wt,at),at=e.add(dt,D),wt=e.sub(wt,at),at=e.add(T,R);let ht=e.add(B,O);return at=e.mul(at,ht),ht=e.add(dt,vt),at=e.sub(at,ht),ht=e.add(E,R),C=e.add(z,O),ht=e.mul(ht,C),C=e.add(D,vt),ht=e.sub(ht,C),L=e.mul(J,at),C=e.mul(nt,vt),L=e.add(C,L),C=e.sub(D,L),L=e.add(D,L),N=e.mul(C,L),D=e.add(dt,dt),D=e.add(D,dt),vt=e.mul(J,vt),at=e.mul(nt,at),D=e.add(D,vt),vt=e.sub(dt,vt),vt=e.mul(J,vt),at=e.add(at,vt),dt=e.mul(D,at),N=e.add(N,dt),dt=e.mul(ht,at),C=e.mul(wt,C),C=e.sub(C,dt),dt=e.mul(wt,D),L=e.mul(ht,L),L=e.add(L,dt),new g(C,N,L)}subtract(k){return this.add(k.negate())}is0(){return this.equals(g.ZERO)}wNAF(k){return v.wNAFCached(this,l,k,T=>{const E=e.invertBatch(T.map(R=>R.pz));return T.map((R,B)=>R.toAffine(E[B])).map(g.fromAffine)})}multiplyUnsafe(k){const T=g.ZERO;if(k===Jn)return T;if(u(k),k===He)return this;const{endo:E}=t;if(!E)return v.unsafeLadder(this,k);let{k1neg:R,k1:B,k2neg:z,k2:O}=E.splitScalar(k),C=T,N=T,L=this;for(;B>Jn||O>Jn;)B&He&&(C=C.add(L)),O&He&&(N=N.add(L)),L=L.double(),B>>=He,O>>=He;return R&&(C=C.negate()),z&&(N=N.negate()),N=new g(e.mul(N.px,E.beta),N.py,N.pz),C.add(N)}multiply(k){u(k);let T=k,E,R;const{endo:B}=t;if(B){const{k1neg:z,k1:O,k2neg:C,k2:N}=B.splitScalar(T);let{p:L,f:J}=this.wNAF(O),{p:nt,f:dt}=this.wNAF(N);L=v.constTimeNegate(z,L),nt=v.constTimeNegate(C,nt),nt=new g(e.mul(nt.px,B.beta),nt.py,nt.pz),E=L.add(nt),R=J.add(dt)}else{const{p:z,f:O}=this.wNAF(T);E=z,R=O}return g.normalizeZ([E,R])[0]}multiplyAndAddUnsafe(k,T,E){const R=g.BASE,B=(O,C)=>C===Jn||C===He||!O.equals(R)?O.multiplyUnsafe(C):O.multiply(C),z=B(this,T).add(B(k,E));return z.is0()?void 0:z}toAffine(k){const{px:T,py:E,pz:R}=this,B=this.is0();k==null&&(k=B?e.ONE:e.inv(R));const z=e.mul(T,k),O=e.mul(E,k),C=e.mul(R,k);if(B)return{x:e.ZERO,y:e.ZERO};if(!e.eql(C,e.ONE))throw new Error("invZ was invalid");return{x:z,y:O}}isTorsionFree(){const{h:k,isTorsionFree:T}=t;if(k===He)return!0;if(T)return T(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:k,clearCofactor:T}=t;return k===He?this:T?T(g,this):this.multiplyUnsafe(t.h)}toRawBytes(k=!0){return this.assertValidity(),r(g,this,k)}toHex(k=!0){return es(this.toRawBytes(k))}}g.BASE=new g(t.Gx,t.Gy,e.ONE),g.ZERO=new g(e.ZERO,e.ONE,e.ZERO);const y=t.nBitLength,v=R0(g,t.endo?Math.ceil(y/2):y);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:_,weierstrassEquation:o,isWithinCurveOrder:a}}function P0(n){const t=kf(n);return Fs(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function F0(n){const t=P0(n),{Fp:e,n:r}=t,i=e.BYTES+1,o=2*e.BYTES+1;function a(at){return Jn<at&&at<e.ORDER}function u(at){return Be(at,r)}function _(at){return Ia(at,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:f,weierstrassEquation:g,isWithinCurveOrder:y}=k0({...t,toBytes(at,ht,mt){const Rt=ht.toAffine(),xt=e.toBytes(Rt.x),kt=Ps;return mt?kt(Uint8Array.from([ht.hasEvenY()?2:3]),xt):kt(Uint8Array.from([4]),xt,e.toBytes(Rt.y))},fromBytes(at){const ht=at.length,mt=at[0],Rt=at.subarray(1);if(ht===i&&(mt===2||mt===3)){const xt=mi(Rt);if(!a(xt))throw new Error("Point is not on curve");const kt=g(xt);let jt=e.sqrt(kt);const W=(jt&He)===He;return(mt&1)===1!==W&&(jt=e.neg(jt)),{x:xt,y:jt}}else if(ht===o&&mt===4){const xt=e.fromBytes(Rt.subarray(0,e.BYTES)),kt=e.fromBytes(Rt.subarray(e.BYTES,2*e.BYTES));return{x:xt,y:kt}}else throw new Error(`Point of length ${ht} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),v=at=>es(ns(at,t.nByteLength));function F(at){const ht=r>>He;return at>ht}function k(at){return F(at)?u(-at):at}const T=(at,ht,mt)=>mi(at.slice(ht,mt));class E{constructor(ht,mt,Rt){this.r=ht,this.s=mt,this.recovery=Rt,this.assertValidity()}static fromCompact(ht){const mt=t.nByteLength;return ht=tr("compactSignature",ht,mt*2),new E(T(ht,0,mt),T(ht,mt,2*mt))}static fromDER(ht){const{r:mt,s:Rt}=Ei.toSig(tr("DER",ht));return new E(mt,Rt)}assertValidity(){if(!y(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!y(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(ht){return new E(this.r,this.s,ht)}recoverPublicKey(ht){const{r:mt,s:Rt,recovery:xt}=this,kt=N(tr("msgHash",ht));if(xt==null||![0,1,2,3].includes(xt))throw new Error("recovery id invalid");const jt=xt===2||xt===3?mt+t.n:mt;if(jt>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const W=(xt&1)===0?"02":"03",Z=l.fromHex(W+v(jt)),rt=_(jt),gt=u(-kt*rt),G=u(Rt*rt),M=l.BASE.multiplyAndAddUnsafe(Z,gt,G);if(!M)throw new Error("point at infinify");return M.assertValidity(),M}hasHighS(){return F(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,u(-this.s),this.recovery):this}toDERRawBytes(){return rs(this.toDERHex())}toDERHex(){return Ei.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return rs(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const R={isValidPrivateKey(at){try{return f(at),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const at=Bf(t.n);return v0(t.randomBytes(at),t.n)},precompute(at=8,ht=l.BASE){return ht._setWindowSize(at),ht.multiply(BigInt(3)),ht}};function B(at,ht=!0){return l.fromPrivateKey(at).toRawBytes(ht)}function z(at){const ht=at instanceof Uint8Array,mt=typeof at=="string",Rt=(ht||mt)&&at.length;return ht?Rt===i||Rt===o:mt?Rt===2*i||Rt===2*o:at instanceof l}function O(at,ht,mt=!0){if(z(at))throw new Error("first arg must be private key");if(!z(ht))throw new Error("second arg must be public key");return l.fromHex(ht).multiply(f(at)).toRawBytes(mt)}const C=t.bits2int||function(at){const ht=mi(at),mt=at.length*8-t.nBitLength;return mt>0?ht>>BigInt(mt):ht},N=t.bits2int_modN||function(at){return u(C(at))},L=ka(t.nBitLength);function J(at){if(typeof at!="bigint")throw new Error("bigint expected");if(!(Jn<=at&&at<L))throw new Error(`bigint expected < 2^${t.nBitLength}`);return ns(at,t.nByteLength)}function nt(at,ht,mt=dt){if(["recovered","canonical"].some(ct=>ct in mt))throw new Error("sign() legacy options not supported");const{hash:Rt,randomBytes:xt}=t;let{lowS:kt,prehash:jt,extraEntropy:W}=mt;kt==null&&(kt=!0),at=tr("msgHash",at),jt&&(at=tr("prehashed msgHash",Rt(at)));const Z=N(at),rt=f(ht),gt=[J(rt),J(Z)];if(W!=null){const ct=W===!0?xt(e.BYTES):W;gt.push(tr("extraEntropy",ct))}const G=Ps(...gt),M=Z;function X(ct){const _t=C(ct);if(!y(_t))return;const x=_(_t),S=l.BASE.multiply(_t).toAffine(),et=u(S.x);if(et===Jn)return;const ft=u(x*u(M+et*rt));if(ft===Jn)return;let zt=(S.x===et?0:2)|Number(S.y&He),bt=ft;return kt&&F(ft)&&(bt=k(ft),zt^=1),new E(et,bt,zt)}return{seed:G,k2sig:X}}const dt={lowS:t.lowS,prehash:!1},D={lowS:t.lowS,prehash:!1};function vt(at,ht,mt=dt){const{seed:Rt,k2sig:xt}=nt(at,ht,mt),kt=t;return vf(kt.hash.outputLen,kt.nByteLength,kt.hmac)(Rt,xt)}l.BASE._setWindowSize(8);function wt(at,ht,mt,Rt=D){const xt=at;if(ht=tr("msgHash",ht),mt=tr("publicKey",mt),"strict"in Rt)throw new Error("options.strict was renamed to lowS");const{lowS:kt,prehash:jt}=Rt;let W,Z;try{if(typeof xt=="string"||xt instanceof Uint8Array)try{W=E.fromDER(xt)}catch(S){if(!(S instanceof Ei.Err))throw S;W=E.fromCompact(xt)}else if(typeof xt=="object"&&typeof xt.r=="bigint"&&typeof xt.s=="bigint"){const{r:S,s:et}=xt;W=new E(S,et)}else throw new Error("PARSE");Z=l.fromHex(mt)}catch(S){if(S.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(kt&&W.hasHighS())return!1;jt&&(ht=t.hash(ht));const{r:rt,s:gt}=W,G=N(ht),M=_(gt),X=u(G*M),ct=u(rt*M),_t=l.BASE.multiplyAndAddUnsafe(Z,X,ct)?.toAffine();return _t?u(_t.x)===rt:!1}return{CURVE:t,getPublicKey:B,getSharedSecret:O,sign:vt,verify:wt,ProjectivePoint:l,Signature:E,utils:R}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function I0(n){return{hash:n,hmac:(t,...e)=>Z_(n,t,Sy(...e)),randomBytes:zy}}function O0(n,t){const e=r=>F0({...n,...I0(r)});return Object.freeze({...e(t),create:e})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ff=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),If=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),T0=BigInt(1),Ta=BigInt(2),Of=(n,t)=>(n+t/Ta)/t;function C0(n){const t=Ff,e=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),u=BigInt(44),_=BigInt(88),l=n*n*n%t,f=l*l*n%t,g=Ge(f,e,t)*f%t,y=Ge(g,e,t)*f%t,v=Ge(y,Ta,t)*l%t,F=Ge(v,i,t)*v%t,k=Ge(F,o,t)*F%t,T=Ge(k,u,t)*k%t,E=Ge(T,_,t)*T%t,R=Ge(E,u,t)*k%t,B=Ge(R,e,t)*f%t,z=Ge(B,a,t)*F%t,O=Ge(z,r,t)*l%t,C=Ge(O,Ta,t);if(!Ca.eql(Ca.sqr(C),n))throw new Error("Cannot find square root");return C}const Ca=E0(Ff,void 0,void 0,{sqrt:C0}),fi=O0({a:BigInt(0),b:BigInt(7),Fp:Ca,n:If,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const t=If,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-T0*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=e,a=BigInt("0x100000000000000000000000000000000"),u=Of(o*n,t),_=Of(-r*n,t);let l=Be(n-u*e-_*i,t),f=Be(-u*r-_*o,t);const g=l>a,y=f>a;if(g&&(l=t-l),y&&(f=t-f),l>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:g,k1:l,k2neg:y,k2:f}}}},tf);BigInt(0),fi.ProjectivePoint;const Is="0x0000000000000000000000000000000000000000",Tf="0x0000000000000000000000000000000000000000000000000000000000000000",Cf=BigInt(0),Nf=BigInt(1),Lf=BigInt(2),Df=BigInt(27),Uf=BigInt(28),Ao=BigInt(35),is={};function Mf(n){return qn(he(n),32)}class se{#t;#e;#r;#n;get r(){return this.#t}set r(t){V(Yi(t)===32,"invalid r","value",t),this.#t=yt(t)}get s(){return V(parseInt(this.#e.substring(0,3))<8,"non-canonical s; use ._s","s",this.#e),this.#e}set s(t){V(Yi(t)===32,"invalid s","value",t),this.#e=yt(t)}get _s(){return this.#e}isValid(){return parseInt(this.#e.substring(0,3))<8}get v(){return this.#r}set v(t){const e=Tt(t,"value");V(e===27||e===28,"invalid v","v",t),this.#r=e}get networkV(){return this.#n}get legacyChainId(){const t=this.networkV;return t==null?null:se.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){const t=Ot(this.s);return this.yParity&&(t[0]|=128),yt(t)}get compactSerialized(){return ne([this.r,this.yParityAndS])}get serialized(){return ne([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(t,e,r,i){co(t,is,"Signature"),this.#t=e,this.#e=r,this.#r=i,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this._s}"${this.isValid()?"":', valid: "false"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new se(is,this.r,this._s,this.v);return this.networkV&&(t.#n=this.networkV),t}toJSON(){const t=this.networkV;return{_type:"signature",networkV:t!=null?t.toString():null,r:this.r,s:this._s,v:this.v}}static getChainId(t){const e=Et(t,"v");return e==Df||e==Uf?Cf:(V(e>=Ao,"invalid EIP-155 v","v",t),(e-Ao)/Lf)}static getChainIdV(t,e){return Et(t)*Lf+BigInt(35+e-27)}static getNormalizedV(t){const e=Et(t);return e===Cf||e===Df?27:e===Nf||e===Uf?28:(V(e>=Ao,"invalid v","v",t),e&Nf?27:28)}static from(t){function e(l,f){V(l,f,"signature",t)}if(t==null)return new se(is,Tf,Tf,27);if(typeof t=="string"){const l=Ot(t,"signature");if(l.length===64){const f=yt(l.slice(0,32)),g=l.slice(32,64),y=g[0]&128?28:27;return g[0]&=127,new se(is,f,yt(g),y)}if(l.length===65){const f=yt(l.slice(0,32)),g=yt(l.slice(32,64)),y=se.getNormalizedV(l[64]);return new se(is,f,g,y)}e(!1,"invalid raw signature length")}if(t instanceof se)return t.clone();const r=t.r;e(r!=null,"missing r");const i=Mf(r),o=function(l,f){if(l!=null)return Mf(l);if(f!=null){e($t(f,32),"invalid yParityAndS");const g=Ot(f);return g[0]&=127,yt(g)}e(!1,"missing s")}(t.s,t.yParityAndS),{networkV:a,v:u}=function(l,f,g){if(l!=null){const y=Et(l);return{networkV:y>=Ao?y:void 0,v:se.getNormalizedV(y)}}if(f!=null)return e($t(f,32),"invalid yParityAndS"),{v:Ot(f)[0]&128?28:27};if(g!=null){switch(Tt(g,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}e(!1,"invalid yParity")}e(!1,"missing v")}(t.v,t.yParityAndS,t.yParity),_=new se(is,i,o,u);return a&&(_.#n=a),e(t.yParity==null||Tt(t.yParity,"sig.yParity")===_.yParity,"yParity mismatch"),e(t.yParityAndS==null||t.yParityAndS===_.yParityAndS,"yParityAndS mismatch"),_}}class $n{#t;constructor(t){V(Yi(t)===32,"invalid private key","privateKey","[REDACTED]"),this.#t=yt(t)}get privateKey(){return this.#t}get publicKey(){return $n.computePublicKey(this.#t)}get compressedPublicKey(){return $n.computePublicKey(this.#t,!0)}sign(t){V(Yi(t)===32,"invalid digest length","digest",t);const e=fi.sign(ve(t),ve(this.#t),{lowS:!0});return se.from({r:ii(e.r,32),s:ii(e.s,32),v:e.recovery?28:27})}computeSharedSecret(t){const e=$n.computePublicKey(t);return yt(fi.getSharedSecret(ve(this.#t),Ot(e),!1))}static computePublicKey(t,e){let r=Ot(t,"key");if(r.length===32){const o=fi.getPublicKey(r,!!e);return yt(o)}if(r.length===64){const o=new Uint8Array(65);o[0]=4,o.set(r,1),r=o}const i=fi.ProjectivePoint.fromHex(r);return yt(i.toRawBytes(e))}static recoverPublicKey(t,e){V(Yi(t)===32,"invalid digest length","digest",t);const r=se.from(e);let i=fi.Signature.fromCompact(ve(ne([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const o=i.recoverPublicKey(ve(t));return V(o!=null,"invalid signature for digest","signature",e),"0x"+o.toHex(!1)}static addPoints(t,e,r){const i=fi.ProjectivePoint.fromHex($n.computePublicKey(t).substring(2)),o=fi.ProjectivePoint.fromHex($n.computePublicKey(e).substring(2));return"0x"+i.add(o).toHex(!!r)}}const N0=BigInt(0),L0=BigInt(36);function jf(n){n=n.toLowerCase();const t=n.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const r=Ot(fe(e));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(r[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Na={};for(let n=0;n<10;n++)Na[String(n)]=String(n);for(let n=0;n<26;n++)Na[String.fromCharCode(65+n)]=String(10+n);const Gf=15;function D0(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let t=n.split("").map(r=>Na[r]).join("");for(;t.length>=Gf;){let r=t.substring(0,Gf);t=parseInt(r,10)%97+t.substring(r.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}const U0=function(){const n={};for(let t=0;t<36;t++){const e="0123456789abcdefghijklmnopqrstuvwxyz"[t];n[e]=BigInt(t)}return n}();function M0(n){n=n.toLowerCase();let t=N0;for(let e=0;e<n.length;e++)t=t*L0+U0[n[e]];return t}function Ut(n){if(V(typeof n=="string","invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/)){n.startsWith("0x")||(n="0x"+n);const t=jf(n);return V(!n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===n,"bad address checksum","address",n),t}if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){V(n.substring(2,4)===D0(n),"bad icap checksum","address",n);let t=M0(n.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return jf("0x"+t)}V(!1,"invalid address","address",n)}function j0(n){const t=Ut(n.from);let r=Et(n.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,Ut(ie(fe(oi([t,r])),12))}function Hf(n){return n&&typeof n.getAddress=="function"}function Ve(n){try{return Ut(n),!0}catch{}return!1}async function La(n,t){const e=await t;return(e==null||e==="0x0000000000000000000000000000000000000000")&&(ut(typeof n!="string","unconfigured name","UNCONFIGURED_NAME",{value:n}),V(!1,"invalid AddressLike value; did not resolve to a value address","target",n)),Ut(e)}function Re(n,t){if(typeof n=="string")return n.match(/^0x[0-9a-f]{40}$/i)?Ut(n):(ut(t!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),La(n,t.resolveName(n)));if(Hf(n))return La(n,n.getAddress());if(n&&typeof n.then=="function")return La(n,n);V(!1,"unsupported addressable value","target",n)}const Yn={};function At(n,t){let e=!1;return t<0&&(e=!0,t*=-1),new oe(Yn,`${e?"":"u"}int${t}`,n,{signed:e,width:t})}function Mt(n,t){return new oe(Yn,`bytes${t||""}`,n,{size:t})}const Vf=Symbol.for("_ethers_typed");class oe{type;value;#t;_typedSymbol;constructor(t,e,r,i){i==null&&(i=null),co(Yn,t,"Typed"),St(this,{_typedSymbol:Vf,type:e,value:r}),this.#t=i,this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(t=>t.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return this.#t}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return this.#t===!0?-1:this.#t===!1?this.value.length:null}static from(t,e){return new oe(Yn,t,e)}static uint8(t){return At(t,8)}static uint16(t){return At(t,16)}static uint24(t){return At(t,24)}static uint32(t){return At(t,32)}static uint40(t){return At(t,40)}static uint48(t){return At(t,48)}static uint56(t){return At(t,56)}static uint64(t){return At(t,64)}static uint72(t){return At(t,72)}static uint80(t){return At(t,80)}static uint88(t){return At(t,88)}static uint96(t){return At(t,96)}static uint104(t){return At(t,104)}static uint112(t){return At(t,112)}static uint120(t){return At(t,120)}static uint128(t){return At(t,128)}static uint136(t){return At(t,136)}static uint144(t){return At(t,144)}static uint152(t){return At(t,152)}static uint160(t){return At(t,160)}static uint168(t){return At(t,168)}static uint176(t){return At(t,176)}static uint184(t){return At(t,184)}static uint192(t){return At(t,192)}static uint200(t){return At(t,200)}static uint208(t){return At(t,208)}static uint216(t){return At(t,216)}static uint224(t){return At(t,224)}static uint232(t){return At(t,232)}static uint240(t){return At(t,240)}static uint248(t){return At(t,248)}static uint256(t){return At(t,256)}static uint(t){return At(t,256)}static int8(t){return At(t,-8)}static int16(t){return At(t,-16)}static int24(t){return At(t,-24)}static int32(t){return At(t,-32)}static int40(t){return At(t,-40)}static int48(t){return At(t,-48)}static int56(t){return At(t,-56)}static int64(t){return At(t,-64)}static int72(t){return At(t,-72)}static int80(t){return At(t,-80)}static int88(t){return At(t,-88)}static int96(t){return At(t,-96)}static int104(t){return At(t,-104)}static int112(t){return At(t,-112)}static int120(t){return At(t,-120)}static int128(t){return At(t,-128)}static int136(t){return At(t,-136)}static int144(t){return At(t,-144)}static int152(t){return At(t,-152)}static int160(t){return At(t,-160)}static int168(t){return At(t,-168)}static int176(t){return At(t,-176)}static int184(t){return At(t,-184)}static int192(t){return At(t,-192)}static int200(t){return At(t,-200)}static int208(t){return At(t,-208)}static int216(t){return At(t,-216)}static int224(t){return At(t,-224)}static int232(t){return At(t,-232)}static int240(t){return At(t,-240)}static int248(t){return At(t,-248)}static int256(t){return At(t,-256)}static int(t){return At(t,-256)}static bytes1(t){return Mt(t,1)}static bytes2(t){return Mt(t,2)}static bytes3(t){return Mt(t,3)}static bytes4(t){return Mt(t,4)}static bytes5(t){return Mt(t,5)}static bytes6(t){return Mt(t,6)}static bytes7(t){return Mt(t,7)}static bytes8(t){return Mt(t,8)}static bytes9(t){return Mt(t,9)}static bytes10(t){return Mt(t,10)}static bytes11(t){return Mt(t,11)}static bytes12(t){return Mt(t,12)}static bytes13(t){return Mt(t,13)}static bytes14(t){return Mt(t,14)}static bytes15(t){return Mt(t,15)}static bytes16(t){return Mt(t,16)}static bytes17(t){return Mt(t,17)}static bytes18(t){return Mt(t,18)}static bytes19(t){return Mt(t,19)}static bytes20(t){return Mt(t,20)}static bytes21(t){return Mt(t,21)}static bytes22(t){return Mt(t,22)}static bytes23(t){return Mt(t,23)}static bytes24(t){return Mt(t,24)}static bytes25(t){return Mt(t,25)}static bytes26(t){return Mt(t,26)}static bytes27(t){return Mt(t,27)}static bytes28(t){return Mt(t,28)}static bytes29(t){return Mt(t,29)}static bytes30(t){return Mt(t,30)}static bytes31(t){return Mt(t,31)}static bytes32(t){return Mt(t,32)}static address(t){return new oe(Yn,"address",t)}static bool(t){return new oe(Yn,"bool",!!t)}static bytes(t){return new oe(Yn,"bytes",t)}static string(t){return new oe(Yn,"string",t)}static array(t,e){throw new Error("not implemented yet")}static tuple(t,e){throw new Error("not implemented yet")}static overrides(t){return new oe(Yn,"overrides",Object.assign({},t))}static isTyped(t){return t&&typeof t=="object"&&"_typedSymbol"in t&&t._typedSymbol===Vf}static dereference(t,e){if(oe.isTyped(t)){if(t.type!==e)throw new Error(`invalid type: expecetd ${e}, got ${t.type}`);return t.value}return t}}class G0 extends Wn{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){let r=oe.dereference(e,"string");try{r=Ut(r)}catch(i){return this._throwError(i.message,e)}return t.writeValue(r)}decode(t){return Ut(ii(t.readValue(),20))}}class H0 extends Wn{coder;constructor(t){super(t.name,t.type,"_",t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}function qf(n,t,e){let r=[];if(Array.isArray(e))r=e;else if(e&&typeof e=="object"){let _={};r=t.map(l=>{const f=l.localName;return ut(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),ut(!_[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),_[f]=!0,e[f]})}else V(!1,"invalid tuple value","tuple",e);V(t.length===r.length,"types/value length mismatch","tuple",e);let i=new ga,o=new ga,a=[];t.forEach((_,l)=>{let f=r[l];if(_.dynamic){let g=o.length;_.encode(o,f);let y=i.writeUpdatableValue();a.push(v=>{y(v+g)})}else _.encode(i,f)}),a.forEach(_=>{_(i.length)});let u=n.appendWriter(i);return u+=n.appendWriter(o),u}function Qf(n,t){let e=[],r=[],i=n.subReader(0);return t.forEach(o=>{let a=null;if(o.dynamic){let u=n.readIndex(),_=i.subReader(u);try{a=o.decode(_)}catch(l){if(me(l,"BUFFER_OVERRUN"))throw l;a=l,a.baseType=o.name,a.name=o.localName,a.type=o.type}}else try{a=o.decode(n)}catch(u){if(me(u,"BUFFER_OVERRUN"))throw u;a=u,a.baseType=o.name,a.name=o.localName,a.type=o.type}if(a==null)throw new Error("investigate");e.push(a),r.push(o.localName||null)}),Kn.fromItems(e,r)}class V0 extends Wn{coder;length;constructor(t,e,r){const i=t.type+"["+(e>=0?e:"")+"]",o=e===-1||t.dynamic;super("array",i,r,o),St(this,{coder:t,length:e})}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){const r=oe.dereference(e,"array");Array.isArray(r)||this._throwError("expected array value",r);let i=this.length;i===-1&&(i=r.length,t.writeValue(r.length)),x_(r.length,i,"coder array"+(this.localName?" "+this.localName:""));let o=[];for(let a=0;a<r.length;a++)o.push(this.coder);return qf(t,o,r)}decode(t){let e=this.length;e===-1&&(e=t.readIndex(),ut(e*xe<=t.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:t.bytes,offset:e*xe,length:t.dataLength}));let r=[];for(let i=0;i<e;i++)r.push(new H0(this.coder));return Qf(t,r)}}class q0 extends Wn{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){const r=oe.dereference(e,"bool");return t.writeValue(r?1:0)}decode(t){return!!t.readValue()}}class Kf extends Wn{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=ve(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readIndex(),!0)}}class Q0 extends Kf{constructor(t){super("bytes",t)}decode(t){return yt(super.decode(t))}}class K0 extends Wn{size;constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),St(this,{size:t},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(t,e){let r=ve(oe.dereference(e,this.type));return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return yt(t.readBytes(this.size))}}const W0=new Uint8Array([]);class J0 extends Wn{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return e!=null&&this._throwError("not null",e),t.writeBytes(W0)}decode(t){return t.readBytes(0),null}}const $0=BigInt(0),Y0=BigInt(1),Z0=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class X0 extends Wn{size;signed;constructor(t,e,r){const i=(e?"int":"uint")+t*8;super(i,i,r,!1),St(this,{size:t,signed:e},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(t,e){let r=Et(oe.dereference(e,this.type)),i=Ss(Z0,xe*8);if(this.signed){let o=Ss(i,this.size*8-1);(r>o||r<-(o+Y0))&&this._throwError("value out-of-bounds",e),r=B_(r,8*xe)}else(r<$0||r>Ss(i,this.size*8))&&this._throwError("value out-of-bounds",e);return t.writeValue(r)}decode(t){let e=Ss(t.readValue(),this.size*8);return this.signed&&(e=iy(e,this.size*8)),e}}class tb extends Kf{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,Qn(oe.dereference(e,"string")))}decode(t){return fo(super.decode(t))}}class Eo extends Wn{coders;constructor(t,e){let r=!1;const i=[];t.forEach(a=>{a.dynamic&&(r=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,e,r),St(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(r=>{t.push(r.defaultValue())});const e=this.coders.reduce((r,i)=>{const o=i.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});return this.coders.forEach((r,i)=>{let o=r.localName;!o||e[o]!==1||(o==="length"&&(o="_length"),t[o]==null&&(t[o]=t[i]))}),Object.freeze(t)}encode(t,e){const r=oe.dereference(e,"tuple");return qf(t,this.coders,r)}decode(t){return Qf(t,this.coders)}}function Da(n,t){return{address:Ut(n),storageKeys:t.map((e,r)=>(V($t(e,32),"invalid slot",`storageKeys[${r}]`,e),e.toLowerCase()))}}function vi(n){if(Array.isArray(n))return n.map((e,r)=>Array.isArray(e)?(V(e.length===2,"invalid slot set",`value[${r}]`,e),Da(e[0],e[1])):(V(e!=null&&typeof e=="object","invalid address-slot set","value",n),Da(e.address,e.storageKeys)));V(n!=null&&typeof n=="object","invalid access list","value",n);const t=Object.keys(n).map(e=>{const r=n[e].reduce((i,o)=>(i[o]=!0,i),{});return Da(e,Object.keys(r).sort())});return t.sort((e,r)=>e.address.localeCompare(r.address)),t}function Wf(n){return{address:Ut(n.address),nonce:Et(n.nonce!=null?n.nonce:0),chainId:Et(n.chainId!=null?n.chainId:0),signature:se.from(n.signature)}}function eb(n){let t;return typeof n=="string"?t=$n.computePublicKey(n,!1):t=n.publicKey,Ut(fe("0x"+t.substring(4)).substring(26))}function Jf(n,t){return eb($n.recoverPublicKey(n,t))}const be=BigInt(0),rb=BigInt(2),nb=BigInt(27),ib=BigInt(28),sb=BigInt(35),ob=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ua=4096*32;function ab(n){return{blobToKzgCommitment:r=>{if("computeBlobProof"in n){if("blobToKzgCommitment"in n&&typeof n.blobToKzgCommitment=="function")return Ot(n.blobToKzgCommitment(yt(r)))}else if("blobToKzgCommitment"in n&&typeof n.blobToKzgCommitment=="function")return Ot(n.blobToKzgCommitment(r));if("blobToKZGCommitment"in n&&typeof n.blobToKZGCommitment=="function")return Ot(n.blobToKZGCommitment(yt(r)));V(!1,"unsupported KZG library","kzg",n)},computeBlobKzgProof:(r,i)=>{if("computeBlobProof"in n&&typeof n.computeBlobProof=="function")return Ot(n.computeBlobProof(yt(r),yt(i)));if("computeBlobKzgProof"in n&&typeof n.computeBlobKzgProof=="function")return n.computeBlobKzgProof(r,i);if("computeBlobKZGProof"in n&&typeof n.computeBlobKZGProof=="function")return Ot(n.computeBlobKZGProof(yt(r),yt(i)));V(!1,"unsupported KZG library","kzg",n)}}}function $f(n,t){let e=n.toString(16);for(;e.length<2;)e="0"+e;return e+=ts(t).substring(4),"0x"+e}function ss(n){return n==="0x"?null:Ut(n)}function vo(n,t){try{return vi(n)}catch(e){V(!1,e.message,t,n)}}function cb(n,t){try{if(!Array.isArray(n))throw new Error("authorizationList: invalid array");const e=[];for(let r=0;r<n.length;r++){const i=n[r];if(!Array.isArray(i))throw new Error(`authorization[${r}]: invalid array`);if(i.length!==6)throw new Error(`authorization[${r}]: wrong length`);if(!i[1])throw new Error(`authorization[${r}]: null address`);e.push({address:ss(i[1]),nonce:Kt(i[2],"nonce"),chainId:Kt(i[0],"chainId"),signature:se.from({yParity:xi(i[3],"yParity"),r:qn(i[4],32),s:qn(i[5],32)})})}return e}catch(e){V(!1,e.message,t,n)}}function xi(n,t){return n==="0x"?0:Tt(n,t)}function Kt(n,t){if(n==="0x")return be;const e=Et(n,t);return V(e<=ob,"value exceeds uint size",t,e),e}function Nt(n,t){const e=Et(n,"value"),r=he(e);return V(r.length<=32,"value too large",`tx.${t}`,e),r}function xo(n){return vi(n).map(t=>[t.address,t.storageKeys])}function ub(n){return n.map(t=>[Nt(t.chainId,"chainId"),t.address,Nt(t.nonce,"nonce"),Nt(t.signature.yParity,"yParity"),he(t.signature.r),he(t.signature.s)])}function _b(n,t){V(Array.isArray(n),`invalid ${t}`,"value",n);for(let e=0;e<n.length;e++)V($t(n[e],32),"invalid ${ param } hash",`value[${e}]`,n[e]);return n}function fb(n){const t=zs(n);V(Array.isArray(t)&&(t.length===9||t.length===6),"invalid field count for legacy transaction","data",n);const e={type:0,nonce:xi(t[0],"nonce"),gasPrice:Kt(t[1],"gasPrice"),gasLimit:Kt(t[2],"gasLimit"),to:ss(t[3]),value:Kt(t[4],"value"),data:yt(t[5]),chainId:be};if(t.length===6)return e;const r=Kt(t[6],"v"),i=Kt(t[7],"r"),o=Kt(t[8],"s");if(i===be&&o===be)e.chainId=r;else{let a=(r-sb)/rb;a<be&&(a=be),e.chainId=a,V(a!==be||r===nb||r===ib,"non-canonical legacy v","v",t[6]),e.signature=se.from({r:qn(t[7],32),s:qn(t[8],32),v:r})}return e}function lb(n,t){const e=[Nt(n.nonce,"nonce"),Nt(n.gasPrice||0,"gasPrice"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data];let r=be;if(n.chainId!=be)r=Et(n.chainId,"tx.chainId"),V(!t||t.networkV==null||t.legacyChainId===r,"tx.chainId/sig.v mismatch","sig",t);else if(n.signature){const o=n.signature.legacyChainId;o!=null&&(r=o)}if(!t)return r!==be&&(e.push(he(r)),e.push("0x"),e.push("0x")),oi(e);let i=BigInt(27+t.yParity);return r!==be?i=se.getChainIdV(r,t.v):BigInt(t.v)!==i&&V(!1,"tx.chainId/sig.v mismatch","sig",t),e.push(he(i)),e.push(he(t.r)),e.push(he(t.s)),oi(e)}function Ro(n,t){let e;try{if(e=xi(t[0],"yParity"),e!==0&&e!==1)throw new Error("bad yParity")}catch{V(!1,"invalid yParity","yParity",t[0])}const r=qn(t[1],32),i=qn(t[2],32),o=se.from({r,s:i,yParity:e});n.signature=o}function hb(n){const t=zs(Ot(n).slice(1));V(Array.isArray(t)&&(t.length===9||t.length===12),"invalid field count for transaction type: 2","data",yt(n));const e={type:2,chainId:Kt(t[0],"chainId"),nonce:xi(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ss(t[5]),value:Kt(t[6],"value"),data:yt(t[7]),accessList:vo(t[8],"accessList")};return t.length===9||Ro(e,t.slice(9)),e}function pb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,xo(n.accessList||[])];return t&&(e.push(Nt(t.yParity,"yParity")),e.push(he(t.r)),e.push(he(t.s))),ne(["0x02",oi(e)])}function db(n){const t=zs(Ot(n).slice(1));V(Array.isArray(t)&&(t.length===8||t.length===11),"invalid field count for transaction type: 1","data",yt(n));const e={type:1,chainId:Kt(t[0],"chainId"),nonce:xi(t[1],"nonce"),gasPrice:Kt(t[2],"gasPrice"),gasLimit:Kt(t[3],"gasLimit"),to:ss(t[4]),value:Kt(t[5],"value"),data:yt(t[6]),accessList:vo(t[7],"accessList")};return t.length===8||Ro(e,t.slice(8)),e}function wb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.gasPrice||0,"gasPrice"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,xo(n.accessList||[])];return t&&(e.push(Nt(t.yParity,"recoveryParam")),e.push(he(t.r)),e.push(he(t.s))),ne(["0x01",oi(e)])}function gb(n){let t=zs(Ot(n).slice(1)),e="3",r=null;if(t.length===4&&Array.isArray(t[0])){e="3 (network format)";const o=t[1],a=t[2],u=t[3];V(Array.isArray(o),"invalid network format: blobs not an array","fields[1]",o),V(Array.isArray(a),"invalid network format: commitments not an array","fields[2]",a),V(Array.isArray(u),"invalid network format: proofs not an array","fields[3]",u),V(o.length===a.length,"invalid network format: blobs/commitments length mismatch","fields",t),V(o.length===u.length,"invalid network format: blobs/proofs length mismatch","fields",t),r=[];for(let _=0;_<t[1].length;_++)r.push({data:o[_],commitment:a[_],proof:u[_]});t=t[0]}V(Array.isArray(t)&&(t.length===11||t.length===14),`invalid field count for transaction type: ${e}`,"data",yt(n));const i={type:3,chainId:Kt(t[0],"chainId"),nonce:xi(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ss(t[5]),value:Kt(t[6],"value"),data:yt(t[7]),accessList:vo(t[8],"accessList"),maxFeePerBlobGas:Kt(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};r&&(i.blobs=r),V(i.to!=null,`invalid address for transaction type: ${e}`,"data",n),V(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",n);for(let o=0;o<i.blobVersionedHashes.length;o++)V($t(i.blobVersionedHashes[o],32),`invalid blobVersionedHash at index ${o}: must be length 32`,"data",n);return t.length===11||Ro(i,t.slice(11)),i}function yb(n,t,e){const r=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||Is,Nt(n.value,"value"),n.data,xo(n.accessList||[]),Nt(n.maxFeePerBlobGas||0,"maxFeePerBlobGas"),_b(n.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(r.push(Nt(t.yParity,"yParity")),r.push(he(t.r)),r.push(he(t.s)),e)?ne(["0x03",oi([r,e.map(i=>i.data),e.map(i=>i.commitment),e.map(i=>i.proof)])]):ne(["0x03",oi(r)])}function bb(n){const t=zs(Ot(n).slice(1));V(Array.isArray(t)&&(t.length===10||t.length===13),"invalid field count for transaction type: 4","data",yt(n));const e={type:4,chainId:Kt(t[0],"chainId"),nonce:xi(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ss(t[5]),value:Kt(t[6],"value"),data:yt(t[7]),accessList:vo(t[8],"accessList"),authorizationList:cb(t[9],"authorizationList")};return t.length===10||Ro(e,t.slice(10)),e}function mb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,xo(n.accessList||[]),ub(n.authorizationList||[])];return t&&(e.push(Nt(t.yParity,"yParity")),e.push(he(t.r)),e.push(he(t.s))),ne(["0x04",oi(e)])}class er{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#d;#c;#_;#f;#l;#g;get type(){return this.#t}set type(t){switch(t){case null:this.#t=null;break;case 0:case"legacy":this.#t=0;break;case 1:case"berlin":case"eip-2930":this.#t=1;break;case 2:case"london":case"eip-1559":this.#t=2;break;case 3:case"cancun":case"eip-4844":this.#t=3;break;case 4:case"pectra":case"eip-7702":this.#t=4;break;default:V(!1,"unsupported transaction type","type",t)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const t=this.#e;return t==null&&this.type===3?Is:t}set to(t){this.#e=t==null?null:Ut(t)}get nonce(){return this.#n}set nonce(t){this.#n=Tt(t,"value")}get gasLimit(){return this.#i}set gasLimit(t){this.#i=Et(t)}get gasPrice(){const t=this.#o;return t==null&&(this.type===0||this.type===1)?be:t}set gasPrice(t){this.#o=t==null?null:Et(t,"gasPrice")}get maxPriorityFeePerGas(){const t=this.#s;return t??(this.type===2||this.type===3?be:null)}set maxPriorityFeePerGas(t){this.#s=t==null?null:Et(t,"maxPriorityFeePerGas")}get maxFeePerGas(){const t=this.#a;return t??(this.type===2||this.type===3?be:null)}set maxFeePerGas(t){this.#a=t==null?null:Et(t,"maxFeePerGas")}get data(){return this.#r}set data(t){this.#r=yt(t)}get value(){return this.#h}set value(t){this.#h=Et(t,"value")}get chainId(){return this.#u}set chainId(t){this.#u=Et(t)}get signature(){return this.#p||null}set signature(t){this.#p=t==null?null:se.from(t)}get accessList(){const t=this.#d||null;return t??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(t){this.#d=t==null?null:vi(t)}get authorizationList(){const t=this.#g||null;return t==null&&this.type===4?[]:t}set authorizationList(t){this.#g=t==null?null:t.map(e=>Wf(e))}get maxFeePerBlobGas(){const t=this.#c;return t==null&&this.type===3?be:t}set maxFeePerBlobGas(t){this.#c=t==null?null:Et(t,"maxFeePerBlobGas")}get blobVersionedHashes(){let t=this.#_;return t==null&&this.type===3?[]:t}set blobVersionedHashes(t){if(t!=null){V(Array.isArray(t),"blobVersionedHashes must be an Array","value",t),t=t.slice();for(let e=0;e<t.length;e++)V($t(t[e],32),"invalid blobVersionedHash",`value[${e}]`,t[e])}this.#_=t}get blobs(){return this.#l==null?null:this.#l.map(t=>Object.assign({},t))}set blobs(t){if(t==null){this.#l=null;return}const e=[],r=[];for(let i=0;i<t.length;i++){const o=t[i];if(la(o)){ut(this.#f,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let a=Ot(o);if(V(a.length<=Ua,"blob is too large",`blobs[${i}]`,o),a.length!==Ua){const l=new Uint8Array(Ua);l.set(a),a=l}const u=this.#f.blobToKzgCommitment(a),_=yt(this.#f.computeBlobKzgProof(a,u));e.push({data:yt(a),commitment:yt(u),proof:_}),r.push($f(1,u))}else{const a=yt(o.commitment);e.push({data:yt(o.data),commitment:a,proof:yt(o.proof)}),r.push($f(1,a))}}this.#l=e,this.#_=r}get kzg(){return this.#f}set kzg(t){t==null?this.#f=null:this.#f=ab(t)}constructor(){this.#t=null,this.#e=null,this.#n=0,this.#i=be,this.#o=null,this.#s=null,this.#a=null,this.#r="0x",this.#h=be,this.#u=be,this.#p=null,this.#d=null,this.#c=null,this.#_=null,this.#f=null,this.#l=null,this.#g=null}get hash(){return this.signature==null?null:fe(this.#w(!0,!1))}get unsignedHash(){return fe(this.unsignedSerialized)}get from(){return this.signature==null?null:Jf(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:$n.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}#w(t,e){ut(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=t?this.signature:null;switch(this.inferType()){case 0:return lb(this,r);case 1:return wb(this,r);case 2:return pb(this,r);case 3:return yb(this,r,e?this.blobs:null);case 4:return mb(this,r)}ut(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#w(!0,!0)}get unsignedSerialized(){return this.#w(!1,!1)}inferType(){const t=this.inferTypes();return t.indexOf(2)>=0?2:t.pop()}inferTypes(){const t=this.gasPrice!=null,e=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,r=this.accessList!=null,i=this.#c!=null||this.#_;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ut(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ut(!e||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ut(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const o=[];return this.type!=null?o.push(this.type):this.authorizationList&&this.authorizationList.length?o.push(4):e?o.push(2):t?(o.push(1),r||o.push(0)):r?(o.push(1),o.push(2)):(i&&this.to||(o.push(0),o.push(1),o.push(2)),o.push(3)),o.sort(),o}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return er.from(this)}toJSON(){const t=e=>e==null?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(t==null)return new er;if(typeof t=="string"){const r=Ot(t);if(r[0]>=127)return er.from(fb(r));switch(r[0]){case 1:return er.from(db(r));case 2:return er.from(hb(r));case 3:return er.from(gb(r));case 4:return er.from(bb(r))}ut(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const e=new er;return t.type!=null&&(e.type=t.type),t.to!=null&&(e.to=t.to),t.nonce!=null&&(e.nonce=t.nonce),t.gasLimit!=null&&(e.gasLimit=t.gasLimit),t.gasPrice!=null&&(e.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(e.maxFeePerGas=t.maxFeePerGas),t.maxFeePerBlobGas!=null&&(e.maxFeePerBlobGas=t.maxFeePerBlobGas),t.data!=null&&(e.data=t.data),t.value!=null&&(e.value=t.value),t.chainId!=null&&(e.chainId=t.chainId),t.signature!=null&&(e.signature=se.from(t.signature)),t.accessList!=null&&(e.accessList=t.accessList),t.authorizationList!=null&&(e.authorizationList=t.authorizationList),t.blobVersionedHashes!=null&&(e.blobVersionedHashes=t.blobVersionedHashes),t.kzg!=null&&(e.kzg=t.kzg),t.blobs!=null&&(e.blobs=t.blobs),t.hash!=null&&(V(e.isSigned(),"unsigned transaction cannot define '.hash'","tx",t),V(e.hash===t.hash,"hash mismatch","tx",t)),t.from!=null&&(V(e.isSigned(),"unsigned transaction cannot define '.from'","tx",t),V(e.from.toLowerCase()===(t.from||"").toLowerCase(),"from mismatch","tx",t)),e}}function Ri(n){return fe(Qn(n))}var Ab="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";const Yf=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Zf=4;function Eb(n){let t=0;function e(){return n[t++]<<8|n[t++]}let r=e(),i=1,o=[0,1];for(let O=1;O<r;O++)o.push(i+=e());let a=e(),u=t;t+=a;let _=0,l=0;function f(){return _==0&&(l=l<<8|n[t++],_=8),l>>--_&1}const g=31,y=2**g,v=y>>>1,F=v>>1,k=y-1;let T=0;for(let O=0;O<g;O++)T=T<<1|f();let E=[],R=0,B=y;for(;;){let O=Math.floor(((T-R+1)*i-1)/B),C=0,N=r;for(;N-C>1;){let nt=C+N>>>1;O<o[nt]?N=nt:C=nt}if(C==0)break;E.push(C);let L=R+Math.floor(B*o[C]/i),J=R+Math.floor(B*o[C+1]/i)-1;for(;((L^J)&v)==0;)T=T<<1&k|f(),L=L<<1&k,J=J<<1&k|1;for(;L&~J&F;)T=T&v|T<<1&k>>>1|f(),L=L<<1^v,J=(J^v)<<1|v|1;R=L,B=1+J-L}let z=r-4;return E.map(O=>{switch(O-z){case 3:return z+65792+(n[u++]<<16|n[u++]<<8|n[u++]);case 2:return z+256+(n[u++]<<8|n[u++]);case 1:return z+n[u++];default:return O-1}})}function vb(n){let t=0;return()=>n[t++]}function Xf(n){return vb(Eb(xb(n)))}function xb(n){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,o)=>t[i.charCodeAt(0)]=o);let e=n.length,r=new Uint8Array(6*e>>3);for(let i=0,o=0,a=0,u=0;i<e;i++)u=u<<6|t[n.charCodeAt(i)],a+=6,a>=8&&(r[o++]=u>>(a-=8));return r}function Rb(n){return n&1?~n>>1:n>>1}function Sb(n,t){let e=Array(n);for(let r=0,i=0;r<n;r++)e[r]=i+=Rb(t());return e}function Os(n,t=0){let e=[];for(;;){let r=n(),i=n();if(!i)break;t+=r;for(let o=0;o<i;o++)e.push(t+o);t+=i+1}return e}function tl(n){return Ts(()=>{let t=Os(n);if(t.length)return t})}function el(n){let t=[];for(;;){let e=n();if(e==0)break;t.push(zb(e,n))}for(;;){let e=n()-1;if(e<0)break;t.push(Bb(e,n))}return t.flat()}function Ts(n){let t=[];for(;;){let e=n(t.length);if(!e)break;t.push(e)}return t}function rl(n,t,e){let r=Array(n).fill().map(()=>[]);for(let i=0;i<t;i++)Sb(n,e).forEach((o,a)=>r[a].push(o));return r}function zb(n,t){let e=1+t(),r=t(),i=Ts(t);return rl(i.length,1+n,t).flatMap((a,u)=>{let[_,...l]=a;return Array(i[u]).fill().map((f,g)=>{let y=g*r;return[_+g*e,l.map(v=>v+y)]})})}function Bb(n,t){let e=1+t();return rl(e,1+n,t).map(i=>[i[0],i.slice(1)])}function kb(n){let t=[],e=Os(n);return i(r([]),[]),t;function r(o){let a=n(),u=Ts(()=>{let _=Os(n).map(l=>e[l]);if(_.length)return r(_)});return{S:a,B:u,Q:o}}function i({S:o,B:a},u,_){if(!(o&4&&_===u[u.length-1])){o&2&&(_=u[u.length-1]),o&1&&t.push(u);for(let l of a)for(let f of l.Q)i(l,[...u,f],_)}}}function Pb(n){return n.toString(16).toUpperCase().padStart(2,"0")}function nl(n){return`{${Pb(n)}}`}function Fb(n){let t=[];for(let e=0,r=n.length;e<r;){let i=n.codePointAt(e);e+=i<65536?1:2,t.push(i)}return t}function os(n){let e=n.length;if(e<4096)return String.fromCodePoint(...n);let r=[];for(let i=0;i<e;)r.push(String.fromCodePoint(...n.slice(i,i+=4096)));return r.join("")}function Ib(n,t){let e=n.length,r=e-t.length;for(let i=0;r==0&&i<e;i++)r=n[i]-t[i];return r}var Ob="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";const Cs=44032,So=4352,zo=4449,Bo=4519,il=19,sl=21,as=28,ko=sl*as,Tb=il*ko,Cb=Cs+Tb,Nb=So+il,Lb=zo+sl,Db=Bo+as;function Ns(n){return n>>24&255}function ol(n){return n&16777215}let Ma,al,ja,Po;function Ub(){let n=Xf(Ob);Ma=new Map(tl(n).flatMap((t,e)=>t.map(r=>[r,e+1<<24]))),al=new Set(Os(n)),ja=new Map,Po=new Map;for(let[t,e]of el(n)){if(!al.has(t)&&e.length==2){let[r,i]=e,o=Po.get(r);o||(o=new Map,Po.set(r,o)),o.set(i,t)}ja.set(t,e.reverse())}}function cl(n){return n>=Cs&&n<Cb}function Mb(n,t){if(n>=So&&n<Nb&&t>=zo&&t<Lb)return Cs+(n-So)*ko+(t-zo)*as;if(cl(n)&&t>Bo&&t<Db&&(n-Cs)%as==0)return n+(t-Bo);{let e=Po.get(n);return e&&(e=e.get(t),e)?e:-1}}function ul(n){Ma||Ub();let t=[],e=[],r=!1;function i(o){let a=Ma.get(o);a&&(r=!0,o|=a),t.push(o)}for(let o of n)for(;;){if(o<128)t.push(o);else if(cl(o)){let a=o-Cs,u=a/ko|0,_=a%ko/as|0,l=a%as;i(So+u),i(zo+_),l>0&&i(Bo+l)}else{let a=ja.get(o);a?e.push(...a):i(o)}if(!e.length)break;o=e.pop()}if(r&&t.length>1){let o=Ns(t[0]);for(let a=1;a<t.length;a++){let u=Ns(t[a]);if(u==0||o<=u){o=u;continue}let _=a-1;for(;;){let l=t[_+1];if(t[_+1]=t[_],t[_]=l,!_||(o=Ns(t[--_]),o<=u))break}o=Ns(t[a])}}return t}function jb(n){let t=[],e=[],r=-1,i=0;for(let o of n){let a=Ns(o),u=ol(o);if(r==-1)a==0?r=u:t.push(u);else if(i>0&&i>=a)a==0?(t.push(r,...e),e.length=0,r=u):e.push(u),i=a;else{let _=Mb(r,u);_>=0?r=_:i==0&&a==0?(t.push(r),r=u):(e.push(u),i=a)}}return r>=0&&t.push(r,...e),t}function _l(n){return ul(n).map(ol)}function Gb(n){return jb(ul(n))}const fl=45,ll=".",hl=65039,pl=1,Fo=n=>Array.from(n);function Ls(n,t){return n.P.has(t)||n.Q.has(t)}class Hb extends Array{get is_emoji(){return!0}}let Ga,dl,Si,Ha,wl,cs,Va,us,zi,gl,qa;function Qa(){if(Ga)return;let n=Xf(Ab);const t=()=>Os(n),e=()=>new Set(t()),r=(f,g)=>g.forEach(y=>f.add(y));Ga=new Map(el(n)),dl=e(),Si=t(),Ha=new Set(t().map(f=>Si[f])),Si=new Set(Si),wl=e(),e();let i=tl(n),o=n();const a=()=>{let f=new Set;return t().forEach(g=>r(f,i[g])),r(f,t()),f};cs=Ts(f=>{let g=Ts(n).map(y=>y+96);if(g.length){let y=f>=o;g[0]-=32,g=os(g),y&&(g=`Restricted[${g}]`);let v=a(),F=a(),k=!n();return{N:g,P:v,Q:F,M:k,R:y}}}),Va=e(),us=new Map;let u=t().concat(Fo(Va)).sort((f,g)=>f-g);u.forEach((f,g)=>{let y=n(),v=u[g]=y?u[g-y]:{V:[],M:new Map};v.V.push(f),Va.has(f)||us.set(f,v)});for(let{V:f,M:g}of new Set(us.values())){let y=[];for(let F of f){let k=cs.filter(E=>Ls(E,F)),T=y.find(({G:E})=>k.some(R=>E.has(R)));T||(T={G:new Set,V:[]},y.push(T)),T.V.push(F),r(T.G,k)}let v=y.flatMap(F=>Fo(F.G));for(let{G:F,V:k}of y){let T=new Set(v.filter(E=>!F.has(E)));for(let E of k)g.set(E,T)}}zi=new Set;let _=new Set;const l=f=>zi.has(f)?_.add(f):zi.add(f);for(let f of cs){for(let g of f.P)l(g);for(let g of f.Q)l(g)}for(let f of zi)!us.has(f)&&!_.has(f)&&us.set(f,pl);r(zi,_l(zi)),gl=kb(n).map(f=>Hb.from(f)).sort(Ib),qa=new Map;for(let f of gl){let g=[qa];for(let y of f){let v=g.map(F=>{let k=F.get(y);return k||(k=new Map,F.set(y,k)),k});y===hl?g.push(...v):g=v}for(let y of g)y.V=f}}function Ka(n){return(yl(n)?"":`${Wa(Io([n]))} `)+nl(n)}function Wa(n){return`"${n}"‎`}function Vb(n){if(n.length>=4&&n[2]==fl&&n[3]==fl)throw new Error(`invalid label extension: "${os(n.slice(0,4))}"`)}function qb(n){for(let e=n.lastIndexOf(95);e>0;)if(n[--e]!==95)throw new Error("underscore allowed only at start")}function Qb(n){let t=n[0],e=Yf.get(t);if(e)throw Ds(`leading ${e}`);let r=n.length,i=-1;for(let o=1;o<r;o++){t=n[o];let a=Yf.get(t);if(a){if(i==o)throw Ds(`${e} + ${a}`);i=o+1,e=a}}if(i==r)throw Ds(`trailing ${e}`)}function Io(n,t=1/0,e=nl){let r=[];Kb(n[0])&&r.push("◌"),n.length>t&&(t>>=1,n=[...n.slice(0,t),8230,...n.slice(-t)]);let i=0,o=n.length;for(let a=0;a<o;a++){let u=n[a];yl(u)&&(r.push(os(n.slice(i,a))),r.push(e(u)),i=a+1)}return r.push(os(n.slice(i,o))),r.join("")}function Kb(n){return Qa(),Si.has(n)}function yl(n){return Qa(),wl.has(n)}function Wb(n){return Zb(Jb(n,Gb,e1))}function Jb(n,t,e){if(!n)return[];Qa();let r=0;return n.split(ll).map(i=>{let o=Fb(i),a={input:o,offset:r};r+=o.length+1;try{let u=a.tokens=t1(o,t,e),_=u.length,l;if(!_)throw new Error("empty label");let f=a.output=u.flat();if(qb(f),!(a.emoji=_>1||u[0].is_emoji)&&f.every(y=>y<128))Vb(f),l="ASCII";else{let y=u.flatMap(v=>v.is_emoji?[]:v);if(!y.length)l="Emoji";else{if(Si.has(f[0]))throw Ds("leading combining mark");for(let k=1;k<_;k++){let T=u[k];if(!T.is_emoji&&Si.has(T[0]))throw Ds(`emoji + combining mark: "${os(u[k-1])} + ${Io([T[0]])}"`)}Qb(f);let v=Fo(new Set(y)),[F]=Yb(v);Xb(F,y),$b(F,v),l=F.N}}a.type=l}catch(u){a.error=u}return a})}function $b(n,t){let e,r=[];for(let i of t){let o=us.get(i);if(o===pl)return;if(o){let a=o.M.get(i);if(e=e?e.filter(u=>a.has(u)):Fo(a),!e.length)return}else r.push(i)}if(e){for(let i of e)if(r.every(o=>Ls(i,o)))throw new Error(`whole-script confusable: ${n.N}/${i.N}`)}}function Yb(n){let t=cs;for(let e of n){let r=t.filter(i=>Ls(i,e));if(!r.length)throw cs.some(i=>Ls(i,e))?ml(t[0],e):bl(e);if(t=r,r.length==1)break}return t}function Zb(n){return n.map(({input:t,error:e,output:r})=>{if(e){let i=e.message;throw new Error(n.length==1?i:`Invalid label ${Wa(Io(t,63))}: ${i}`)}return os(r)}).join(ll)}function bl(n){return new Error(`disallowed character: ${Ka(n)}`)}function ml(n,t){let e=Ka(t),r=cs.find(i=>i.P.has(t));return r&&(e=`${r.N} ${e}`),new Error(`illegal mixture: ${n.N} + ${e}`)}function Ds(n){return new Error(`illegal placement: ${n}`)}function Xb(n,t){for(let e of t)if(!Ls(n,e))throw ml(n,e);if(n.M){let e=_l(t);for(let r=1,i=e.length;r<i;r++)if(Ha.has(e[r])){let o=r+1;for(let a;o<i&&Ha.has(a=e[o]);o++)for(let u=r;u<o;u++)if(e[u]==a)throw new Error(`duplicate non-spacing marks: ${Ka(a)}`);if(o-r>Zf)throw new Error(`excessive non-spacing marks: ${Wa(Io(e.slice(r-1,o)))} (${o-r}/${Zf})`);r=o}}}function t1(n,t,e){let r=[],i=[];for(n=n.slice().reverse();n.length;){let o=r1(n);if(o)i.length&&(r.push(t(i)),i=[]),r.push(e(o));else{let a=n.pop();if(zi.has(a))i.push(a);else{let u=Ga.get(a);if(u)i.push(...u);else if(!dl.has(a))throw bl(a)}}}return i.length&&r.push(t(i)),r}function e1(n){return n.filter(t=>t!=hl)}function r1(n,t){let e=qa,r,i=n.length;for(;i&&(e=e.get(n[--i]),!!e);){let{V:o}=e;o&&(r=o,n.length=i)}return r}const Al=new Uint8Array(32);Al.fill(0);function El(n){return V(n.length!==0,"invalid ENS name; empty component","comp",n),n}function vl(n){const t=Qn(n1(n)),e=[];if(n.length===0)return e;let r=0;for(let i=0;i<t.length;i++)t[i]===46&&(e.push(El(t.slice(r,i))),r=i+1);return V(r<t.length,"invalid ENS name; empty component","name",n),e.push(El(t.slice(r))),e}function n1(n){try{if(n.length===0)throw new Error("empty label");return Wb(n)}catch(t){V(!1,`invalid ENS name (${t.message})`,"name",n)}}function Ja(n){V(typeof n=="string","invalid ENS name; not a string","name",n),V(n.length,"invalid ENS name (empty label)","name",n);let t=Al;const e=vl(n);for(;e.length;)t=fe(ne([t,fe(e.pop())]));return yt(t)}function i1(n,t){const e=t;return V(e<=255,"DNS encoded label cannot exceed 255","length",e),yt(ne(vl(n).map(r=>{V(r.length<=e,`label ${JSON.stringify(n)} exceeds ${e} bytes`,"name",n);const i=new Uint8Array(r.length+1);return i.set(r,1),i[0]=i.length-1,i})))+"00"}const xl=new Uint8Array(32);xl.fill(0);const s1=BigInt(-1),Rl=BigInt(0),Sl=BigInt(1),o1=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function a1(n){const t=Ot(n),e=t.length%32;return e?ne([t,xl.slice(e)]):yt(t)}const c1=ii(Sl,32),u1=ii(Rl,32),zl={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},$a=["name","version","chainId","verifyingContract","salt"];function Bl(n){return function(t){return V(typeof t=="string",`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,t),t}}const _1={name:Bl("name"),version:Bl("version"),chainId:function(n){const t=Et(n,"domain.chainId");return V(t>=0,"invalid chain ID","domain.chainId",n),Number.isSafeInteger(t)?Number(t):Xe(t)},verifyingContract:function(n){try{return Ut(n).toLowerCase()}catch{}V(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){const t=Ot(n,"domain.salt");return V(t.length===32,'invalid domain value "salt"',"domain.salt",n),yt(t)}};function Ya(n){{const t=n.match(/^(u?)int(\d+)$/);if(t){const e=t[1]==="",r=parseInt(t[2]);V(r%8===0&&r!==0&&r<=256&&t[2]===String(r),"invalid numeric width","type",n);const i=Ss(o1,e?r-1:r),o=e?(i+Sl)*s1:Rl;return function(a){const u=Et(a,"value");return V(u>=o&&u<=i,`value out-of-bounds for ${n}`,"value",u),ii(e?B_(u,256):u,32)}}}{const t=n.match(/^bytes(\d+)$/);if(t){const e=parseInt(t[1]);return V(e!==0&&e<=32&&t[1]===String(e),"invalid bytes width","type",n),function(r){const i=Ot(r);return V(i.length===e,`invalid length for ${n}`,"value",r),a1(r)}}}switch(n){case"address":return function(t){return qn(Ut(t),32)};case"bool":return function(t){return t?c1:u1};case"bytes":return function(t){return fe(t)};case"string":return function(t){return Ri(t)}}return null}function kl(n,t){return`${n}(${t.map(({name:e,type:r})=>r+" "+e).join(",")})`}function Oo(n){const t=n.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:n}}class ke{primaryType;#t;get types(){return JSON.parse(this.#t)}#e;#r;constructor(t){this.#e=new Map,this.#r=new Map;const e=new Map,r=new Map,i=new Map,o={};Object.keys(t).forEach(_=>{o[_]=t[_].map(({name:l,type:f})=>{let{base:g,index:y}=Oo(f);return g==="int"&&!t.int&&(g="int256"),g==="uint"&&!t.uint&&(g="uint256"),{name:l,type:g+(y||"")}}),e.set(_,new Set),r.set(_,[]),i.set(_,new Set)}),this.#t=JSON.stringify(o);for(const _ in o){const l=new Set;for(const f of o[_]){V(!l.has(f.name),`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(_)}`,"types",t),l.add(f.name);const g=Oo(f.type).base;V(g!==_,`circular type reference to ${JSON.stringify(g)}`,"types",t),!Ya(g)&&(V(r.has(g),`unknown type ${JSON.stringify(g)}`,"types",t),r.get(g).push(_),e.get(_).add(g))}}const a=Array.from(r.keys()).filter(_=>r.get(_).length===0);V(a.length!==0,"missing primary type","types",t),V(a.length===1,`ambiguous primary types or unused types: ${a.map(_=>JSON.stringify(_)).join(", ")}`,"types",t),St(this,{primaryType:a[0]});function u(_,l){V(!l.has(_),`circular type reference to ${JSON.stringify(_)}`,"types",t),l.add(_);for(const f of e.get(_))if(r.has(f)){u(f,l);for(const g of l)i.get(g).add(f)}l.delete(_)}u(this.primaryType,new Set);for(const[_,l]of i){const f=Array.from(l);f.sort(),this.#e.set(_,kl(_,o[_])+f.map(g=>kl(g,o[g])).join(""))}}getEncoder(t){let e=this.#r.get(t);return e||(e=this.#n(t),this.#r.set(t,e)),e}#n(t){{const i=Ya(t);if(i)return i}const e=Oo(t).array;if(e){const i=e.prefix,o=this.getEncoder(i);return a=>{V(e.count===-1||e.count===a.length,`array length mismatch; expected length ${e.count}`,"value",a);let u=a.map(o);return this.#e.has(i)&&(u=u.map(fe)),fe(ne(u))}}const r=this.types[t];if(r){const i=Ri(this.#e.get(t));return o=>{const a=r.map(({name:u,type:_})=>{const l=this.getEncoder(_)(o[u]);return this.#e.has(_)?fe(l):l});return a.unshift(i),ne(a)}}V(!1,`unknown type: ${t}`,"type",t)}encodeType(t){const e=this.#e.get(t);return V(e,`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return fe(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(Ya(t))return r(t,e);const i=Oo(t).array;if(i)return V(i.count===-1||i.count===e.length,`array length mismatch; expected length ${i.count}`,"value",e),e.map(a=>this._visit(i.prefix,a,r));const o=this.types[t];if(o)return o.reduce((a,{name:u,type:_})=>(a[u]=this._visit(_,e[u],r),a),{});V(!1,`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new ke(t)}static getPrimaryType(t){return ke.from(t).primaryType}static hashStruct(t,e,r){return ke.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){if(t[r]==null)continue;const i=zl[r];V(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:i})}return e.sort((r,i)=>$a.indexOf(r.name)-$a.indexOf(i.name)),ke.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return ne(["0x1901",ke.hashDomain(t),ke.from(e).hash(r)])}static hash(t,e,r){return fe(ke.encode(t,e,r))}static async resolveNames(t,e,r,i){t=Object.assign({},t);for(const u in t)t[u]==null&&delete t[u];const o={};t.verifyingContract&&!$t(t.verifyingContract,20)&&(o[t.verifyingContract]="0x");const a=ke.from(e);a.visit(r,(u,_)=>(u==="address"&&!$t(_,20)&&(o[_]="0x"),_));for(const u in o)o[u]=await i(u);return t.verifyingContract&&o[t.verifyingContract]&&(t.verifyingContract=o[t.verifyingContract]),r=a.visit(r,(u,_)=>u==="address"&&o[_]?o[_]:_),{domain:t,value:r}}static getPayload(t,e,r){ke.hashDomain(t);const i={},o=[];$a.forEach(_=>{const l=t[_];l!=null&&(i[_]=_1[_](l),o.push({name:_,type:zl[_]}))});const a=ke.from(e);e=a.types;const u=Object.assign({},e);return V(u.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",e),u.EIP712Domain=o,a.encode(r),{types:u,domain:i,primaryType:a.primaryType,message:a.visit(r,(_,l)=>{if(_.match(/^bytes(\d*)/))return yt(Ot(l));if(_.match(/^u?int/))return Et(l).toString();switch(_){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return V(typeof l=="string","invalid string","value",l),l}V(!1,"unsupported type","type",_)})}}}function Pl(n,t,e,r){return Jf(ke.hash(n,t,e),r)}function Se(n){const t=new Set;return n.forEach(e=>t.add(e)),Object.freeze(t)}const f1=Se("external public payable override".split(" ")),Fl="constant external internal payable private public pure view override",l1=Se(Fl.split(" ")),Il="constructor error event fallback function receive struct",Ol=Se(Il.split(" ")),Tl="calldata memory storage payable indexed",h1=Se(Tl.split(" ")),p1=[Il,Tl,"tuple returns",Fl].join(" "),d1=Se(p1.split(" ")),w1={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},g1=new RegExp("^(\\s*)"),y1=new RegExp("^([0-9]+)"),b1=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Cl=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Nl=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class qe{#t;#e;get offset(){return this.#t}get length(){return this.#e.length-this.#t}constructor(t){this.#t=0,this.#e=t.slice()}clone(){return new qe(this.#e)}reset(){this.#t=0}#r(t=0,e=0){return new qe(this.#e.slice(t,e).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))}popKeyword(t){const e=this.peek();if(e.type!=="KEYWORD"||!t.has(e.text))throw new Error(`expected keyword ${e.text}`);return this.pop().text}popType(t){if(this.peek().type!==t){const e=this.peek();throw new Error(`expected ${t}; got ${e.type} ${JSON.stringify(e.text)}`)}return this.pop().text}popParen(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=this.#r(this.#t+1,t.match+1);return this.#t=t.match+1,e}popParams(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=[];for(;this.#t<t.match-1;){const r=this.peek().linkNext;e.push(this.#r(this.#t+1,r)),this.#t=r}return this.#t=t.match+1,e}peek(){if(this.#t>=this.#e.length)throw new Error("out-of-bounds");return this.#e[this.#t]}peekKeyword(t){const e=this.peekType("KEYWORD");return e!=null&&t.has(e)?e:null}peekType(t){if(this.length===0)return null;const e=this.peek();return e.type===t?e.text:null}pop(){const t=this.peek();return this.#t++,t}toString(){const t=[];for(let e=this.#t;e<this.#e.length;e++){const r=this.#e[e];t.push(`${r.type}:${r.text}`)}return`<TokenString ${t.join(" ")}>`}}function li(n){const t=[],e=a=>{const u=o<n.length?JSON.stringify(n[o]):"$EOI";throw new Error(`invalid token ${u} at ${o}: ${a}`)};let r=[],i=[],o=0;for(;o<n.length;){let a=n.substring(o),u=a.match(g1);u&&(o+=u[1].length,a=n.substring(o));const _={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:o,value:-1};t.push(_);let l=w1[a[0]]||"";if(l){if(_.type=l,_.text=a[0],o++,l==="OPEN_PAREN")r.push(t.length-1),i.push(t.length-1);else if(l=="CLOSE_PAREN")r.length===0&&e("no matching open bracket"),_.match=r.pop(),t[_.match].match=t.length-1,_.depth--,_.linkBack=i.pop(),t[_.linkBack].linkNext=t.length-1;else if(l==="COMMA")_.linkBack=i.pop(),t[_.linkBack].linkNext=t.length-1,i.push(t.length-1);else if(l==="OPEN_BRACKET")_.type="BRACKET";else if(l==="CLOSE_BRACKET"){let f=t.pop().text;if(t.length>0&&t[t.length-1].type==="NUMBER"){const g=t.pop().text;f=g+f,t[t.length-1].value=Tt(g)}if(t.length===0||t[t.length-1].type!=="BRACKET")throw new Error("missing opening bracket");t[t.length-1].text+=f}continue}if(u=a.match(b1),u){if(_.text=u[1],o+=_.text.length,d1.has(_.text)){_.type="KEYWORD";continue}if(_.text.match(Nl)){_.type="TYPE";continue}_.type="ID";continue}if(u=a.match(y1),u){_.text=u[1],_.type="NUMBER",o+=_.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${o}`)}return new qe(t.map(a=>Object.freeze(a)))}function Ll(n,t){let e=[];for(const r in t.keys())n.has(r)&&e.push(r);if(e.length>1)throw new Error(`conflicting types: ${e.join(", ")}`)}function To(n,t){if(t.peekKeyword(Ol)){const e=t.pop().text;if(e!==n)throw new Error(`expected ${n}, got ${e}`)}return t.popType("ID")}function Zn(n,t){const e=new Set;for(;;){const r=n.peekType("KEYWORD");if(r==null||t&&!t.has(r))break;if(n.pop(),e.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);e.add(r)}return Object.freeze(e)}function Dl(n){let t=Zn(n,l1);return Ll(t,Se("constant payable nonpayable".split(" "))),Ll(t,Se("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function Xn(n,t){return n.popParams().map(e=>Yt.from(e,t))}function Ul(n){if(n.peekType("AT")){if(n.pop(),n.peekType("NUMBER"))return Et(n.pop().text);throw new Error("invalid gas")}return null}function Bi(n){if(n.length)throw new Error(`unexpected tokens at offset ${n.offset}: ${n.toString()}`)}const m1=new RegExp(/^(.*)\[([0-9]*)\]$/);function Ml(n){const t=n.match(Nl);if(V(t,"invalid type","type",n),n==="uint")return"uint256";if(n==="int")return"int256";if(t[2]){const e=parseInt(t[2]);V(e!==0&&e<=32,"invalid bytes length","type",n)}else if(t[3]){const e=parseInt(t[3]);V(e!==0&&e<=256&&e%8===0,"invalid numeric width","type",n)}return n}const re={},Pe=Symbol.for("_ethers_internal"),jl="_ParamTypeInternal",Gl="_ErrorInternal",Hl="_EventInternal",Vl="_ConstructorInternal",ql="_FallbackInternal",Ql="_FunctionInternal",Kl="_StructInternal";class Yt{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(t,e,r,i,o,a,u,_){if(co(t,re,"ParamType"),Object.defineProperty(this,Pe,{value:jl}),a&&(a=Object.freeze(a.slice())),i==="array"){if(u==null||_==null)throw new Error("")}else if(u!=null||_!=null)throw new Error("");if(i==="tuple"){if(a==null)throw new Error("")}else if(a!=null)throw new Error("");St(this,{name:e,type:r,baseType:i,indexed:o,components:a,arrayLength:u,arrayChildren:_})}format(t){if(t==null&&(t="sighash"),t==="json"){const r=this.name||"";if(this.isArray()){const o=JSON.parse(this.arrayChildren.format("json"));return o.name=r,o.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(o)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(o=>JSON.parse(o.format(t)))),JSON.stringify(i)}let e="";return this.isArray()?(e+=this.arrayChildren.format(t),e+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?e+="("+this.components.map(r=>r.format(t)).join(t==="full"?", ":",")+")":e+=this.type,t!=="sighash"&&(this.indexed===!0&&(e+=" indexed"),t==="full"&&this.name&&(e+=" "+this.name)),e}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(t,e){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return t.map(i=>r.arrayChildren.walk(i,e))}if(this.isTuple()){if(!Array.isArray(t))throw new Error("invalid tuple value");if(t.length!==this.components.length)throw new Error("array is wrong length");const r=this;return t.map((i,o)=>r.components[o].walk(i,e))}return e(this.type,t)}#t(t,e,r,i){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const a=this.arrayChildren,u=e.slice();u.forEach((_,l)=>{a.#t(t,_,r,f=>{u[l]=f})}),i(u);return}if(this.isTuple()){const a=this.components;let u;if(Array.isArray(e))u=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");u=a.map(_=>{if(!_.name)throw new Error("cannot use object value with unnamed components");if(!(_.name in e))throw new Error(`missing value for component ${_.name}`);return e[_.name]})}if(u.length!==this.components.length)throw new Error("array is wrong length");u.forEach((_,l)=>{a[l].#t(t,_,r,f=>{u[l]=f})}),i(u);return}const o=r(this.type,e);o.then?t.push(async function(){i(await o)}()):i(o)}async walkAsync(t,e){const r=[],i=[t];return this.#t(r,t,e,o=>{i[0]=o}),r.length&&await Promise.all(r),i[0]}static from(t,e){if(Yt.isParamType(t))return t;if(typeof t=="string")try{return Yt.from(li(t),e)}catch{V(!1,"invalid param type","obj",t)}else if(t instanceof qe){let u="",_="",l=null;Zn(t,Se(["tuple"])).has("tuple")||t.peekType("OPEN_PAREN")?(_="tuple",l=t.popParams().map(k=>Yt.from(k)),u=`tuple(${l.map(k=>k.format()).join(",")})`):(u=Ml(t.popType("TYPE")),_=u);let f=null,g=null;for(;t.length&&t.peekType("BRACKET");){const k=t.pop();f=new Yt(re,"",u,_,null,l,g,f),g=k.value,u+=k.text,_="array",l=null}let y=null;if(Zn(t,h1).has("indexed")){if(!e)throw new Error("");y=!0}const F=t.peekType("ID")?t.pop().text:"";if(t.length)throw new Error("leftover tokens");return new Yt(re,F,u,_,y,l,g,f)}const r=t.name;V(!r||typeof r=="string"&&r.match(Cl),"invalid name","obj.name",r);let i=t.indexed;i!=null&&(V(e,"parameter cannot be indexed","obj.indexed",t.indexed),i=!!i);let o=t.type,a=o.match(m1);if(a){const u=parseInt(a[2]||"-1"),_=Yt.from({type:a[1],components:t.components});return new Yt(re,r||"",o,"array",i,null,u,_)}if(o==="tuple"||o.startsWith("tuple(")||o.startsWith("(")){const u=t.components!=null?t.components.map(l=>Yt.from(l)):null;return new Yt(re,r||"",o,"tuple",i,u,null,null)}return o=Ml(t.type),new Yt(re,r||"",o,o,i,null,null,null)}static isParamType(t){return t&&t[Pe]===jl}}class ki{type;inputs;constructor(t,e,r){co(t,re,"Fragment"),r=Object.freeze(r.slice()),St(this,{type:e,inputs:r})}static from(t){if(typeof t=="string"){try{ki.from(JSON.parse(t))}catch{}return ki.from(li(t))}if(t instanceof qe)switch(t.peekKeyword(Ol)){case"constructor":return ti.from(t);case"error":return Fe.from(t);case"event":return Ln.from(t);case"fallback":case"receive":return ei.from(t);case"function":return Dn.from(t);case"struct":return Pi.from(t)}else if(typeof t=="object"){switch(t.type){case"constructor":return ti.from(t);case"error":return Fe.from(t);case"event":return Ln.from(t);case"fallback":case"receive":return ei.from(t);case"function":return Dn.from(t);case"struct":return Pi.from(t)}ut(!1,`unsupported type: ${t.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}V(!1,"unsupported frgament object","obj",t)}static isConstructor(t){return ti.isFragment(t)}static isError(t){return Fe.isFragment(t)}static isEvent(t){return Ln.isFragment(t)}static isFunction(t){return Dn.isFragment(t)}static isStruct(t){return Pi.isFragment(t)}}class Co extends ki{name;constructor(t,e,r,i){super(t,e,i),V(typeof r=="string"&&r.match(Cl),"invalid identifier","name",r),i=Object.freeze(i.slice()),St(this,{name:r})}}function Us(n,t){return"("+t.map(e=>e.format(n)).join(n==="full"?", ":",")+")"}class Fe extends Co{constructor(t,e,r){super(t,"error",e,r),Object.defineProperty(this,Pe,{value:Gl})}get selector(){return Ri(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("error"),e.push(this.name+Us(t,this.inputs)),e.join(" ")}static from(t){if(Fe.isFragment(t))return t;if(typeof t=="string")return Fe.from(li(t));if(t instanceof qe){const e=To("error",t),r=Xn(t);return Bi(t),new Fe(re,e,r)}return new Fe(re,t.name,t.inputs?t.inputs.map(Yt.from):[])}static isFragment(t){return t&&t[Pe]===Gl}}class Ln extends Co{anonymous;constructor(t,e,r,i){super(t,"event",e,r),Object.defineProperty(this,Pe,{value:Hl}),St(this,{anonymous:i})}get topicHash(){return Ri(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("event"),e.push(this.name+Us(t,this.inputs)),t!=="sighash"&&this.anonymous&&e.push("anonymous"),e.join(" ")}static getTopicHash(t,e){return e=(e||[]).map(i=>Yt.from(i)),new Ln(re,t,e,!1).topicHash}static from(t){if(Ln.isFragment(t))return t;if(typeof t=="string")try{return Ln.from(li(t))}catch{V(!1,"invalid event fragment","obj",t)}else if(t instanceof qe){const e=To("event",t),r=Xn(t,!0),i=!!Zn(t,Se(["anonymous"])).has("anonymous");return Bi(t),new Ln(re,e,r,i)}return new Ln(re,t.name,t.inputs?t.inputs.map(e=>Yt.from(e,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[Pe]===Hl}}class ti extends ki{payable;gas;constructor(t,e,r,i,o){super(t,e,r),Object.defineProperty(this,Pe,{value:Vl}),St(this,{payable:i,gas:o})}format(t){if(ut(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[`constructor${Us(t,this.inputs)}`];return this.payable&&e.push("payable"),this.gas!=null&&e.push(`@${this.gas.toString()}`),e.join(" ")}static from(t){if(ti.isFragment(t))return t;if(typeof t=="string")try{return ti.from(li(t))}catch{V(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof qe){Zn(t,Se(["constructor"]));const e=Xn(t),r=!!Zn(t,f1).has("payable"),i=Ul(t);return Bi(t),new ti(re,"constructor",e,r,i)}return new ti(re,"constructor",t.inputs?t.inputs.map(Yt.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Pe]===Vl}}class ei extends ki{payable;constructor(t,e,r){super(t,"fallback",e),Object.defineProperty(this,Pe,{value:ql}),St(this,{payable:r})}format(t){const e=this.inputs.length===0?"receive":"fallback";if(t==="json"){const r=this.payable?"payable":"nonpayable";return JSON.stringify({type:e,stateMutability:r})}return`${e}()${this.payable?" payable":""}`}static from(t){if(ei.isFragment(t))return t;if(typeof t=="string")try{return ei.from(li(t))}catch{V(!1,"invalid fallback fragment","obj",t)}else if(t instanceof qe){const e=t.toString(),r=t.peekKeyword(Se(["fallback","receive"]));if(V(r,"type must be fallback or receive","obj",e),t.popKeyword(Se(["fallback","receive"]))==="receive"){const u=Xn(t);return V(u.length===0,"receive cannot have arguments","obj.inputs",u),Zn(t,Se(["payable"])),Bi(t),new ei(re,[],!0)}let o=Xn(t);o.length?V(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(u=>u.format("minimal")).join(", ")):o=[Yt.from("bytes")];const a=Dl(t);if(V(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),Zn(t,Se(["returns"])).has("returns")){const u=Xn(t);V(u.length===1&&u[0].type==="bytes","invalid fallback outputs","obj.outputs",u.map(_=>_.format("minimal")).join(", "))}return Bi(t),new ei(re,o,a==="payable")}if(t.type==="receive")return new ei(re,[],!0);if(t.type==="fallback"){const e=[Yt.from("bytes")],r=t.stateMutability==="payable";return new ei(re,e,r)}V(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[Pe]===ql}}class Dn extends Co{constant;outputs;stateMutability;payable;gas;constructor(t,e,r,i,o,a){super(t,"function",e,i),Object.defineProperty(this,Pe,{value:Ql}),o=Object.freeze(o.slice()),St(this,{constant:r==="view"||r==="pure",gas:a,outputs:o,payable:r==="payable",stateMutability:r})}get selector(){return Ri(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t))),outputs:this.outputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("function"),e.push(this.name+Us(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&e.push(this.stateMutability),this.outputs&&this.outputs.length&&(e.push("returns"),e.push(Us(t,this.outputs))),this.gas!=null&&e.push(`@${this.gas.toString()}`)),e.join(" ")}static getSelector(t,e){return e=(e||[]).map(i=>Yt.from(i)),new Dn(re,t,"view",e,[],null).selector}static from(t){if(Dn.isFragment(t))return t;if(typeof t=="string")try{return Dn.from(li(t))}catch{V(!1,"invalid function fragment","obj",t)}else if(t instanceof qe){const r=To("function",t),i=Xn(t),o=Dl(t);let a=[];Zn(t,Se(["returns"])).has("returns")&&(a=Xn(t));const u=Ul(t);return Bi(t),new Dn(re,r,o,i,a,u)}let e=t.stateMutability;return e==null&&(e="payable",typeof t.constant=="boolean"?(e="view",t.constant||(e="payable",typeof t.payable=="boolean"&&!t.payable&&(e="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(e="nonpayable")),new Dn(re,t.name,e,t.inputs?t.inputs.map(Yt.from):[],t.outputs?t.outputs.map(Yt.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Pe]===Ql}}class Pi extends Co{constructor(t,e,r){super(t,"struct",e,r),Object.defineProperty(this,Pe,{value:Kl})}format(){throw new Error("@TODO")}static from(t){if(typeof t=="string")try{return Pi.from(li(t))}catch{V(!1,"invalid struct fragment","obj",t)}else if(t instanceof qe){const e=To("struct",t),r=Xn(t);return Bi(t),new Pi(re,e,r)}return new Pi(re,t.name,t.inputs?t.inputs.map(Yt.from):[])}static isFragment(t){return t&&t[Pe]===Kl}}const rr=new Map;rr.set(0,"GENERIC_PANIC"),rr.set(1,"ASSERT_FALSE"),rr.set(17,"OVERFLOW"),rr.set(18,"DIVIDE_BY_ZERO"),rr.set(33,"ENUM_RANGE_ERROR"),rr.set(34,"BAD_STORAGE_DATA"),rr.set(49,"STACK_UNDERFLOW"),rr.set(50,"ARRAY_RANGE_ERROR"),rr.set(65,"OUT_OF_MEMORY"),rr.set(81,"UNINITIALIZED_FUNCTION_CALL");const A1=new RegExp(/^bytes([0-9]*)$/),E1=new RegExp(/^(u?int)([0-9]*)$/);let Za=null,Wl=1024;function v1(n,t,e,r){let i="missing revert data",o=null;const a=null;let u=null;if(e){i="execution reverted";const l=Ot(e);if(e=yt(e),l.length===0)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(yt(l.slice(0,4))==="0x08c379a0")try{o=r.decode(["string"],l.slice(4))[0],u={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(yt(l.slice(0,4))==="0x4e487b71")try{const f=Number(r.decode(["uint256"],l.slice(4))[0]);u={signature:"Panic(uint256)",name:"Panic",args:[f]},o=`Panic due to ${rr.get(f)||"UNKNOWN"}(${f})`,i+=`: ${o}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const _={to:t.to?Ut(t.to):null,data:t.data||"0x"};return t.from&&(_.from=Ut(t.from)),ee(i,"CALL_EXCEPTION",{action:n,data:e,reason:o,transaction:_,invocation:a,revert:u})}class Fi{#t(t){if(t.isArray())return new V0(this.#t(t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new Eo(t.components.map(r=>this.#t(r)),t.name);switch(t.baseType){case"address":return new G0(t.name);case"bool":return new q0(t.name);case"string":return new tb(t.name);case"bytes":return new Q0(t.name);case"":return new J0(t.name)}let e=t.type.match(E1);if(e){let r=parseInt(e[2]||"256");return V(r!==0&&r<=256&&r%8===0,"invalid "+e[1]+" bit length","param",t),new X0(r/8,e[1]==="int",t.name)}if(e=t.type.match(A1),e){let r=parseInt(e[1]);return V(r!==0&&r<=32,"invalid bytes length","param",t),new K0(r,t.name)}V(!1,"invalid type","type",t.type)}getDefaultValue(t){const e=t.map(i=>this.#t(Yt.from(i)));return new Eo(e,"_").defaultValue()}encode(t,e){x_(e.length,t.length,"types/values length mismatch");const r=t.map(a=>this.#t(Yt.from(a))),i=new Eo(r,"_"),o=new ga;return i.encode(o,e),o.data}decode(t,e,r){const i=t.map(a=>this.#t(Yt.from(a)));return new Eo(i,"_").decode(new ya(e,r,Wl))}static _setDefaultMaxInflation(t){V(typeof t=="number"&&Number.isInteger(t),"invalid defaultMaxInflation factor","value",t),Wl=t}static defaultAbiCoder(){return Za==null&&(Za=new Fi),Za}static getBuiltinCallException(t,e,r){return v1(t,e,r,Fi.defaultAbiCoder())}}class x1{fragment;name;signature;topic;args;constructor(t,e,r){const i=t.name,o=t.format();St(this,{fragment:t,name:i,signature:o,topic:e,args:r})}}class R1{fragment;name;args;signature;selector;value;constructor(t,e,r,i){const o=t.name,a=t.format();St(this,{fragment:t,name:o,args:r,signature:a,selector:e,value:i})}}class S1{fragment;name;args;signature;selector;constructor(t,e,r){const i=t.name,o=t.format();St(this,{fragment:t,name:i,args:r,signature:o,selector:e})}}class Jl{hash;_isIndexed;static isIndexed(t){return!!(t&&t._isIndexed)}constructor(t){St(this,{hash:t,_isIndexed:!0})}}const $l={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},Yl={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:n=>`reverted with reason string ${JSON.stringify(n)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:n=>{let t="unknown panic code";return n>=0&&n<=255&&$l[n.toString()]&&(t=$l[n.toString()]),`reverted with panic code 0x${n.toString(16)} (${t})`}}};class Ii{fragments;deploy;fallback;receive;#t;#e;#r;#n;constructor(t){let e=[];typeof t=="string"?e=JSON.parse(t):e=t,this.#r=new Map,this.#t=new Map,this.#e=new Map;const r=[];for(const a of e)try{r.push(ki.from(a))}catch(u){console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`,u.message)}St(this,{fragments:Object.freeze(r)});let i=null,o=!1;this.#n=this.getAbiCoder(),this.fragments.forEach((a,u)=>{let _;switch(a.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}St(this,{deploy:a});return;case"fallback":a.inputs.length===0?o=!0:(V(!i||a.payable!==i.payable,"conflicting fallback fragments",`fragments[${u}]`,a),i=a,o=i.payable);return;case"function":_=this.#r;break;case"event":_=this.#e;break;case"error":_=this.#t;break;default:return}const l=a.format();_.has(l)||_.set(l,a)}),this.deploy||St(this,{deploy:ti.from("constructor()")}),St(this,{fallback:i,receive:o})}format(t){const e=t?"minimal":"full";return this.fragments.map(i=>i.format(e))}formatJson(){const t=this.fragments.map(e=>e.format("json"));return JSON.stringify(t.map(e=>JSON.parse(e)))}getAbiCoder(){return Fi.defaultAbiCoder()}#i(t,e,r){if($t(t)){const o=t.toLowerCase();for(const a of this.#r.values())if(o===a.selector)return a;return null}if(t.indexOf("(")===-1){const o=[];for(const[a,u]of this.#r)a.split("(")[0]===t&&o.push(u);if(e){const a=e.length>0?e[e.length-1]:null;let u=e.length,_=!0;oe.isTyped(a)&&a.type==="overrides"&&(_=!1,u--);for(let l=o.length-1;l>=0;l--){const f=o[l].inputs.length;f!==u&&(!_||f!==u-1)&&o.splice(l,1)}for(let l=o.length-1;l>=0;l--){const f=o[l].inputs;for(let g=0;g<e.length;g++)if(oe.isTyped(e[g])){if(g>=f.length){if(e[g].type==="overrides")continue;o.splice(l,1);break}if(e[g].type!==f[g].baseType){o.splice(l,1);break}}}}if(o.length===1&&e&&e.length!==o[0].inputs.length){const a=e[e.length-1];(a==null||Array.isArray(a)||typeof a!="object")&&o.splice(0,1)}if(o.length===0)return null;if(o.length>1&&r){const a=o.map(u=>JSON.stringify(u.format())).join(", ");V(!1,`ambiguous function description (i.e. matches ${a})`,"key",t)}return o[0]}const i=this.#r.get(Dn.from(t).format());return i||null}getFunctionName(t){const e=this.#i(t,null,!1);return V(e,"no matching function","key",t),e.name}hasFunction(t){return!!this.#i(t,null,!1)}getFunction(t,e){return this.#i(t,e||null,!0)}forEachFunction(t){const e=Array.from(this.#r.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#r.get(i),r)}}#o(t,e,r){if($t(t)){const o=t.toLowerCase();for(const a of this.#e.values())if(o===a.topicHash)return a;return null}if(t.indexOf("(")===-1){const o=[];for(const[a,u]of this.#e)a.split("(")[0]===t&&o.push(u);if(e){for(let a=o.length-1;a>=0;a--)o[a].inputs.length<e.length&&o.splice(a,1);for(let a=o.length-1;a>=0;a--){const u=o[a].inputs;for(let _=0;_<e.length;_++)if(oe.isTyped(e[_])&&e[_].type!==u[_].baseType){o.splice(a,1);break}}}if(o.length===0)return null;if(o.length>1&&r){const a=o.map(u=>JSON.stringify(u.format())).join(", ");V(!1,`ambiguous event description (i.e. matches ${a})`,"key",t)}return o[0]}const i=this.#e.get(Ln.from(t).format());return i||null}getEventName(t){const e=this.#o(t,null,!1);return V(e,"no matching event","key",t),e.name}hasEvent(t){return!!this.#o(t,null,!1)}getEvent(t,e){return this.#o(t,e||null,!0)}forEachEvent(t){const e=Array.from(this.#e.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#e.get(i),r)}}getError(t,e){if($t(t)){const i=t.toLowerCase();if(Yl[i])return Fe.from(Yl[i].signature);for(const o of this.#t.values())if(i===o.selector)return o;return null}if(t.indexOf("(")===-1){const i=[];for(const[o,a]of this.#t)o.split("(")[0]===t&&i.push(a);if(i.length===0)return t==="Error"?Fe.from("error Error(string)"):t==="Panic"?Fe.from("error Panic(uint256)"):null;if(i.length>1){const o=i.map(a=>JSON.stringify(a.format())).join(", ");V(!1,`ambiguous error description (i.e. ${o})`,"name",t)}return i[0]}if(t=Fe.from(t).format(),t==="Error(string)")return Fe.from("error Error(string)");if(t==="Panic(uint256)")return Fe.from("error Panic(uint256)");const r=this.#t.get(t);return r||null}forEachError(t){const e=Array.from(this.#t.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#t.get(i),r)}}_decodeParams(t,e){return this.#n.decode(t,e)}_encodeParams(t,e){return this.#n.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);V(r,"unknown error","fragment",t),t=r}return V(ie(e,0,4)===t.selector,`data signature does not match error ${t.name}.`,"data",e),this._decodeParams(t.inputs,ie(e,4))}encodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);V(r,"unknown error","fragment",t),t=r}return ne([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);V(r,"unknown function","fragment",t),t=r}return V(ie(e,0,4)===t.selector,`data signature does not match function ${t.name}.`,"data",e),this._decodeParams(t.inputs,ie(e,4))}encodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);V(r,"unknown function","fragment",t),t=r}return ne([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionResult(t,e){if(typeof t=="string"){const o=this.getFunction(t);V(o,"unknown function","fragment",t),t=o}let r="invalid length for result data";const i=ve(e);if(i.length%32===0)try{return this.#n.decode(t.outputs,i)}catch{r="could not decode result data"}ut(!1,r,"BAD_DATA",{value:yt(i),info:{method:t.name,signature:t.format()}})}makeError(t,e){const r=Ot(t,"data"),i=Fi.getBuiltinCallException("call",e,r);if(i.message.startsWith("execution reverted (unknown custom error)")){const u=yt(r.slice(0,4)),_=this.getError(u);if(_)try{const l=this.#n.decode(_.inputs,r.slice(4));i.revert={name:_.name,signature:_.format(),args:l},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const a=this.parseTransaction(e);return a&&(i.invocation={method:a.name,signature:a.signature,args:a.args}),i}encodeFunctionResult(t,e){if(typeof t=="string"){const r=this.getFunction(t);V(r,"unknown function","fragment",t),t=r}return yt(this.#n.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){if(typeof t=="string"){const o=this.getEvent(t);V(o,"unknown event","eventFragment",t),t=o}ut(e.length<=t.inputs.length,`too many arguments for ${t.format()}`,"UNEXPECTED_ARGUMENT",{count:e.length,expectedCount:t.inputs.length});const r=[];t.anonymous||r.push(t.topicHash);const i=(o,a)=>o.type==="string"?Ri(a):o.type==="bytes"?fe(yt(a)):(o.type==="bool"&&typeof a=="boolean"?a=a?"0x01":"0x00":o.type.match(/^u?int/)?a=ii(a):o.type.match(/^bytes/)?a=ny(a,32):o.type==="address"&&this.#n.encode(["address"],[a]),qn(yt(a),32));for(e.forEach((o,a)=>{const u=t.inputs[a];if(!u.indexed){V(o==null,"cannot filter non-indexed parameters; must be null","contract."+u.name,o);return}o==null?r.push(null):u.baseType==="array"||u.baseType==="tuple"?V(!1,"filtering with tuples or arrays not supported","contract."+u.name,o):Array.isArray(o)?r.push(o.map(_=>i(u,_))):r.push(i(u,o))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(t,e){if(typeof t=="string"){const a=this.getEvent(t);V(a,"unknown event","eventFragment",t),t=a}const r=[],i=[],o=[];return t.anonymous||r.push(t.topicHash),V(e.length===t.inputs.length,"event arguments/values mismatch","values",e),t.inputs.forEach((a,u)=>{const _=e[u];if(a.indexed)if(a.type==="string")r.push(Ri(_));else if(a.type==="bytes")r.push(fe(_));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");r.push(this.#n.encode([a.type],[_]))}else i.push(a),o.push(_)}),{data:this.#n.encode(i,o),topics:r}}decodeEventLog(t,e,r){if(typeof t=="string"){const v=this.getEvent(t);V(v,"unknown event","eventFragment",t),t=v}if(r!=null&&!t.anonymous){const v=t.topicHash;V($t(r[0],32)&&r[0].toLowerCase()===v,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],o=[],a=[];t.inputs.forEach((v,F)=>{v.indexed?v.type==="string"||v.type==="bytes"||v.baseType==="tuple"||v.baseType==="array"?(i.push(Yt.from({type:"bytes32",name:v.name})),a.push(!0)):(i.push(v),a.push(!1)):(o.push(v),a.push(!1))});const u=r!=null?this.#n.decode(i,ne(r)):null,_=this.#n.decode(o,e,!0),l=[],f=[];let g=0,y=0;return t.inputs.forEach((v,F)=>{let k=null;if(v.indexed)if(u==null)k=new Jl(null);else if(a[F])k=new Jl(u[y++]);else try{k=u[y++]}catch(T){k=T}else try{k=_[g++]}catch(T){k=T}l.push(k),f.push(v.name||null)}),Kn.fromItems(l,f)}parseTransaction(t){const e=Ot(t.data,"tx.data"),r=Et(t.value!=null?t.value:0,"tx.value"),i=this.getFunction(yt(e.slice(0,4)));if(!i)return null;const o=this.#n.decode(i.inputs,e.slice(4));return new R1(i,i.selector,o,r)}parseCallResult(t){throw new Error("@TODO")}parseLog(t){const e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new x1(e,e.topicHash,this.decodeEventLog(e,t.data,t.topics))}parseError(t){const e=yt(t),r=this.getError(ie(e,0,4));if(!r)return null;const i=this.#n.decode(r.inputs,ie(e,4));return new S1(r,r.selector,i)}static from(t){return t instanceof Ii?t:typeof t=="string"?new Ii(JSON.parse(t)):typeof t.formatJson=="function"?new Ii(t.formatJson()):typeof t.format=="function"?new Ii(t.format("json")):new Ii(t)}}const Zl=BigInt(0);function _s(n){return n??null}function ce(n){return n==null?null:n.toString()}class Xl{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(t,e,r){St(this,{gasPrice:_s(t),maxFeePerGas:_s(e),maxPriorityFeePerGas:_s(r)})}toJSON(){const{gasPrice:t,maxFeePerGas:e,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:ce(t),maxFeePerGas:ce(e),maxPriorityFeePerGas:ce(r)}}}function No(n){const t={};n.to&&(t.to=n.to),n.from&&(t.from=n.from),n.data&&(t.data=yt(n.data));const e="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of e)!(i in n)||n[i]==null||(t[i]=Et(n[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in n)||n[i]==null||(t[i]=Tt(n[i],`request.${i}`));return n.accessList&&(t.accessList=vi(n.accessList)),n.authorizationList&&(t.authorizationList=n.authorizationList.slice()),"blockTag"in n&&(t.blockTag=n.blockTag),"enableCcipRead"in n&&(t.enableCcipRead=!!n.enableCcipRead),"customData"in n&&(t.customData=n.customData),"blobVersionedHashes"in n&&n.blobVersionedHashes&&(t.blobVersionedHashes=n.blobVersionedHashes.slice()),"kzg"in n&&(t.kzg=n.kzg),"blobs"in n&&n.blobs&&(t.blobs=n.blobs.map(i=>la(i)?yt(i):Object.assign({},i))),t}class z1{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#t;constructor(t,e){this.#t=t.transactions.map(r=>typeof r!="string"?new js(r,e):r),St(this,{provider:e,hash:_s(t.hash),number:t.number,timestamp:t.timestamp,parentHash:t.parentHash,parentBeaconBlockRoot:t.parentBeaconBlockRoot,nonce:t.nonce,difficulty:t.difficulty,gasLimit:t.gasLimit,gasUsed:t.gasUsed,blobGasUsed:t.blobGasUsed,excessBlobGas:t.excessBlobGas,miner:t.miner,prevRandao:_s(t.prevRandao),extraData:t.extraData,baseFeePerGas:_s(t.baseFeePerGas),stateRoot:t.stateRoot,receiptsRoot:t.receiptsRoot})}get transactions(){return this.#t.map(t=>typeof t=="string"?t:t.hash)}get prefetchedTransactions(){const t=this.#t.slice();return t.length===0?[]:(ut(typeof t[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),t)}toJSON(){const{baseFeePerGas:t,difficulty:e,extraData:r,gasLimit:i,gasUsed:o,hash:a,miner:u,prevRandao:_,nonce:l,number:f,parentHash:g,parentBeaconBlockRoot:y,stateRoot:v,receiptsRoot:F,timestamp:k,transactions:T}=this;return{_type:"Block",baseFeePerGas:ce(t),difficulty:ce(e),extraData:r,gasLimit:ce(i),gasUsed:ce(o),blobGasUsed:ce(this.blobGasUsed),excessBlobGas:ce(this.excessBlobGas),hash:a,miner:u,prevRandao:_,nonce:l,number:f,parentHash:g,timestamp:k,parentBeaconBlockRoot:y,stateRoot:v,receiptsRoot:F,transactions:T}}[Symbol.iterator](){let t=0;const e=this.transactions;return{next:()=>t<this.length?{value:e[t++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#t.length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(t){let e;if(typeof t=="number")e=this.#t[t];else{const r=t.toLowerCase();for(const i of this.#t)if(typeof i=="string"){if(i!==r)continue;e=i;break}else{if(i.hash!==r)continue;e=i;break}}if(e==null)throw new Error("no such tx");return typeof e=="string"?await this.provider.getTransaction(e):e}getPrefetchedTransaction(t){const e=this.prefetchedTransactions;if(typeof t=="number")return e[t];t=t.toLowerCase();for(const r of e)if(r.hash===t)return r;V(!1,"no matching transaction","indexOrHash",t)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return B1(this)}}class Ms{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(t,e){this.provider=e;const r=Object.freeze(t.topics.slice());St(this,{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,removed:t.removed,address:t.address,data:t.data,topics:r,index:t.index,transactionIndex:t.transactionIndex})}toJSON(){const{address:t,blockHash:e,blockNumber:r,data:i,index:o,removed:a,topics:u,transactionHash:_,transactionIndex:l}=this;return{_type:"log",address:t,blockHash:e,blockNumber:r,data:i,index:o,removed:a,topics:u,transactionHash:_,transactionIndex:l}}async getBlock(){const t=await this.provider.getBlock(this.blockHash);return ut(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransaction(){const t=await this.provider.getTransaction(this.transactionHash);return ut(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransactionReceipt(){const t=await this.provider.getTransactionReceipt(this.transactionHash);return ut(!!t,"failed to find transaction receipt","UNKNOWN_ERROR",{}),t}removedEvent(){return k1(this)}}class th{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#t;constructor(t,e){this.#t=Object.freeze(t.logs.map(i=>new Ms(i,e)));let r=Zl;t.effectiveGasPrice!=null?r=t.effectiveGasPrice:t.gasPrice!=null&&(r=t.gasPrice),St(this,{provider:e,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,blobGasUsed:t.blobGasUsed,gasPrice:r,blobGasPrice:t.blobGasPrice,type:t.type,status:t.status,root:t.root})}get logs(){return this.#t}toJSON(){const{to:t,from:e,contractAddress:r,hash:i,index:o,blockHash:a,blockNumber:u,logsBloom:_,logs:l,status:f,root:g}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:u,contractAddress:r,cumulativeGasUsed:ce(this.cumulativeGasUsed),from:e,gasPrice:ce(this.gasPrice),blobGasUsed:ce(this.blobGasUsed),blobGasPrice:ce(this.blobGasPrice),gasUsed:ce(this.gasUsed),hash:i,index:o,logs:l,logsBloom:_,root:g,status:f,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t<this.length?{value:this.logs[t++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const t=await this.provider.getBlock(this.blockHash);if(t==null)throw new Error("TODO");return t}async getTransaction(){const t=await this.provider.getTransaction(this.hash);if(t==null)throw new Error("TODO");return t}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return rh(this)}reorderedEvent(t){return ut(!t||t.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),eh(this,t)}}class js{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#t;constructor(t,e){this.provider=e,this.blockNumber=t.blockNumber!=null?t.blockNumber:null,this.blockHash=t.blockHash!=null?t.blockHash:null,this.hash=t.hash,this.index=t.index,this.type=t.type,this.from=t.from,this.to=t.to||null,this.gasLimit=t.gasLimit,this.nonce=t.nonce,this.data=t.data,this.value=t.value,this.gasPrice=t.gasPrice,this.maxPriorityFeePerGas=t.maxPriorityFeePerGas!=null?t.maxPriorityFeePerGas:null,this.maxFeePerGas=t.maxFeePerGas!=null?t.maxFeePerGas:null,this.maxFeePerBlobGas=t.maxFeePerBlobGas!=null?t.maxFeePerBlobGas:null,this.chainId=t.chainId,this.signature=t.signature,this.accessList=t.accessList!=null?t.accessList:null,this.blobVersionedHashes=t.blobVersionedHashes!=null?t.blobVersionedHashes:null,this.authorizationList=t.authorizationList!=null?t.authorizationList:null,this.#t=-1}toJSON(){const{blockNumber:t,blockHash:e,index:r,hash:i,type:o,to:a,from:u,nonce:_,data:l,signature:f,accessList:g,blobVersionedHashes:y}=this;return{_type:"TransactionResponse",accessList:g,blockNumber:t,blockHash:e,blobVersionedHashes:y,chainId:ce(this.chainId),data:l,from:u,gasLimit:ce(this.gasLimit),gasPrice:ce(this.gasPrice),hash:i,maxFeePerGas:ce(this.maxFeePerGas),maxPriorityFeePerGas:ce(this.maxPriorityFeePerGas),maxFeePerBlobGas:ce(this.maxFeePerBlobGas),nonce:_,signature:f,to:a,index:r,type:o,value:ce(this.value)}}async getBlock(){let t=this.blockNumber;if(t==null){const r=await this.getTransaction();r&&(t=r.blockNumber)}if(t==null)return null;const e=this.provider.getBlock(t);if(e==null)throw new Error("TODO");return e}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:e,blockNumber:r}=await Ee({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return e==null||e.blockNumber==null?0:r-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(t,e){const r=t??1,i=e??0;let o=this.#t,a=-1,u=o===-1;const _=async()=>{if(u)return null;const{blockNumber:y,nonce:v}=await Ee({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(v<this.nonce){o=y;return}if(u)return null;const F=await this.getTransaction();if(!(F&&F.blockNumber!=null))for(a===-1&&(a=o-3,a<this.#t&&(a=this.#t));a<=y;){if(u)return null;const k=await this.provider.getBlock(a,!0);if(k==null)return;for(const T of k)if(T===this.hash)return;for(let T=0;T<k.length;T++){const E=await k.getTransaction(T);if(E.from===this.from&&E.nonce===this.nonce){if(u)return null;const R=await this.provider.getTransactionReceipt(E.hash);if(R==null||y-R.blockNumber+1<r)return;let B="replaced";E.data===this.data&&E.to===this.to&&E.value===this.value?B="repriced":E.data==="0x"&&E.from===E.to&&E.value===Zl&&(B="cancelled"),ut(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:B==="replaced"||B==="cancelled",reason:B,replacement:E.replaceableTransaction(o),hash:E.hash,receipt:R})}}a++}},l=y=>{if(y==null||y.status!==0)return y;ut(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:y.to,from:y.from,data:""},receipt:y})},f=await this.provider.getTransactionReceipt(this.hash);if(r===0)return l(f);if(f){if(r===1||await f.confirmations()>=r)return l(f)}else if(await _(),r===0)return null;return await new Promise((y,v)=>{const F=[],k=()=>{F.forEach(E=>E())};if(F.push(()=>{u=!0}),i>0){const E=setTimeout(()=>{k(),v(ee("wait for transaction timeout","TIMEOUT"))},i);F.push(()=>{clearTimeout(E)})}const T=async E=>{if(await E.confirmations()>=r){k();try{y(l(E))}catch(R){v(R)}}};if(F.push(()=>{this.provider.off(this.hash,T)}),this.provider.on(this.hash,T),o>=0){const E=async()=>{try{await _()}catch(R){if(me(R,"TRANSACTION_REPLACED")){k(),v(R);return}}u||this.provider.once("block",E)};F.push(()=>{this.provider.off("block",E)}),this.provider.once("block",E)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ut(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),rh(this)}reorderedEvent(t){return ut(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ut(!t||t.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),eh(this,t)}replaceableTransaction(t){V(Number.isInteger(t)&&t>=0,"invalid startBlock","startBlock",t);const e=new js(this,this.provider);return e.#t=t,e}}function B1(n){return{orphan:"drop-block",hash:n.hash,number:n.number}}function eh(n,t){return{orphan:"reorder-transaction",tx:n,other:t}}function rh(n){return{orphan:"drop-transaction",tx:n}}function k1(n){return{orphan:"drop-log",log:{transactionHash:n.transactionHash,blockHash:n.blockHash,blockNumber:n.blockNumber,address:n.address,data:n.data,topics:Object.freeze(n.topics.slice()),index:n.index}}}class Xa extends Ms{interface;fragment;args;constructor(t,e,r){super(t,t.provider);const i=e.decodeEventLog(r,t.data,t.topics);St(this,{args:i,fragment:r,interface:e})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class nh extends Ms{error;constructor(t,e){super(t,t.provider),St(this,{error:e})}}class P1 extends th{#t;constructor(t,e,r){super(r,e),this.#t=t}get logs(){return super.logs.map(t=>{const e=t.topics.length?this.#t.getEvent(t.topics[0]):null;if(e)try{return new Xa(t,this.#t,e)}catch(r){return new nh(t,r)}return t})}}class tc extends js{#t;constructor(t,e,r){super(r,e),this.#t=t}async wait(t,e){const r=await super.wait(t,e);return r==null?null:new P1(this.#t,this.provider,r)}}class ih extends I_{log;constructor(t,e,r,i){super(t,e,r),St(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class F1 extends ih{constructor(t,e,r,i,o){super(t,e,r,new Xa(o,t.interface,i));const a=t.interface.decodeEventLog(i,this.log.data,this.log.topics);St(this,{args:a,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const sh=BigInt(0);function oh(n){return n&&typeof n.call=="function"}function ah(n){return n&&typeof n.estimateGas=="function"}function Lo(n){return n&&typeof n.resolveName=="function"}function ch(n){return n&&typeof n.sendTransaction=="function"}function uh(n){if(n!=null){if(Lo(n))return n;if(n.provider)return n.provider}}class I1{#t;fragment;constructor(t,e,r){if(St(this,{fragment:e}),e.inputs.length<r.length)throw new Error("too many arguments");const i=Oi(t.runner,"resolveName"),o=Lo(i)?i:null;this.#t=async function(){const a=await Promise.all(e.inputs.map((u,_)=>r[_]==null?null:u.walkAsync(r[_],(f,g)=>f==="address"?Array.isArray(g)?Promise.all(g.map(y=>Re(y,o))):Re(g,o):g)));return t.interface.encodeFilterTopics(e,a)}()}getTopicFilter(){return this.#t}}function Oi(n,t){return n==null?null:typeof n[t]=="function"?n:n.provider&&typeof n.provider[t]=="function"?n.provider:null}function Ti(n){return n==null?null:n.provider||null}async function _h(n,t){const e=oe.dereference(n,"overrides");V(typeof e=="object","invalid overrides parameter","overrides",n);const r=No(e);return V(r.to==null||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),V(r.data==null||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function O1(n,t,e){const r=Oi(n,"resolveName"),i=Lo(r)?r:null;return await Promise.all(t.map((o,a)=>o.walkAsync(e[a],(u,_)=>(_=oe.dereference(_,u),u==="address"?Re(_,i):_))))}function T1(n){const t=async function(a){const u=await _h(a,["data"]);u.to=await n.getAddress(),u.from&&(u.from=await Re(u.from,uh(n.runner)));const _=n.interface,l=Et(u.value||sh,"overrides.value")===sh,f=(u.data||"0x")==="0x";_.fallback&&!_.fallback.payable&&_.receive&&!f&&!l&&V(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),V(_.fallback||f,"cannot send data to receive-only contract","overrides.data",u.data);const g=_.receive||_.fallback&&_.fallback.payable;return V(g||l,"cannot send value to non-payable fallback","overrides.value",u.value),V(_.fallback||f,"cannot send data to receive-only contract","overrides.data",u.data),u},e=async function(a){const u=Oi(n.runner,"call");ut(oh(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const _=await t(a);try{return await u.call(_)}catch(l){throw fa(l)&&l.data?n.interface.makeError(l.data,_):l}},r=async function(a){const u=n.runner;ut(ch(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const _=await u.sendTransaction(await t(a)),l=Ti(n.runner);return new tc(n.interface,l,_)},i=async function(a){const u=Oi(n.runner,"estimateGas");return ut(ah(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await t(a))},o=async a=>await r(a);return St(o,{_contract:n,estimateGas:i,populateTransaction:t,send:r,staticCall:e}),o}function C1(n,t){const e=function(...l){const f=n.interface.getFunction(t,l);return ut(f,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:l}}),f},r=async function(...l){const f=e(...l);let g={};if(f.inputs.length+1===l.length&&(g=await _h(l.pop()),g.from&&(g.from=await Re(g.from,uh(n.runner)))),f.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const y=await O1(n.runner,f.inputs,l);return Object.assign({},g,await Ee({to:n.getAddress(),data:n.interface.encodeFunctionData(f,y)}))},i=async function(...l){const f=await u(...l);return f.length===1?f[0]:f},o=async function(...l){const f=n.runner;ut(ch(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const g=await f.sendTransaction(await r(...l)),y=Ti(n.runner);return new tc(n.interface,y,g)},a=async function(...l){const f=Oi(n.runner,"estimateGas");return ut(ah(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await r(...l))},u=async function(...l){const f=Oi(n.runner,"call");ut(oh(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const g=await r(...l);let y="0x";try{y=await f.call(g)}catch(F){throw fa(F)&&F.data?n.interface.makeError(F.data,g):F}const v=e(...l);return n.interface.decodeFunctionResult(v,y)},_=async(...l)=>e(...l).constant?await i(...l):await o(...l);return St(_,{name:n.interface.getFunctionName(t),_contract:n,_key:t,getFragment:e,estimateGas:a,populateTransaction:r,send:o,staticCall:i,staticCallResult:u}),Object.defineProperty(_,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=n.interface.getFunction(t);return ut(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),l}}),_}function N1(n,t){const e=function(...i){const o=n.interface.getEvent(t,i);return ut(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:i}}),o},r=function(...i){return new I1(n,e(...i),i)};return St(r,{name:n.interface.getEventName(t),_contract:n,_key:t,getFragment:e}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=n.interface.getEvent(t);return ut(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),i}}),r}const Do=Symbol.for("_ethersInternal_contract"),fh=new WeakMap;function L1(n,t){fh.set(n[Do],t)}function Le(n){return fh.get(n[Do])}function D1(n){return n&&typeof n=="object"&&"getTopicFilter"in n&&typeof n.getTopicFilter=="function"&&n.fragment}async function ec(n,t){let e,r=null;if(Array.isArray(t)){const o=function(a){if($t(a,32))return a;const u=n.interface.getEvent(a);return V(u,"unknown fragment","name",a),u.topicHash};e=t.map(a=>a==null?null:Array.isArray(a)?a.map(o):o(a))}else t==="*"?e=[null]:typeof t=="string"?$t(t,32)?e=[t]:(r=n.interface.getEvent(t),V(r,"unknown fragment","event",t),e=[r.topicHash]):D1(t)?e=await t.getTopicFilter():"fragment"in t?(r=t.fragment,e=[r.topicHash]):V(!1,"unknown event name","event",t);e=e.map(o=>{if(o==null)return null;if(Array.isArray(o)){const a=Array.from(new Set(o.map(u=>u.toLowerCase())).values());return a.length===1?a[0]:(a.sort(),a)}return o.toLowerCase()});const i=e.map(o=>o==null?"null":Array.isArray(o)?o.join("|"):o).join("&");return{fragment:r,tag:i,topics:e}}async function Gs(n,t){const{subs:e}=Le(n);return e.get((await ec(n,t)).tag)||null}async function lh(n,t,e){const r=Ti(n.runner);ut(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:a}=await ec(n,e),{addr:u,subs:_}=Le(n);let l=_.get(o);if(!l){const g={address:u||n,topics:a},y=T=>{let E=i;if(E==null)try{E=n.interface.getEvent(T.topics[0])}catch{}if(E){const R=E,B=i?n.interface.decodeEventLog(i,T.data,T.topics):[];nc(n,e,B,z=>new F1(n,z,e,R,T))}else nc(n,e,[],R=>new ih(n,R,e,T))};let v=[];l={tag:o,listeners:[],start:()=>{v.length||v.push(r.on(g,y))},stop:async()=>{if(v.length==0)return;let T=v;v=[],await Promise.all(T),r.off(g,y)}},_.set(o,l)}return l}let rc=Promise.resolve();async function U1(n,t,e,r){await rc;const i=await Gs(n,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter(({listener:a,once:u})=>{const _=Array.from(e);r&&_.push(r(u?null:a));try{a.call(n,..._)}catch{}return!u}),i.listeners.length===0&&(i.stop(),Le(n).subs.delete(i.tag)),o>0}async function nc(n,t,e,r){try{await rc}catch{}const i=U1(n,t,e,r);return rc=i,await i}const Uo=["then"];class Hs{target;interface;runner;filters;[Do];fallback;constructor(t,e,r,i){V(typeof t=="string"||Hf(t),"invalid value for Contract target","target",t),r==null&&(r=null);const o=Ii.from(e);St(this,{target:t,runner:r,interface:o}),Object.defineProperty(this,Do,{value:{}});let a,u=null,_=null;if(i){const g=Ti(r);_=new tc(this.interface,g,i)}let l=new Map;if(typeof t=="string")if($t(t))u=t,a=Promise.resolve(t);else{const g=Oi(r,"resolveName");if(!Lo(g))throw ee("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=g.resolveName(t).then(y=>{if(y==null)throw ee("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return Le(this).addr=y,y})}else a=t.getAddress().then(g=>{if(g==null)throw new Error("TODO");return Le(this).addr=g,g});L1(this,{addrPromise:a,addr:u,deployTx:_,subs:l});const f=new Proxy({},{get:(g,y,v)=>{if(typeof y=="symbol"||Uo.indexOf(y)>=0)return Reflect.get(g,y,v);try{return this.getEvent(y)}catch(F){if(!me(F,"INVALID_ARGUMENT")||F.argument!=="key")throw F}},has:(g,y)=>Uo.indexOf(y)>=0?Reflect.has(g,y):Reflect.has(g,y)||this.interface.hasEvent(String(y))});return St(this,{filters:f}),St(this,{fallback:o.receive||o.fallback?T1(this):null}),new Proxy(this,{get:(g,y,v)=>{if(typeof y=="symbol"||y in g||Uo.indexOf(y)>=0)return Reflect.get(g,y,v);try{return g.getFunction(y)}catch(F){if(!me(F,"INVALID_ARGUMENT")||F.argument!=="key")throw F}},has:(g,y)=>typeof y=="symbol"||y in g||Uo.indexOf(y)>=0?Reflect.has(g,y):g.interface.hasFunction(y)})}connect(t){return new Hs(this.target,this.interface,t)}attach(t){return new Hs(t,this.interface,this.runner)}async getAddress(){return await Le(this).addrPromise}async getDeployedCode(){const t=Ti(this.runner);ut(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const e=await t.getCode(await this.getAddress());return e==="0x"?null:e}async waitForDeployment(){const t=this.deploymentTransaction();if(t)return await t.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=Ti(this.runner);return ut(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,o)=>{const a=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",a)}catch(u){o(u)}};a()})}deploymentTransaction(){return Le(this).deployTx}getFunction(t){return typeof t!="string"&&(t=t.format()),C1(this,t)}getEvent(t){return typeof t!="string"&&(t=t.format()),N1(this,t)}async queryTransaction(t){throw new Error("@TODO")}async queryFilter(t,e,r){e==null&&(e=0),r==null&&(r="latest");const{addr:i,addrPromise:o}=Le(this),a=i||await o,{fragment:u,topics:_}=await ec(this,t),l={address:a,topics:_,fromBlock:e,toBlock:r},f=Ti(this.runner);return ut(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(l)).map(g=>{let y=u;if(y==null)try{y=this.interface.getEvent(g.topics[0])}catch{}if(y)try{return new Xa(g,this.interface,y)}catch(v){return new nh(g,v)}return new Ms(g,f)})}async on(t,e){const r=await lh(this,"on",t);return r.listeners.push({listener:e,once:!1}),r.start(),this}async once(t,e){const r=await lh(this,"once",t);return r.listeners.push({listener:e,once:!0}),r.start(),this}async emit(t,...e){return await nc(this,t,e,null)}async listenerCount(t){if(t){const i=await Gs(this,t);return i?i.listeners.length:0}const{subs:e}=Le(this);let r=0;for(const{listeners:i}of e.values())r+=i.length;return r}async listeners(t){if(t){const i=await Gs(this,t);return i?i.listeners.map(({listener:o})=>o):[]}const{subs:e}=Le(this);let r=[];for(const{listeners:i}of e.values())r=r.concat(i.map(({listener:o})=>o));return r}async off(t,e){const r=await Gs(this,t);if(!r)return this;if(e){const i=r.listeners.map(({listener:o})=>o).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(e==null||r.listeners.length===0)&&(r.stop(),Le(this).subs.delete(r.tag)),this}async removeAllListeners(t){if(t){const e=await Gs(this,t);if(!e)return this;e.stop(),Le(this).subs.delete(e.tag)}else{const{subs:e}=Le(this);for(const{tag:r,stop:i}of e.values())i(),e.delete(r)}return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return await this.off(t,e)}static buildClass(t){class e extends Hs{constructor(i,o=null){super(i,t,o)}}return e}static from(t,e,r){return r==null&&(r=null),new this(t,e,r)}}function M1(){return Hs}class nr extends M1(){}function ic(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):V(!1,"unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}class j1{name;constructor(t){St(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,e){throw new Error("unsupported coin")}async decodeAddress(t,e){throw new Error("unsupported coin")}}const hh=new RegExp("^(ipfs)://(.*)$","i"),ph=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),hh,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class fs{provider;address;name;#t;#e;constructor(t,e,r){St(this,{provider:t,address:e,name:r}),this.#t=null,this.#e=new nr(e,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],t)}async supportsWildcard(){return this.#t==null&&(this.#t=(async()=>{try{return await this.#e.supportsInterface("0x9061b923")}catch(t){if(me(t,"CALL_EXCEPTION"))return!1;throw this.#t=null,t}})()),await this.#t}async#r(t,e){e=(e||[]).slice();const r=this.#e.interface;e.unshift(Ja(this.name));let i=null;await this.supportsWildcard()&&(i=r.getFunction(t),ut(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[i1(this.name,255),r.encodeFunctionData(i,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const o=await this.#e[t](...e);return i?r.decodeFunctionResult(i,o)[0]:o}catch(o){if(!me(o,"CALL_EXCEPTION"))throw o}return null}async getAddress(t){if(t==null&&(t=60),t===60)try{const o=await this.#r("addr(bytes32)");return o==null||o===Is?null:o}catch(o){if(me(o,"CALL_EXCEPTION"))return null;throw o}if(t>=0&&t<2147483648){let o=t+2147483648;const a=await this.#r("addr(bytes32,uint)",[o]);if($t(a,20))return Ut(a)}let e=null;for(const o of this.provider.plugins)if(o instanceof j1&&o.supportsCoinType(t)){e=o;break}if(e==null)return null;const r=await this.#r("addr(bytes32,uint)",[t]);if(r==null||r==="0x")return null;const i=await e.decodeAddress(t,r);if(i!=null)return i;ut(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:r}})}async getText(t){const e=await this.#r("text(bytes32,string)",[t]);return e==null||e==="0x"?null:e}async getContentHash(){const t=await this.#r("contenthash(bytes32)");if(t==null||t==="0x")return null;const e=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const i=e[1]==="e3010170"?"ipfs":"ipns",o=parseInt(e[4],16);if(e[5].length===o*2)return`${i}://${oy("0x"+e[2])}`}const r=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;ut(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:"name",value:this.name}];try{const e=await this.getText("avatar");if(e==null)return t.push({type:"!avatar",value:""}),{url:null,linkage:t};t.push({type:"avatar",value:e});for(let r=0;r<ph.length;r++){const i=e.match(ph[r]);if(i==null)continue;const o=i[1].toLowerCase();switch(o){case"https":case"data":return t.push({type:"url",value:e}),{linkage:t,url:e};case"ipfs":{const a=ic(e);return t.push({type:"ipfs",value:e}),t.push({type:"url",value:a}),{linkage:t,url:a}}case"erc721":case"erc1155":{const a=o==="erc721"?"tokenURI(uint256)":"uri(uint256)";t.push({type:o,value:e});const u=await this.getAddress();if(u==null)return t.push({type:"!owner",value:""}),{url:null,linkage:t};const _=(i[2]||"").split("/");if(_.length!==2)return t.push({type:`!${o}caip`,value:i[2]||""}),{url:null,linkage:t};const l=_[1],f=new nr(_[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(o==="erc721"){const k=await f.ownerOf(l);if(u!==k)return t.push({type:"!owner",value:k}),{url:null,linkage:t};t.push({type:"owner",value:k})}else if(o==="erc1155"){const k=await f.balanceOf(u,l);if(!k)return t.push({type:"!balance",value:"0"}),{url:null,linkage:t};t.push({type:"balance",value:k.toString()})}let g=await f[a](l);if(g==null||g==="0x")return t.push({type:"!metadata-url",value:""}),{url:null,linkage:t};t.push({type:"metadata-url-base",value:g}),o==="erc1155"&&(g=g.replace("{id}",ii(l,32).substring(2)),t.push({type:"metadata-url-expanded",value:g})),g.match(/^ipfs:/i)&&(g=ic(g)),t.push({type:"metadata-url",value:g});let y={};const v=await new Cn(g).send();v.assertOk();try{y=v.bodyJson}catch{try{t.push({type:"!metadata",value:v.bodyText})}catch{const E=v.body;return E&&t.push({type:"!metadata",value:yt(E)}),{url:null,linkage:t}}return{url:null,linkage:t}}if(!y)return t.push({type:"!metadata",value:""}),{url:null,linkage:t};t.push({type:"metadata",value:JSON.stringify(y)});let F=y.image;if(typeof F!="string")return t.push({type:"!imageUrl",value:""}),{url:null,linkage:t};if(!F.match(/^(https:\/\/|data:)/i)){if(F.match(hh)==null)return t.push({type:"!imageUrl-ipfs",value:F}),{url:null,linkage:t};t.push({type:"imageUrl-ipfs",value:F}),F=ic(F)}return t.push({type:"url",value:F}),{linkage:t,url:F}}}}}catch{}return{linkage:t,url:null}}static async getEnsAddress(t){const e=await t.getNetwork(),r=e.getPlugin("org.ethers.plugins.network.Ens");return ut(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:e}}),r.address}static async#n(t,e){const r=await fs.getEnsAddress(t);try{const o=await new nr(r,["function resolver(bytes32) view returns (address)"],t).resolver(Ja(e),{enableCcipRead:!0});return o===Is?null:o}catch(i){throw i}return null}static async fromName(t,e){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const i=await fs.#n(t,r);if(i!=null){const o=new fs(t,i,e);return r!==e&&!await o.supportsWildcard()?null:o}r=r.split(".").slice(1).join(".")}}}const dh=BigInt(0);function Lt(n,t){return function(e){return e==null?t:n(e)}}function Vs(n,t){return e=>{if(t&&e==null)return null;if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>n(r))}}function qs(n,t){return e=>{const r={};for(const i in n){let o=i;if(t&&i in t&&!(o in e)){for(const a of t[i])if(a in e){o=a;break}}try{const a=n[i](e[o]);a!==void 0&&(r[i]=a)}catch(a){const u=a instanceof Error?a.message:"not-an-error";ut(!1,`invalid value for value.${i} (${u})`,"BAD_DATA",{value:e})}}return r}}function G1(n){switch(n){case!0:case"true":return!0;case!1:case"false":return!1}V(!1,`invalid boolean; ${JSON.stringify(n)}`,"value",n)}function ls(n){return V($t(n,!0),"invalid data","value",n),n}function Ae(n){return V($t(n,32),"invalid hash","value",n),n}const H1=qs({address:Ut,blockHash:Ae,blockNumber:Tt,data:ls,index:Tt,removed:Lt(G1,!1),topics:Vs(Ae),transactionHash:Ae,transactionIndex:Tt},{index:["logIndex"]});function V1(n){return H1(n)}const q1=qs({hash:Lt(Ae),parentHash:Ae,parentBeaconBlockRoot:Lt(Ae,null),number:Tt,timestamp:Tt,nonce:Lt(ls),difficulty:Et,gasLimit:Et,gasUsed:Et,stateRoot:Lt(Ae,null),receiptsRoot:Lt(Ae,null),blobGasUsed:Lt(Et,null),excessBlobGas:Lt(Et,null),miner:Lt(Ut),prevRandao:Lt(Ae,null),extraData:ls,baseFeePerGas:Lt(Et)},{prevRandao:["mixHash"]});function Q1(n){const t=q1(n);return t.transactions=n.transactions.map(e=>typeof e=="string"?e:wh(e)),t}const K1=qs({transactionIndex:Tt,blockNumber:Tt,transactionHash:Ae,address:Ut,topics:Vs(Ae),data:ls,index:Tt,blockHash:Ae},{index:["logIndex"]});function W1(n){return K1(n)}const J1=qs({to:Lt(Ut,null),from:Lt(Ut,null),contractAddress:Lt(Ut,null),index:Tt,root:Lt(yt),gasUsed:Et,blobGasUsed:Lt(Et,null),logsBloom:Lt(ls),blockHash:Ae,hash:Ae,logs:Vs(W1),blockNumber:Tt,cumulativeGasUsed:Et,effectiveGasPrice:Lt(Et),blobGasPrice:Lt(Et,null),status:Lt(Tt),type:Lt(Tt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function $1(n){return J1(n)}function wh(n){n.to&&Et(n.to)===dh&&(n.to="0x0000000000000000000000000000000000000000");const t=qs({hash:Ae,index:Lt(Tt,void 0),type:e=>e==="0x"||e==null?0:Tt(e),accessList:Lt(vi,null),blobVersionedHashes:Lt(Vs(Ae,!0),null),authorizationList:Lt(Vs(e=>{let r;if(e.signature)r=e.signature;else{let i=e.yParity;i==="0x1b"?i=0:i==="0x1c"&&(i=1),r=Object.assign({},e,{yParity:i})}return{address:Ut(e.address),chainId:Et(e.chainId),nonce:Et(e.nonce),signature:se.from(r)}},!1),null),blockHash:Lt(Ae,null),blockNumber:Lt(Tt,null),transactionIndex:Lt(Tt,null),from:Ut,gasPrice:Lt(Et),maxPriorityFeePerGas:Lt(Et),maxFeePerGas:Lt(Et),maxFeePerBlobGas:Lt(Et,null),gasLimit:Et,to:Lt(Ut,null),value:Et,nonce:Tt,data:ls,creates:Lt(Ut,null),chainId:Lt(Et,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(n);if(t.to==null&&t.creates==null&&(t.creates=j0(t)),(n.type===1||n.type===2)&&n.accessList==null&&(t.accessList=[]),n.signature?t.signature=se.from(n.signature):t.signature=se.from(n),t.chainId==null){const e=t.signature.legacyChainId;e!=null&&(t.chainId=e)}return t.blockHash&&Et(t.blockHash)===dh&&(t.blockHash=null),t}const Y1="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Qs{name;constructor(t){St(this,{name:t})}clone(){return new Qs(this.name)}}class Mo extends Qs{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(t,e){t==null&&(t=0),super(`org.ethers.network.plugins.GasCost#${t||0}`);const r={effectiveBlock:t};function i(o,a){let u=(e||{})[o];u==null&&(u=a),V(typeof u=="number",`invalud value for ${o}`,"costs",e),r[o]=u}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),St(this,r)}clone(){return new Mo(this.effectiveBlock,this)}}class jo extends Qs{address;targetNetwork;constructor(t,e){super("org.ethers.plugins.network.Ens"),St(this,{address:t||Y1,targetNetwork:e??1})}clone(){return new jo(this.address,this.targetNetwork)}}class Z1 extends Qs{#t;#e;get url(){return this.#t}get processFunc(){return this.#e}constructor(t,e){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#t=t,this.#e=e}clone(){return this}}const sc=new Map;class De{#t;#e;#r;constructor(t,e){this.#t=t,this.#e=Et(e),this.#r=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#t}set name(t){this.#t=t}get chainId(){return this.#e}set chainId(t){this.#e=Et(t,"chainId")}matches(t){if(t==null)return!1;if(typeof t=="string"){try{return this.chainId===Et(t)}catch{}return this.name===t}if(typeof t=="number"||typeof t=="bigint"){try{return this.chainId===Et(t)}catch{}return!1}if(typeof t=="object"){if(t.chainId!=null){try{return this.chainId===Et(t.chainId)}catch{}return!1}return t.name!=null?this.name===t.name:!1}return!1}get plugins(){return Array.from(this.#r.values())}attachPlugin(t){if(this.#r.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#r.set(t.name,t.clone()),this}getPlugin(t){return this.#r.get(t)||null}getPlugins(t){return this.plugins.filter(e=>e.name.split("#")[0]===t)}clone(){const t=new De(this.name,this.chainId);return this.plugins.forEach(e=>{t.attachPlugin(e.clone())}),t}computeIntrinsicGas(t){const e=this.getPlugin("org.ethers.plugins.network.GasCost")||new Mo;let r=e.txBase;if(t.to==null&&(r+=e.txCreate),t.data)for(let i=2;i<t.data.length;i+=2)t.data.substring(i,i+2)==="00"?r+=e.txDataZero:r+=e.txDataNonzero;if(t.accessList){const i=vi(t.accessList);for(const o in i)r+=e.txAccessListAddress+e.txAccessListStorageKey*i[o].storageKeys.length}return r}static from(t){if(X1(),t==null)return De.from("mainnet");if(typeof t=="number"&&(t=BigInt(t)),typeof t=="string"||typeof t=="bigint"){const e=sc.get(t);if(e)return e();if(typeof t=="bigint")return new De("unknown",t);V(!1,"unknown network","network",t)}if(typeof t.clone=="function")return t.clone();if(typeof t=="object"){V(typeof t.name=="string"&&typeof t.chainId=="number","invalid network object name or chainId","network",t);const e=new De(t.name,t.chainId);return(t.ensAddress||t.ensNetwork!=null)&&e.attachPlugin(new jo(t.ensAddress,t.ensNetwork)),e}V(!1,"invalid network","network",t)}static register(t,e){typeof t=="number"&&(t=BigInt(t));const r=sc.get(t);r&&V(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",t),sc.set(t,e)}}function gh(n,t){const e=String(n);if(!e.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${n}`);const r=e.split(".");if(r.length===1&&r.push(""),r.length!==2)throw new Error(`invalid gwei value: ${n}`);for(;r[1].length<t;)r[1]+="0";if(r[1].length>9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function yh(n){return new Z1(n,async(t,e,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[o,a]=await Promise.all([r.send(),t()]);i=o;const u=i.bodyJson.standard;return{gasPrice:a.gasPrice,maxFeePerGas:gh(u.maxFee,9),maxPriorityFeePerGas:gh(u.maxPriorityFee,9)}}catch(o){ut(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:o})}})}let bh=!1;function X1(){if(bh)return;bh=!0;function n(t,e,r){const i=function(){const o=new De(t,e);return r.ensNetwork!=null&&o.attachPlugin(new jo(null,r.ensNetwork)),o.attachPlugin(new Mo),(r.plugins||[]).forEach(a=>{o.attachPlugin(a)}),o};De.register(t,i),De.register(e,i),r.altNames&&r.altNames.forEach(o=>{De.register(o,i)})}n("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),n("ropsten",3,{ensNetwork:3}),n("rinkeby",4,{ensNetwork:4}),n("goerli",5,{ensNetwork:5}),n("kovan",42,{ensNetwork:42}),n("sepolia",11155111,{ensNetwork:11155111}),n("holesky",17e3,{ensNetwork:17e3}),n("classic",61,{}),n("classicKotti",6,{}),n("arbitrum",42161,{ensNetwork:1}),n("arbitrum-goerli",421613,{}),n("arbitrum-sepolia",421614,{}),n("base",8453,{ensNetwork:1}),n("base-goerli",84531,{}),n("base-sepolia",84532,{}),n("bnb",56,{ensNetwork:1}),n("bnbt",97,{}),n("linea",59144,{ensNetwork:1}),n("linea-goerli",59140,{}),n("linea-sepolia",59141,{}),n("matic",137,{ensNetwork:1,plugins:[yh("https://gasstation.polygon.technology/v2")]}),n("matic-amoy",80002,{}),n("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[yh("https://gasstation-testnet.polygon.technology/v2")]}),n("optimism",10,{ensNetwork:1,plugins:[]}),n("optimism-goerli",420,{}),n("optimism-sepolia",11155420,{}),n("xdai",100,{ensNetwork:1})}function oc(n){return JSON.parse(JSON.stringify(n))}class tm{#t;#e;#r;#n;constructor(t){this.#t=t,this.#e=null,this.#r=4e3,this.#n=-2}get pollingInterval(){return this.#r}set pollingInterval(t){this.#r=t}async#i(){try{const t=await this.#t.getBlockNumber();if(this.#n===-2){this.#n=t;return}if(t!==this.#n){for(let e=this.#n+1;e<=t;e++){if(this.#e==null)return;await this.#t.emit("block",e)}this.#n=t}}catch{}this.#e!=null&&(this.#e=this.#t._setTimeout(this.#i.bind(this),this.#r))}start(){this.#e||(this.#e=this.#t._setTimeout(this.#i.bind(this),this.#r),this.#i())}stop(){this.#e&&(this.#t._clearTimeout(this.#e),this.#e=null)}pause(t){this.stop(),t&&(this.#n=-2)}resume(){this.start()}}class ac{#t;#e;#r;constructor(t){this.#t=t,this.#r=!1,this.#e=e=>{this._poll(e,this.#t)}}async _poll(t,e){throw new Error("sub-classes must override this")}start(){this.#r||(this.#r=!0,this.#e(-2),this.#t.on("block",this.#e))}stop(){this.#r&&(this.#r=!1,this.#t.off("block",this.#e))}pause(t){this.stop()}resume(){this.start()}}class em extends ac{#t;#e;constructor(t,e){super(t),this.#t=e,this.#e=-2}pause(t){t&&(this.#e=-2),super.pause(t)}async _poll(t,e){const r=await e.getBlock(this.#t);r!=null&&(this.#e===-2?this.#e=r.number:r.number>this.#e&&(e.emit(this.#t,r.number),this.#e=r.number))}}class rm extends ac{#t;constructor(t,e){super(t),this.#t=oc(e)}async _poll(t,e){throw new Error("@TODO")}}class nm extends ac{#t;constructor(t,e){super(t),this.#t=e}async _poll(t,e){const r=await e.getTransactionReceipt(this.#t);r&&e.emit(this.#t,r)}}class cc{#t;#e;#r;#n;#i;constructor(t,e){this.#t=t,this.#e=oc(e),this.#r=this.#o.bind(this),this.#n=!1,this.#i=-2}async#o(t){if(this.#i===-2)return;const e=oc(this.#e);e.fromBlock=this.#i+1,e.toBlock=t;const r=await this.#t.getLogs(e);if(r.length===0){this.#i<t-60&&(this.#i=t-60);return}for(const i of r)this.#t.emit(this.#e,i),this.#i=i.blockNumber}start(){this.#n||(this.#n=!0,this.#i===-2&&this.#t.getBlockNumber().then(t=>{this.#i=t}),this.#t.on("block",this.#r))}stop(){this.#n&&(this.#n=!1,this.#t.off("block",this.#r))}pause(t){this.stop(),t&&(this.#i=-2)}resume(){this.start()}}const im=BigInt(2),sm=10;function Go(n){return n&&typeof n.then=="function"}function Ho(n,t){return n+":"+JSON.stringify(t,(e,r)=>{if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((o,a)=>(o[a]=r[a],o),{})}return r})}class mh{name;constructor(t){St(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function om(n){return JSON.parse(JSON.stringify(n))}function uc(n){return n=Array.from(new Set(n).values()),n.sort(),n}async function _c(n,t){if(n==null)throw new Error("invalid event");if(Array.isArray(n)&&(n={topics:n}),typeof n=="string")switch(n){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:n,tag:n}}if($t(n,32)){const e=n.toLowerCase();return{type:"transaction",tag:Ho("tx",{hash:e}),hash:e}}if(n.orphan){const e=n;return{type:"orphan",tag:Ho("orphan",e),filter:om(e)}}if(n.address||n.topics){const e=n,r={topics:(e.topics||[]).map(i=>i==null?null:Array.isArray(i)?uc(i.map(o=>o.toLowerCase())):i.toLowerCase())};if(e.address){const i=[],o=[],a=u=>{$t(u)?i.push(u):o.push((async()=>{i.push(await Re(u,t))})())};Array.isArray(e.address)?e.address.forEach(a):a(e.address),o.length&&await Promise.all(o),r.address=uc(i.map(u=>u.toLowerCase()))}return{filter:r,tag:Ho("event",r),type:"event"}}V(!1,"unknown ProviderEvent","event",n)}function fc(){return new Date().getTime()}const am={cacheTimeout:250,pollingInterval:4e3};class cm{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#d;constructor(t,e){if(this.#d=Object.assign({},am,e||{}),t==="any")this.#o=!0,this.#i=null;else if(t){const r=De.from(t);this.#o=!1,this.#i=Promise.resolve(r),setTimeout(()=>{this.emit("network",r,null)},0)}else this.#o=!1,this.#i=null;this.#a=-1,this.#s=new Map,this.#t=new Map,this.#e=new Map,this.#r=null,this.#n=!1,this.#h=1,this.#u=new Map,this.#p=!1}get pollingInterval(){return this.#d.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#e.values())}attachPlugin(t){if(this.#e.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#e.set(t.name,t.connect(this)),this}getPlugin(t){return this.#e.get(t)||null}get disableCcipRead(){return this.#p}set disableCcipRead(t){this.#p=!!t}async#c(t){const e=this.#d.cacheTimeout;if(e<0)return await this._perform(t);const r=Ho(t.method,t);let i=this.#s.get(r);return i||(i=this._perform(t),this.#s.set(r,i),setTimeout(()=>{this.#s.get(r)===i&&this.#s.delete(r)},e)),await i}async ccipReadFetch(t,e,r){if(this.disableCcipRead||r.length===0||t.to==null)return null;const i=t.to.toLowerCase(),o=e.toLowerCase(),a=[];for(let u=0;u<r.length;u++){const _=r[u],l=_.replace("{sender}",i).replace("{data}",o),f=new Cn(l);_.indexOf("{data}")===-1&&(f.body={data:o,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:f,index:u,urls:r});let g="unknown error",y;try{y=await f.send()}catch(v){a.push(v.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:{error:v}});continue}try{const v=y.bodyJson;if(v.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:f,result:v}),v.data;v.message&&(g=v.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:v})}catch{}ut(y.statusCode<400||y.statusCode>=500,`response not found during CCIP fetch: ${g}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:t,info:{url:_,errorMessage:g}}),a.push(g)}ut(!1,`error encountered during CCIP fetch: ${a.map(u=>JSON.stringify(u)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:t,info:{urls:r,errorMessages:a}})}_wrapBlock(t,e){return new z1(Q1(t),this)}_wrapLog(t,e){return new Ms(V1(t),this)}_wrapTransactionReceipt(t,e){return new th($1(t),this)}_wrapTransactionResponse(t,e){return new js(wh(t),this)}_detectNetwork(){ut(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(t){ut(!1,`unsupported method: ${t.method}`,"UNSUPPORTED_OPERATION",{operation:t.method,info:t})}async getBlockNumber(){const t=Tt(await this.#c({method:"getBlockNumber"}),"%response");return this.#a>=0&&(this.#a=t),t}_getAddress(t){return Re(t,this)}_getBlockTag(t){if(t==null)return"latest";switch(t){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return t}if($t(t))return $t(t,32)?t:Xe(t);if(typeof t=="bigint"&&(t=Tt(t,"blockTag")),typeof t=="number")return t>=0?Xe(t):this.#a>=0?Xe(this.#a+t):this.getBlockNumber().then(e=>Xe(e+t));V(!1,"invalid blockTag","blockTag",t)}_getFilter(t){const e=(t.topics||[]).map(_=>_==null?null:Array.isArray(_)?uc(_.map(l=>l.toLowerCase())):_.toLowerCase()),r="blockHash"in t?t.blockHash:void 0,i=(_,l,f)=>{let g;switch(_.length){case 0:break;case 1:g=_[0];break;default:_.sort(),g=_}if(r&&(l!=null||f!=null))throw new Error("invalid filter");const y={};return g&&(y.address=g),e.length&&(y.topics=e),l&&(y.fromBlock=l),f&&(y.toBlock=f),r&&(y.blockHash=r),y};let o=[];if(t.address)if(Array.isArray(t.address))for(const _ of t.address)o.push(this._getAddress(_));else o.push(this._getAddress(t.address));let a;"fromBlock"in t&&(a=this._getBlockTag(t.fromBlock));let u;return"toBlock"in t&&(u=this._getBlockTag(t.toBlock)),o.filter(_=>typeof _!="string").length||a!=null&&typeof a!="string"||u!=null&&typeof u!="string"?Promise.all([Promise.all(o),a,u]).then(_=>i(_[0],_[1],_[2])):i(o,a,u)}_getTransactionRequest(t){const e=No(t),r=[];if(["to","from"].forEach(i=>{if(e[i]==null)return;const o=Re(e[i],this);Go(o)?r.push(async function(){e[i]=await o}()):e[i]=o}),e.blockTag!=null){const i=this._getBlockTag(e.blockTag);Go(i)?r.push(async function(){e.blockTag=await i}()):e.blockTag=i}return r.length?async function(){return await Promise.all(r),e}():e}async getNetwork(){if(this.#i==null){const i=(async()=>{try{const o=await this._detectNetwork();return this.emit("network",o,null),o}catch(o){throw this.#i===i&&(this.#i=null),o}})();return this.#i=i,(await i).clone()}const t=this.#i,[e,r]=await Promise.all([t,this._detectNetwork()]);return e.chainId!==r.chainId&&(this.#o?(this.emit("network",r,e),this.#i===t&&(this.#i=Promise.resolve(r))):ut(!1,`network changed: ${e.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),e.clone()}async getFeeData(){const t=await this.getNetwork(),e=async()=>{const{_block:i,gasPrice:o,priorityFee:a}=await Ee({_block:this.#g("latest",!1),gasPrice:(async()=>{try{const f=await this.#c({method:"getGasPrice"});return Et(f,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const f=await this.#c({method:"getPriorityFee"});return Et(f,"%response")}catch{}return null})()});let u=null,_=null;const l=this._wrapBlock(i,t);return l&&l.baseFeePerGas&&(_=a??BigInt("1000000000"),u=l.baseFeePerGas*im+_),new Xl(o,u,_)},r=t.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new Cn(r.url),o=await r.processFunc(e,this,i);return new Xl(o.gasPrice,o.maxFeePerGas,o.maxPriorityFeePerGas)}return await e()}async estimateGas(t){let e=this._getTransactionRequest(t);return Go(e)&&(e=await e),Et(await this.#c({method:"estimateGas",transaction:e}),"%response")}async#_(t,e,r){ut(r<sm,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const i=No(t);try{return yt(await this._perform({method:"call",transaction:i,blockTag:e}))}catch(o){if(!this.disableCcipRead&&fa(o)&&o.data&&r>=0&&e==="latest"&&i.to!=null&&ie(o.data,0,4)==="0x556f1830"){const a=o.data,u=await Re(i.to,this);let _;try{_=hm(ie(o.data,4))}catch(g){ut(!1,g.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:a}})}ut(_.sender.toLowerCase()===u.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:_.errorArgs}});const l=await this.ccipReadFetch(i,_.calldata,_.urls);ut(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:o.data,errorArgs:_.errorArgs}});const f={to:u,data:ne([_.selector,lm([l,_.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const g=await this.#_(f,e,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},f),result:g}),g}catch(g){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},f),error:g}),g}}throw o}}async#f(t){const{value:e}=await Ee({network:this.getNetwork(),value:t});return e}async call(t){const{tx:e,blockTag:r}=await Ee({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await this.#f(this.#_(e,r,t.enableCcipRead?0:-1))}async#l(t,e,r){let i=this._getAddress(e),o=this._getBlockTag(r);return(typeof i!="string"||typeof o!="string")&&([i,o]=await Promise.all([i,o])),await this.#f(this.#c(Object.assign(t,{address:i,blockTag:o})))}async getBalance(t,e){return Et(await this.#l({method:"getBalance"},t,e),"%response")}async getTransactionCount(t,e){return Tt(await this.#l({method:"getTransactionCount"},t,e),"%response")}async getCode(t,e){return yt(await this.#l({method:"getCode"},t,e))}async getStorage(t,e,r){const i=Et(e,"position");return yt(await this.#l({method:"getStorage",position:i},t,r))}async broadcastTransaction(t){const{blockNumber:e,hash:r,network:i}=await Ee({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:t}),network:this.getNetwork()}),o=er.from(t);if(o.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(o,i).replaceableTransaction(e)}async#g(t,e){if($t(t,32))return await this.#c({method:"getBlock",blockHash:t,includeTransactions:e});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await this.#c({method:"getBlock",blockTag:r,includeTransactions:e})}async getBlock(t,e){const{network:r,params:i}=await Ee({network:this.getNetwork(),params:this.#g(t,!!e)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(t){const{network:e,params:r}=await Ee({network:this.getNetwork(),params:this.#c({method:"getTransaction",hash:t})});return r==null?null:this._wrapTransactionResponse(r,e)}async getTransactionReceipt(t){const{network:e,params:r}=await Ee({network:this.getNetwork(),params:this.#c({method:"getTransactionReceipt",hash:t})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await this.#c({method:"getTransaction",hash:t});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,e)}async getTransactionResult(t){const{result:e}=await Ee({network:this.getNetwork(),result:this.#c({method:"getTransactionResult",hash:t})});return e==null?null:yt(e)}async getLogs(t){let e=this._getFilter(t);Go(e)&&(e=await e);const{network:r,params:i}=await Ee({network:this.getNetwork(),params:this.#c({method:"getLogs",filter:e})});return i.map(o=>this._wrapLog(o,r))}_getProvider(t){ut(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(t){return await fs.fromName(this,t)}async getAvatar(t){const e=await this.getResolver(t);return e?await e.getAvatar():null}async resolveName(t){const e=await this.getResolver(t);return e?await e.getAddress():null}async lookupAddress(t){t=Ut(t);const e=Ja(t.substring(2).toLowerCase()+".addr.reverse");try{const r=await fs.getEnsAddress(this),o=await new nr(r,["function resolver(bytes32) view returns (address)"],this).resolver(e);if(o==null||o===Is)return null;const u=await new nr(o,["function name(bytes32) view returns (string)"],this).name(e);return await this.resolveName(u)!==t?null:u}catch(r){if(me(r,"BAD_DATA")&&r.value==="0x"||me(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(t,e,r){const i=e??1;return i===0?this.getTransactionReceipt(t):new Promise(async(o,a)=>{let u=null;const _=async l=>{try{const f=await this.getTransactionReceipt(t);if(f!=null&&l-f.blockNumber+1>=i){o(f),u&&(clearTimeout(u),u=null);return}}catch(f){console.log("EEE",f)}this.once("block",_)};r!=null&&(u=setTimeout(()=>{u!=null&&(u=null,this.off("block",_),a(ee("timeout","TIMEOUT",{reason:"timeout"})))},r)),_(await this.getBlockNumber())})}async waitForBlock(t){ut(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(t){const e=this.#u.get(t);e&&(e.timer&&clearTimeout(e.timer),this.#u.delete(t))}_setTimeout(t,e){e==null&&(e=0);const r=this.#h++,i=()=>{this.#u.delete(r),t()};if(this.paused)this.#u.set(r,{timer:null,func:i,time:e});else{const o=setTimeout(i,e);this.#u.set(r,{timer:o,func:i,time:fc()})}return r}_forEachSubscriber(t){for(const e of this.#t.values())t(e.subscriber)}_getSubscriber(t){switch(t.type){case"debug":case"error":case"network":return new mh(t.type);case"block":{const e=new tm(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new em(this,t.type);case"event":return new cc(this,t.filter);case"transaction":return new nm(this,t.hash);case"orphan":return new rm(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,e){for(const r of this.#t.values())if(r.subscriber===t){r.started&&r.subscriber.stop(),r.subscriber=e,r.started&&e.start(),this.#r!=null&&e.pause(this.#r);break}}async#w(t,e){let r=await _c(t,this);return r.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(r=await _c({orphan:"drop-log",log:e[0]},this)),this.#t.get(r.tag)||null}async#y(t){const e=await _c(t,this),r=e.tag;let i=this.#t.get(r);return i||(i={subscriber:this._getSubscriber(e),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#t.set(r,i)),i}async on(t,e){const r=await this.#y(t);return r.listeners.push({listener:e,once:!1}),r.started||(r.subscriber.start(),r.started=!0,this.#r!=null&&r.subscriber.pause(this.#r)),this}async once(t,e){const r=await this.#y(t);return r.listeners.push({listener:e,once:!0}),r.started||(r.subscriber.start(),r.started=!0,this.#r!=null&&r.subscriber.pause(this.#r)),this}async emit(t,...e){const r=await this.#w(t,e);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:o,once:a})=>{const u=new I_(this,a?null:o,t);try{o.call(this,...e,u)}catch{}return!a}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),this.#t.delete(r.tag)),i>0}async listenerCount(t){if(t){const r=await this.#w(t);return r?r.listeners.length:0}let e=0;for(const{listeners:r}of this.#t.values())e+=r.length;return e}async listeners(t){if(t){const r=await this.#w(t);return r?r.listeners.map(({listener:i})=>i):[]}let e=[];for(const{listeners:r}of this.#t.values())e=e.concat(r.map(({listener:i})=>i));return e}async off(t,e){const r=await this.#w(t);if(!r)return this;if(e){const i=r.listeners.map(({listener:o})=>o).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(!e||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),this.#t.delete(r.tag)),this}async removeAllListeners(t){if(t){const{tag:e,started:r,subscriber:i}=await this.#y(t);r&&i.stop(),this.#t.delete(e)}else for(const[e,{started:r,subscriber:i}]of this.#t)r&&i.stop(),this.#t.delete(e);return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return this.off(t,e)}get destroyed(){return this.#n}destroy(){this.removeAllListeners();for(const t of this.#u.keys())this._clearTimeout(t);this.#n=!0}get paused(){return this.#r!=null}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(this.#a=-1,this.#r!=null){if(this.#r==!!t)return;ut(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(e=>e.pause(t)),this.#r=!!t;for(const e of this.#u.values())e.timer&&clearTimeout(e.timer),e.time=fc()-e.time}resume(){if(this.#r!=null){this._forEachSubscriber(t=>t.resume()),this.#r=null;for(const t of this.#u.values()){let e=t.time;e<0&&(e=0),t.time=fc(),setTimeout(t.func,e)}}}}function um(n,t){try{const e=lc(n,t);if(e)return fo(e)}catch{}return null}function lc(n,t){if(n==="0x")return null;try{const e=Tt(ie(n,t,t+32)),r=Tt(ie(n,e,e+32));return ie(n,e+32,e+32+r)}catch{}return null}function Ah(n){const t=he(n);if(t.length>32)throw new Error("internal; should not happen");const e=new Uint8Array(32);return e.set(t,32-t.length),e}function _m(n){if(n.length%32===0)return n;const t=new Uint8Array(Math.ceil(n.length/32)*32);return t.set(n),t}const fm=new Uint8Array([]);function lm(n){const t=[];let e=0;for(let r=0;r<n.length;r++)t.push(fm),e+=32;for(let r=0;r<n.length;r++){const i=Ot(n[r]);t[r]=Ah(e),t.push(Ah(i.length)),t.push(_m(i)),e+=32+Math.ceil(i.length/32)*32}return ne(t)}const Eh="0x0000000000000000000000000000000000000000000000000000000000000000";function hm(n){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};ut(Yi(n)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const e=ie(n,0,32);ut(ie(e,0,12)===ie(Eh,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=ie(e,12);try{const r=[],i=Tt(ie(n,32,64)),o=Tt(ie(n,i,i+32)),a=ie(n,i+32);for(let u=0;u<o;u++){const _=um(a,u*32);if(_==null)throw new Error("abort");r.push(_)}t.urls=r}catch{ut(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=lc(n,64);if(r==null)throw new Error("abort");t.calldata=r}catch{ut(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}ut(ie(n,100,128)===ie(Eh,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=ie(n,96,100);try{const r=lc(n,128);if(r==null)throw new Error("abort");t.extraData=r}catch{ut(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(r=>t[r]),t}function Ci(n,t){if(n.provider)return n.provider;ut(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function vh(n,t){let e=No(t);if(e.to!=null&&(e.to=Re(e.to,n)),e.from!=null){const r=e.from;e.from=Promise.all([n.getAddress(),Re(r,n)]).then(([i,o])=>(V(i.toLowerCase()===o.toLowerCase(),"transaction from mismatch","tx.from",o),i))}else e.from=n.getAddress();return await Ee(e)}class pm{provider;constructor(t){St(this,{provider:t||null})}async getNonce(t){return Ci(this,"getTransactionCount").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await vh(this,t)}async populateTransaction(t){const e=Ci(this,"populateTransaction"),r=await vh(this,t);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const a=Et(r.chainId);V(a===i.chainId,"transaction chainId mismatch","tx.chainId",t.chainId)}else r.chainId=i.chainId;const o=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||o)?V(!1,"eip-1559 transaction do not support gasPrice","tx",t):(r.type===0||r.type===1)&&o&&V(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",t),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const a=await e.getFeeData();ut(a.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice)}else{const a=await e.getFeeData();if(r.type==null)if(a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,r.gasPrice!=null){const u=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=u,r.maxPriorityFeePerGas=u}else r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else a.gasPrice!=null?(ut(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice),r.type=0):ut(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(r.type===2||r.type===3||r.type===4)&&(r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}return await Ee(r)}async populateAuthorization(t){const e=Object.assign({},t);return e.chainId==null&&(e.chainId=(await Ci(this,"getNetwork").getNetwork()).chainId),e.nonce==null&&(e.nonce=await this.getNonce()),e}async estimateGas(t){return Ci(this,"estimateGas").estimateGas(await this.populateCall(t))}async call(t){return Ci(this,"call").call(await this.populateCall(t))}async resolveName(t){return await Ci(this,"resolveName").resolveName(t)}async sendTransaction(t){const e=Ci(this,"sendTransaction"),r=await this.populateTransaction(t);delete r.from;const i=er.from(r);return await e.broadcastTransaction(await this.signTransaction(i))}authorize(t){ut(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}function dm(n){return JSON.parse(JSON.stringify(n))}class xh{#t;#e;#r;#n;#i;#o;constructor(t){this.#t=t,this.#e=null,this.#r=this.#s.bind(this),this.#n=!1,this.#i=null,this.#o=!1}_subscribe(t){throw new Error("subclasses must override this")}_emitResults(t,e){throw new Error("subclasses must override this")}_recover(t){throw new Error("subclasses must override this")}async#s(t){try{this.#e==null&&(this.#e=this._subscribe(this.#t));let e=null;try{e=await this.#e}catch(o){if(!me(o,"UNSUPPORTED_OPERATION")||o.operation!=="eth_newFilter")throw o}if(e==null){this.#e=null,this.#t._recoverSubscriber(this,this._recover(this.#t));return}const r=await this.#t.getNetwork();if(this.#i||(this.#i=r),this.#i.chainId!==r.chainId)throw new Error("chaid changed");if(this.#o)return;const i=await this.#t.send("eth_getFilterChanges",[e]);await this._emitResults(this.#t,i)}catch(e){console.log("@TODO",e)}this.#t.once("block",this.#r)}#a(){const t=this.#e;t&&(this.#e=null,t.then(e=>{this.#t.destroyed||this.#t.send("eth_uninstallFilter",[e])}))}start(){this.#n||(this.#n=!0,this.#s(-2))}stop(){this.#n&&(this.#n=!1,this.#o=!0,this.#a(),this.#t.off("block",this.#r))}pause(t){t&&this.#a(),this.#t.off("block",this.#r)}resume(){this.start()}}class wm extends xh{#t;constructor(t,e){super(t),this.#t=dm(e)}_recover(t){return new cc(t,this.#t)}async _subscribe(t){return await t.send("eth_newFilter",[this.#t])}async _emitResults(t,e){for(const r of e)t.emit(this.#t,t._wrapLog(r,t._network))}}class gm extends xh{async _subscribe(t){return await t.send("eth_newPendingTransactionFilter",[])}async _emitResults(t,e){for(const r of e)t.emit("pending",r)}}const ym="bigint,boolean,function,number,string,symbol".split(/,/g);function Vo(n){if(n==null||ym.indexOf(typeof n)>=0||typeof n.getAddress=="function")return n;if(Array.isArray(n))return n.map(Vo);if(typeof n=="object")return Object.keys(n).reduce((t,e)=>(t[e]=n[e],t),{});throw new Error(`should not happen: ${n} (${typeof n})`)}function bm(n){return new Promise(t=>{setTimeout(t,n)})}function hs(n){return n&&n.toLowerCase()}function Rh(n){return n&&typeof n.pollingInterval=="number"}const Sh={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class hc extends pm{address;constructor(t,e){super(t),e=Ut(e),St(this,{address:e})}connect(t){ut(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const e=Vo(t),r=[];if(e.from){const o=e.from;r.push((async()=>{const a=await Re(o,this.provider);V(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),e.from=a})())}else e.from=this.address;if(e.gasLimit==null&&r.push((async()=>{e.gasLimit=await this.provider.estimateGas({...e,from:this.address})})()),e.to!=null){const o=e.to;r.push((async()=>{e.to=await Re(o,this.provider)})())}r.length&&await Promise.all(r);const i=this.provider.getRpcTransaction(e);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(t){const e=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(t);return await new Promise((i,o)=>{const a=[1e3,100];let u=0;const _=async()=>{try{const l=await this.provider.getTransaction(r);if(l!=null){i(l.replaceableTransaction(e));return}}catch(l){if(me(l,"CANCELLED")||me(l,"BAD_DATA")||me(l,"NETWORK_ERROR")||me(l,"UNSUPPORTED_OPERATION")){l.info==null&&(l.info={}),l.info.sendTransactionHash=r,o(l);return}if(me(l,"INVALID_ARGUMENT")&&(u++,l.info==null&&(l.info={}),l.info.sendTransactionHash=r,u>10)){o(l);return}this.provider.emit("error",ee("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:l}))}this.provider._setTimeout(()=>{_()},a.pop()||4e3)};_()})}async signTransaction(t){const e=Vo(t);if(e.from){const i=await Re(e.from,this.provider);V(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),e.from=i}else e.from=this.address;const r=this.provider.getRpcTransaction(e);return await this.provider.send("eth_signTransaction",[r])}async signMessage(t){const e=typeof t=="string"?Qn(t):t;return await this.provider.send("personal_sign",[yt(e),this.address.toLowerCase()])}async signTypedData(t,e,r){const i=Vo(r),o=await ke.resolveNames(t,e,i,async a=>{const u=await Re(a);return V(u!=null,"TypedData does not support null address","value",a),u});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ke.getPayload(o.domain,e,o.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const e=typeof t=="string"?Qn(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),yt(e)])}}class mm extends cm{#t;#e;#r;#n;#i;#o;#s;#a(){if(this.#n)return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");this.#n=setTimeout(()=>{this.#n=null;const e=this.#r;for(this.#r=[];e.length;){const r=[e.shift()];for(;e.length&&r.length!==this.#t.batchMaxCount;)if(r.push(e.shift()),JSON.stringify(r.map(o=>o.payload)).length>this.#t.batchMaxSize){e.unshift(r.pop());break}(async()=>{const i=r.length===1?r[0].payload:r.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:u,payload:_}of r){if(this.destroyed){u(ee("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:_.method}));continue}const l=o.filter(f=>f.id===_.id)[0];if(l==null){const f=ee("missing response for request","BAD_DATA",{value:o,info:{payload:_}});this.emit("error",f),u(f);continue}if("error"in l){u(this.getRpcError(_,l));continue}a(l.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of r)a(o)}})()}},t)}constructor(t,e){super(t,e),this.#e=1,this.#t=Object.assign({},Sh,e||{}),this.#r=[],this.#n=null,this.#o=null,this.#s=null;{let i=null;const o=new Promise(a=>{i=a});this.#i={promise:o,resolve:i}}const r=this._getOption("staticNetwork");typeof r=="boolean"?(V(!r||t!=="any","staticNetwork cannot be used on special network 'any'","options",e),r&&t!=null&&(this.#o=De.from(t))):r&&(V(t==null||r.matches(t),"staticNetwork MUST match network object","options",e),this.#o=r)}_getOption(t){return this.#t[t]}get _network(){return ut(this.#o,"network is not available yet","NETWORK_ERROR"),this.#o}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&Et(r.type)&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},r,{type:void 0})}))}}const e=this.getRpcRequest(t);return e!=null?await this.send(e.method,e.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)if(t===!0){if(this.#o)return this.#o}else return t;return this.#s?await this.#s:this.ready?(this.#s=(async()=>{try{const e=De.from(Et(await this.send("eth_chainId",[])));return this.#s=null,e}catch(e){throw this.#s=null,e}})(),await this.#s):(this.#s=(async()=>{const e={id:this.#e++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:e});let r;try{r=(await this._send(e))[0],this.#s=null}catch(i){throw this.#s=null,this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:r}),"result"in r)return De.from(Et(r.result));throw this.getRpcError(e,r)})(),await this.#s)}_start(){this.#i==null||this.#i.resolve==null||(this.#i.resolve(),this.#i=null,(async()=>{for(;this.#o==null&&!this.destroyed;)try{this.#o=await this._detectNetwork()}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",ee("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await bm(1e3)}this.#a()})())}async _waitUntilReady(){if(this.#i!=null)return await this.#i.promise}_getSubscriber(t){return t.type==="pending"?new gm(this):t.type==="event"?this._getOption("polling")?new cc(this,t.filter):new wm(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new mh("orphan"):super._getSubscriber(t)}get ready(){return this.#i==null}getRpcTransaction(t){const e={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(r=>{if(t[r]==null)return;let i=r;r==="gasLimit"&&(i="gas"),e[i]=Xe(Et(t[r],`tx.${r}`))}),["from","to","data"].forEach(r=>{t[r]!=null&&(e[r]=yt(t[r]))}),t.accessList&&(e.accessList=vi(t.accessList)),t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.map(r=>r.toLowerCase())),t.authorizationList&&(e.authorizationList=t.authorizationList.map(r=>{const i=Wf(r);return{address:i.address,nonce:Xe(i.nonce),chainId:Xe(i.chainId),yParity:Xe(i.signature.yParity),r:Xe(i.signature.r),s:Xe(i.signature.s)}})),e}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[hs(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[hs(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[hs(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[hs(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(hs):t.filter.address=hs(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,e){const{method:r}=t,{error:i}=e;if(r==="eth_estimateGas"&&i.message){const u=i.message;if(!u.match(/revert/i)&&u.match(/insufficient funds/i))return ee("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:i}});if(u.match(/nonce/i)&&u.match(/too low/i))return ee("nonce has already been used","NONCE_EXPIRED",{transaction:t.params[0],info:{payload:t,error:i}})}if(r==="eth_call"||r==="eth_estimateGas"){const u=pc(i),_=Fi.getBuiltinCallException(r==="eth_call"?"call":"estimateGas",t.params[0],u?u.data:null);return _.info={error:i,payload:t},_}const o=JSON.stringify(Em(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return ee("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[r]||"unknown",reason:"rejected",info:{payload:t,error:i}});if(r==="eth_sendRawTransaction"||r==="eth_sendTransaction"){const u=t.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return ee("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:u,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return ee("nonce has already been used","NONCE_EXPIRED",{transaction:u,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return ee("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:u,info:{error:i}});if(o.match(/only replay-protected/i))return ee("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:u,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?ee("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:i,payload:t}}):ee("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:t})}send(t,e){if(this.destroyed)return Promise.reject(ee("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const r=this.#e++,i=new Promise((o,a)=>{this.#r.push({resolve:o,reject:a,payload:{method:t,params:e,id:r,jsonrpc:"2.0"}})});return this.#a(),i}async getSigner(t){t==null&&(t=0);const e=this.send("eth_accounts",[]);if(typeof t=="number"){const i=await e;if(t>=i.length)throw new Error("no such account");return new hc(this,i[t])}const{accounts:r}=await Ee({network:this.getNetwork(),accounts:e});t=Ut(t);for(const i of r)if(Ut(i)===t)return new hc(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new hc(this,e))}destroy(){this.#n&&(clearTimeout(this.#n),this.#n=null);for(const{payload:t,reject:e}of this.#r)e(ee("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));this.#r=[],super.destroy()}}class zh extends mm{#t;constructor(t,e){super(t,e);let r=this._getOption("pollingInterval");r==null&&(r=Sh.pollingInterval),this.#t=r}_getSubscriber(t){const e=super._getSubscriber(t);return Rh(e)&&(e.pollingInterval=this.#t),e}get pollingInterval(){return this.#t}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");this.#t=t,this._forEachSubscriber(e=>{Rh(e)&&(e.pollingInterval=this.#t)})}}class Am extends zh{#t;constructor(t,e,r){t==null&&(t="http://localhost:8545"),super(e,r),typeof t=="string"?this.#t=new Cn(t):this.#t=t.clone()}_getConnection(){return this.#t.clone()}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){const e=this._getConnection();e.body=JSON.stringify(t),e.setHeader("content-type","application/json");const r=await e.send();r.assertOk();let i=r.bodyJson;return Array.isArray(i)||(i=[i]),i}}function pc(n){if(n==null)return null;if(typeof n.message=="string"&&n.message.match(/revert/i)&&$t(n.data))return{message:n.message,data:n.data};if(typeof n=="object"){for(const t in n){const e=pc(n[t]);if(e)return e}return null}if(typeof n=="string")try{return pc(JSON.parse(n))}catch{}return null}function dc(n,t){if(n!=null){if(typeof n.message=="string"&&t.push(n.message),typeof n=="object")for(const e in n)dc(n[e],t);if(typeof n=="string")try{return dc(JSON.parse(n),t)}catch{}}}function Em(n){const t=[];return dc(n,t),t}class Ni extends zh{#t;#e;constructor(t,e,r){const i=Object.assign({},r??{},{batchMaxCount:1});V(t&&t.request,"invalid EIP-1193 provider","ethereum",t),super(e,i),this.#e=null,r&&r.providerInfo&&(this.#e=r.providerInfo),this.#t=async(o,a)=>{const u={method:o,params:a};this.emit("debug",{action:"sendEip1193Request",payload:u});try{const _=await t.request(u);return this.emit("debug",{action:"receiveEip1193Result",result:_}),_}catch(_){const l=new Error(_.message);throw l.code=_.code,l.data=_.data,l.payload=u,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}}}get providerInfo(){return this.#e}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){V(!Array.isArray(t),"EIP-1193 does not support batch request","payload",t);try{const e=await this.#t(t.method,t.params||[]);return[{id:t.id,result:e}]}catch(e){return[{id:t.id,error:{code:e.code,data:e.data,message:e.message}}]}}getRpcError(t,e){switch(e=JSON.parse(JSON.stringify(e)),e.error.code||-1){case 4001:e.error.message=`ethers-user-denied: ${e.error.message}`;break;case 4200:e.error.message=`ethers-unsupported: ${e.error.message}`;break}return super.getRpcError(t,e)}async hasSigner(t){t==null&&(t=0);const e=await this.send("eth_accounts",[]);return typeof t=="number"?e.length>t:(t=t.toLowerCase(),e.filter(r=>r.toLowerCase()===t).length!==0)}async getSigner(t){if(t==null&&(t=0),!await this.hasSigner(t))try{await this.#t("eth_requestAccounts",[])}catch(e){const r=e.payload;throw this.getRpcError(r,{id:r.id,error:e})}return await super.getSigner(t)}static async discover(t){if(t==null&&(t={}),t.provider)return new Ni(t.provider);const e=t.window?t.window:typeof window<"u"?window:null;if(e==null)return null;const r=t.anyProvider;if(r&&e.ethereum)return new Ni(e.ethereum);if(!("addEventListener"in e&&"dispatchEvent"in e&&"removeEventListener"in e))return null;const i=t.timeout?t.timeout:300;return i===0?null:await new Promise((o,a)=>{let u=[];const _=g=>{u.push(g.detail),r&&l()},l=()=>{if(clearTimeout(f),u.length)if(t&&t.filter){const g=t.filter(u.map(y=>Object.assign({},y.info)));if(g==null)o(null);else if(g instanceof Ni)o(g);else{let y=null;if(g.uuid&&(y=u.filter(F=>g.uuid===F.info.uuid)[0]),y){const{provider:v,info:F}=y;o(new Ni(v,void 0,{providerInfo:F}))}else a(ee("filter returned unknown info","UNSUPPORTED_OPERATION",{value:g}))}}else{const{provider:g,info:y}=u[0];o(new Ni(g,void 0,{providerInfo:y}))}else o(null);e.removeEventListener("eip6963:announceProvider",_)},f=setTimeout(()=>{l()},i);e.addEventListener("eip6963:announceProvider",_),e.dispatchEvent(new Event("eip6963:requestProvider"))})}}var hi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var qo={exports:{}};function vm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var kh={exports:{}},ue=kh.exports={},Un,Mn;function wc(){throw new Error("setTimeout has not been defined")}function gc(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Un=setTimeout:Un=wc}catch{Un=wc}try{typeof clearTimeout=="function"?Mn=clearTimeout:Mn=gc}catch{Mn=gc}})();function Ph(n){if(Un===setTimeout)return setTimeout(n,0);if((Un===wc||!Un)&&setTimeout)return Un=setTimeout,setTimeout(n,0);try{return Un(n,0)}catch{try{return Un.call(null,n,0)}catch{return Un.call(this,n,0)}}}function xm(n){if(Mn===clearTimeout)return clearTimeout(n);if((Mn===gc||!Mn)&&clearTimeout)return Mn=clearTimeout,clearTimeout(n);try{return Mn(n)}catch{try{return Mn.call(null,n)}catch{return Mn.call(this,n)}}}var ri=[],ps=!1,Li,Qo=-1;function Rm(){!ps||!Li||(ps=!1,Li.length?ri=Li.concat(ri):Qo=-1,ri.length&&Fh())}function Fh(){if(!ps){var n=Ph(Rm);ps=!0;for(var t=ri.length;t;){for(Li=ri,ri=[];++Qo<t;)Li&&Li[Qo].run();Qo=-1,t=ri.length}Li=null,ps=!1,xm(n)}}ue.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ri.push(new Ih(n,t)),ri.length===1&&!ps&&Ph(Fh)};function Ih(n,t){this.fun=n,this.array=t}Ih.prototype.run=function(){this.fun.apply(null,this.array)},ue.title="browser",ue.browser=!0,ue.env={},ue.argv=[],ue.version="",ue.versions={};function ni(){}ue.on=ni,ue.addListener=ni,ue.once=ni,ue.off=ni,ue.removeListener=ni,ue.removeAllListeners=ni,ue.emit=ni,ue.prependListener=ni,ue.prependOnceListener=ni,ue.listeners=function(n){return[]},ue.binding=function(n){throw new Error("process.binding is not supported")},ue.cwd=function(){return"/"},ue.chdir=function(n){throw new Error("process.chdir is not supported")},ue.umask=function(){return 0};var Sm=kh.exports;const Ct=vm(Sm);var Ko={exports:{}},Oh;function Th(){if(Oh)return Ko.exports;Oh=1;var n=typeof Reflect=="object"?Reflect:null,t=n&&typeof n.apply=="function"?n.apply:function(O,C,N){return Function.prototype.apply.call(O,C,N)},e;n&&typeof n.ownKeys=="function"?e=n.ownKeys:Object.getOwnPropertySymbols?e=function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:e=function(O){return Object.getOwnPropertyNames(O)};function r(z){console&&console.warn&&console.warn(z)}var i=Number.isNaN||function(O){return O!==O};function o(){o.init.call(this)}Ko.exports=o,Ko.exports.once=E,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function u(z){if(typeof z!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof z)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(z){if(typeof z!="number"||z<0||i(z))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+z+".");a=z}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||i(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this};function _(z){return z._maxListeners===void 0?o.defaultMaxListeners:z._maxListeners}o.prototype.getMaxListeners=function(){return _(this)},o.prototype.emit=function(O){for(var C=[],N=1;N<arguments.length;N++)C.push(arguments[N]);var L=O==="error",J=this._events;if(J!==void 0)L=L&&J.error===void 0;else if(!L)return!1;if(L){var nt;if(C.length>0&&(nt=C[0]),nt instanceof Error)throw nt;var dt=new Error("Unhandled error."+(nt?" ("+nt.message+")":""));throw dt.context=nt,dt}var D=J[O];if(D===void 0)return!1;if(typeof D=="function")t(D,this,C);else for(var vt=D.length,wt=F(D,vt),N=0;N<vt;++N)t(wt[N],this,C);return!0};function l(z,O,C,N){var L,J,nt;if(u(C),J=z._events,J===void 0?(J=z._events=Object.create(null),z._eventsCount=0):(J.newListener!==void 0&&(z.emit("newListener",O,C.listener?C.listener:C),J=z._events),nt=J[O]),nt===void 0)nt=J[O]=C,++z._eventsCount;else if(typeof nt=="function"?nt=J[O]=N?[C,nt]:[nt,C]:N?nt.unshift(C):nt.push(C),L=_(z),L>0&&nt.length>L&&!nt.warned){nt.warned=!0;var dt=new Error("Possible EventEmitter memory leak detected. "+nt.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");dt.name="MaxListenersExceededWarning",dt.emitter=z,dt.type=O,dt.count=nt.length,r(dt)}return z}o.prototype.addListener=function(O,C){return l(this,O,C,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(O,C){return l(this,O,C,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(z,O,C){var N={fired:!1,wrapFn:void 0,target:z,type:O,listener:C},L=f.bind(N);return L.listener=C,N.wrapFn=L,L}o.prototype.once=function(O,C){return u(C),this.on(O,g(this,O,C)),this},o.prototype.prependOnceListener=function(O,C){return u(C),this.prependListener(O,g(this,O,C)),this},o.prototype.removeListener=function(O,C){var N,L,J,nt,dt;if(u(C),L=this._events,L===void 0)return this;if(N=L[O],N===void 0)return this;if(N===C||N.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete L[O],L.removeListener&&this.emit("removeListener",O,N.listener||C));else if(typeof N!="function"){for(J=-1,nt=N.length-1;nt>=0;nt--)if(N[nt]===C||N[nt].listener===C){dt=N[nt].listener,J=nt;break}if(J<0)return this;J===0?N.shift():k(N,J),N.length===1&&(L[O]=N[0]),L.removeListener!==void 0&&this.emit("removeListener",O,dt||C)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(O){var C,N,L;if(N=this._events,N===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[O]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete N[O]),this;if(arguments.length===0){var J=Object.keys(N),nt;for(L=0;L<J.length;++L)nt=J[L],nt!=="removeListener"&&this.removeAllListeners(nt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(C=N[O],typeof C=="function")this.removeListener(O,C);else if(C!==void 0)for(L=C.length-1;L>=0;L--)this.removeListener(O,C[L]);return this};function y(z,O,C){var N=z._events;if(N===void 0)return[];var L=N[O];return L===void 0?[]:typeof L=="function"?C?[L.listener||L]:[L]:C?T(L):F(L,L.length)}o.prototype.listeners=function(O){return y(this,O,!0)},o.prototype.rawListeners=function(O){return y(this,O,!1)},o.listenerCount=function(z,O){return typeof z.listenerCount=="function"?z.listenerCount(O):v.call(z,O)},o.prototype.listenerCount=v;function v(z){var O=this._events;if(O!==void 0){var C=O[z];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function F(z,O){for(var C=new Array(O),N=0;N<O;++N)C[N]=z[N];return C}function k(z,O){for(;O+1<z.length;O++)z[O]=z[O+1];z.pop()}function T(z){for(var O=new Array(z.length),C=0;C<O.length;++C)O[C]=z[C].listener||z[C];return O}function E(z,O){return new Promise(function(C,N){function L(nt){z.removeListener(O,J),N(nt)}function J(){typeof z.removeListener=="function"&&z.removeListener("error",L),C([].slice.call(arguments))}B(z,O,J,{once:!0}),O!=="error"&&R(z,L,{once:!0})})}function R(z,O,C){typeof z.on=="function"&&B(z,"error",O,C)}function B(z,O,C,N){if(typeof z.on=="function")N.once?z.once(O,C):z.on(O,C);else if(typeof z.addEventListener=="function")z.addEventListener(O,function L(J){N.once&&z.removeEventListener(O,L),C(J)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof z)}return Ko.exports}var yc,Ch;function Nh(){return Ch||(Ch=1,yc=Th().EventEmitter),yc}var bc={},Lh;function Wo(){return Lh||(Lh=1,function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},e={};e.byteLength=f,e.toByteArray=y,e.fromByteArray=k;for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,_=a.length;u<_;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;i[45]=62,i[95]=63;function l(R){var B=R.length;if(B%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var z=R.indexOf("=");z===-1&&(z=B);var O=z===B?0:4-z%4;return[z,O]}function f(R){var B=l(R),z=B[0],O=B[1];return(z+O)*3/4-O}function g(R,B,z){return(B+z)*3/4-z}function y(R){var B,z=l(R),O=z[0],C=z[1],N=new o(g(R,O,C)),L=0,J=C>0?O-4:O,nt;for(nt=0;nt<J;nt+=4)B=i[R.charCodeAt(nt)]<<18|i[R.charCodeAt(nt+1)]<<12|i[R.charCodeAt(nt+2)]<<6|i[R.charCodeAt(nt+3)],N[L++]=B>>16&255,N[L++]=B>>8&255,N[L++]=B&255;return C===2&&(B=i[R.charCodeAt(nt)]<<2|i[R.charCodeAt(nt+1)]>>4,N[L++]=B&255),C===1&&(B=i[R.charCodeAt(nt)]<<10|i[R.charCodeAt(nt+1)]<<4|i[R.charCodeAt(nt+2)]>>2,N[L++]=B>>8&255,N[L++]=B&255),N}function v(R){return r[R>>18&63]+r[R>>12&63]+r[R>>6&63]+r[R&63]}function F(R,B,z){for(var O,C=[],N=B;N<z;N+=3)O=(R[N]<<16&16711680)+(R[N+1]<<8&65280)+(R[N+2]&255),C.push(v(O));return C.join("")}function k(R){for(var B,z=R.length,O=z%3,C=[],N=16383,L=0,J=z-O;L<J;L+=N)C.push(F(R,L,L+N>J?J:L+N));return O===1?(B=R[z-1],C.push(r[B>>2]+r[B<<4&63]+"==")):O===2&&(B=(R[z-2]<<8)+R[z-1],C.push(r[B>>10]+r[B>>4&63]+r[B<<2&63]+"=")),C.join("")}var T={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */T.read=function(R,B,z,O,C){var N,L,J=C*8-O-1,nt=(1<<J)-1,dt=nt>>1,D=-7,vt=z?C-1:0,wt=z?-1:1,at=R[B+vt];for(vt+=wt,N=at&(1<<-D)-1,at>>=-D,D+=J;D>0;N=N*256+R[B+vt],vt+=wt,D-=8);for(L=N&(1<<-D)-1,N>>=-D,D+=O;D>0;L=L*256+R[B+vt],vt+=wt,D-=8);if(N===0)N=1-dt;else{if(N===nt)return L?NaN:(at?-1:1)*(1/0);L=L+Math.pow(2,O),N=N-dt}return(at?-1:1)*L*Math.pow(2,N-O)},T.write=function(R,B,z,O,C,N){var L,J,nt,dt=N*8-C-1,D=(1<<dt)-1,vt=D>>1,wt=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,at=O?0:N-1,ht=O?1:-1,mt=B<0||B===0&&1/B<0?1:0;for(B=Math.abs(B),isNaN(B)||B===1/0?(J=isNaN(B)?1:0,L=D):(L=Math.floor(Math.log(B)/Math.LN2),B*(nt=Math.pow(2,-L))<1&&(L--,nt*=2),L+vt>=1?B+=wt/nt:B+=wt*Math.pow(2,1-vt),B*nt>=2&&(L++,nt/=2),L+vt>=D?(J=0,L=D):L+vt>=1?(J=(B*nt-1)*Math.pow(2,C),L=L+vt):(J=B*Math.pow(2,vt-1)*Math.pow(2,C),L=0));C>=8;R[z+at]=J&255,at+=ht,J/=256,C-=8);for(L=L<<C|J,dt+=C;dt>0;R[z+at]=L&255,at+=ht,L/=256,dt-=8);R[z+at-ht]|=mt*128};/*!
6
+ */(function(n){const t=ao,e=_a,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=f,n.SlowBuffer=O,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:u}=globalThis;f.TYPED_ARRAY_SUPPORT=_(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function _(){try{const b=new o(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,o.prototype),Object.setPrototypeOf(b,h),b.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function l(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const h=new o(b);return Object.setPrototypeOf(h,f.prototype),h}function f(b,h,d){if(typeof b=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(b)}return g(b,h,d)}f.poolSize=8192;function g(b,h,d){if(typeof b=="string")return k(b,h);if(a.isView(b))return E(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(he(b,a)||b&&he(b.buffer,a)||typeof u<"u"&&(he(b,u)||b&&he(b.buffer,u)))return R(b,h,d);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const P=b.valueOf&&b.valueOf();if(P!=null&&P!==b)return f.from(P,h,d);const U=B(b);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return f.from(b[Symbol.toPrimitive]("string"),h,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}f.from=function(b,h,d){return g(b,h,d)},Object.setPrototypeOf(f.prototype,o.prototype),Object.setPrototypeOf(f,o);function y(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function v(b,h,d){return y(b),b<=0?l(b):h!==void 0?typeof d=="string"?l(b).fill(h,d):l(b).fill(h):l(b)}f.alloc=function(b,h,d){return v(b,h,d)};function I(b){return y(b),l(b<0?0:z(b)|0)}f.allocUnsafe=function(b){return I(b)},f.allocUnsafeSlow=function(b){return I(b)};function k(b,h){if((typeof h!="string"||h==="")&&(h="utf8"),!f.isEncoding(h))throw new TypeError("Unknown encoding: "+h);const d=C(b,h)|0;let P=l(d);const U=P.write(b,h);return U!==d&&(P=P.slice(0,U)),P}function T(b){const h=b.length<0?0:z(b.length)|0,d=l(h);for(let P=0;P<h;P+=1)d[P]=b[P]&255;return d}function E(b){if(he(b,o)){const h=new o(b);return R(h.buffer,h.byteOffset,h.byteLength)}return T(b)}function R(b,h,d){if(h<0||b.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<h+(d||0))throw new RangeError('"length" is outside of buffer bounds');let P;return h===void 0&&d===void 0?P=new o(b):d===void 0?P=new o(b,h):P=new o(b,h,d),Object.setPrototypeOf(P,f.prototype),P}function B(b){if(f.isBuffer(b)){const h=z(b.length)|0,d=l(h);return d.length===0||b.copy(d,0,0,h),d}if(b.length!==void 0)return typeof b.length!="number"||ze(b.length)?l(0):T(b);if(b.type==="Buffer"&&Array.isArray(b.data))return T(b.data)}function z(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function O(b){return+b!=b&&(b=0),f.alloc(+b)}f.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==f.prototype},f.compare=function(h,d){if(he(h,o)&&(h=f.from(h,h.offset,h.byteLength)),he(d,o)&&(d=f.from(d,d.offset,d.byteLength)),!f.isBuffer(h)||!f.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===d)return 0;let P=h.length,U=d.length;for(let J=0,st=Math.min(P,U);J<st;++J)if(h[J]!==d[J]){P=h[J],U=d[J];break}return P<U?-1:U<P?1:0},f.isEncoding=function(h){switch(String(h).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}},f.concat=function(h,d){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return f.alloc(0);let P;if(d===void 0)for(d=0,P=0;P<h.length;++P)d+=h[P].length;const U=f.allocUnsafe(d);let J=0;for(P=0;P<h.length;++P){let st=h[P];if(he(st,o))J+st.length>U.length?(f.isBuffer(st)||(st=f.from(st)),st.copy(U,J)):o.prototype.set.call(U,st,J);else if(f.isBuffer(st))st.copy(U,J);else throw new TypeError('"list" argument must be an Array of Buffers');J+=st.length}return U};function C(b,h){if(f.isBuffer(b))return b.length;if(a.isView(b)||he(b,a))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const d=b.length,P=arguments.length>2&&arguments[2]===!0;if(!P&&d===0)return 0;let U=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return de(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Qt(b).length;default:if(U)return P?-1:de(b).length;h=(""+h).toLowerCase(),U=!0}}f.byteLength=C;function N(b,h,d){let P=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,h>>>=0,d<=h))return"";for(b||(b="utf8");;)switch(b){case"hex":return W(this,h,d);case"utf8":case"utf-8":return mt(this,h,d);case"ascii":return Pt(this,h,d);case"latin1":case"binary":return jt(this,h,d);case"base64":return pt(this,h,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,h,d);default:if(P)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),P=!0}}f.prototype._isBuffer=!0;function D(b,h,d){const P=b[h];b[h]=b[d],b[d]=P}f.prototype.swap16=function(){const h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<h;d+=2)D(this,d,d+1);return this},f.prototype.swap32=function(){const h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<h;d+=4)D(this,d,d+3),D(this,d+1,d+2);return this},f.prototype.swap64=function(){const h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<h;d+=8)D(this,d,d+7),D(this,d+1,d+6),D(this,d+2,d+5),D(this,d+3,d+4);return this},f.prototype.toString=function(){const h=this.length;return h===0?"":arguments.length===0?mt(this,0,h):N.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(h){if(!f.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:f.compare(this,h)===0},f.prototype.inspect=function(){let h="";const d=n.INSPECT_MAX_BYTES;return h=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(h+=" ... "),"<Buffer "+h+">"},r&&(f.prototype[r]=f.prototype.inspect),f.prototype.compare=function(h,d,P,U,J){if(he(h,o)&&(h=f.from(h,h.offset,h.byteLength)),!f.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(d===void 0&&(d=0),P===void 0&&(P=h?h.length:0),U===void 0&&(U=0),J===void 0&&(J=this.length),d<0||P>h.length||U<0||J>this.length)throw new RangeError("out of range index");if(U>=J&&d>=P)return 0;if(U>=J)return-1;if(d>=P)return 1;if(d>>>=0,P>>>=0,U>>>=0,J>>>=0,this===h)return 0;let st=J-U,It=P-d;const Vt=Math.min(st,It),qt=this.slice(U,J),Wt=h.slice(d,P);for(let Ut=0;Ut<Vt;++Ut)if(qt[Ut]!==Wt[Ut]){st=qt[Ut],It=Wt[Ut];break}return st<It?-1:It<st?1:0};function $(b,h,d,P,U){if(b.length===0)return-1;if(typeof d=="string"?(P=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,ze(d)&&(d=U?0:b.length-1),d<0&&(d=b.length+d),d>=b.length){if(U)return-1;d=b.length-1}else if(d<0)if(U)d=0;else return-1;if(typeof h=="string"&&(h=f.from(h,P)),f.isBuffer(h))return h.length===0?-1:et(b,h,d,P,U);if(typeof h=="number")return h=h&255,typeof o.prototype.indexOf=="function"?U?o.prototype.indexOf.call(b,h,d):o.prototype.lastIndexOf.call(b,h,d):et(b,[h],d,P,U);throw new TypeError("val must be string, number or Buffer")}function et(b,h,d,P,U){let J=1,st=b.length,It=h.length;if(P!==void 0&&(P=String(P).toLowerCase(),P==="ucs2"||P==="ucs-2"||P==="utf16le"||P==="utf-16le")){if(b.length<2||h.length<2)return-1;J=2,st/=2,It/=2,d/=2}function Vt(Wt,Ut){return J===1?Wt[Ut]:Wt.readUInt16BE(Ut*J)}let qt;if(U){let Wt=-1;for(qt=d;qt<st;qt++)if(Vt(b,qt)===Vt(h,Wt===-1?0:qt-Wt)){if(Wt===-1&&(Wt=qt),qt-Wt+1===It)return Wt*J}else Wt!==-1&&(qt-=qt-Wt),Wt=-1}else for(d+It>st&&(d=st-It),qt=d;qt>=0;qt--){let Wt=!0;for(let Ut=0;Ut<It;Ut++)if(Vt(b,qt+Ut)!==Vt(h,Ut)){Wt=!1;break}if(Wt)return qt}return-1}f.prototype.includes=function(h,d,P){return this.indexOf(h,d,P)!==-1},f.prototype.indexOf=function(h,d,P){return $(this,h,d,P,!0)},f.prototype.lastIndexOf=function(h,d,P){return $(this,h,d,P,!1)};function ft(b,h,d,P){d=Number(d)||0;const U=b.length-d;P?(P=Number(P),P>U&&(P=U)):P=U;const J=h.length;P>J/2&&(P=J/2);let st;for(st=0;st<P;++st){const It=parseInt(h.substr(st*2,2),16);if(ze(It))return st;b[d+st]=It}return st}function L(b,h,d,P){return ge(de(h,b.length-d),b,d,P)}function vt(b,h,d,P){return ge(we(h),b,d,P)}function wt(b,h,d,P){return ge(Qt(h),b,d,P)}function at(b,h,d,P){return ge(Gt(h,b.length-d),b,d,P)}f.prototype.write=function(h,d,P,U){if(d===void 0)U="utf8",P=this.length,d=0;else if(P===void 0&&typeof d=="string")U=d,P=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(P)?(P=P>>>0,U===void 0&&(U="utf8")):(U=P,P=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const J=this.length-d;if((P===void 0||P>J)&&(P=J),h.length>0&&(P<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");let st=!1;for(;;)switch(U){case"hex":return ft(this,h,d,P);case"utf8":case"utf-8":return L(this,h,d,P);case"ascii":case"latin1":case"binary":return vt(this,h,d,P);case"base64":return wt(this,h,d,P);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,h,d,P);default:if(st)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),st=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function pt(b,h,d){return h===0&&d===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(h,d))}function mt(b,h,d){d=Math.min(b.length,d);const P=[];let U=h;for(;U<d;){const J=b[U];let st=null,It=J>239?4:J>223?3:J>191?2:1;if(U+It<=d){let Vt,qt,Wt,Ut;switch(It){case 1:J<128&&(st=J);break;case 2:Vt=b[U+1],(Vt&192)===128&&(Ut=(J&31)<<6|Vt&63,Ut>127&&(st=Ut));break;case 3:Vt=b[U+1],qt=b[U+2],(Vt&192)===128&&(qt&192)===128&&(Ut=(J&15)<<12|(Vt&63)<<6|qt&63,Ut>2047&&(Ut<55296||Ut>57343)&&(st=Ut));break;case 4:Vt=b[U+1],qt=b[U+2],Wt=b[U+3],(Vt&192)===128&&(qt&192)===128&&(Wt&192)===128&&(Ut=(J&15)<<18|(Vt&63)<<12|(qt&63)<<6|Wt&63,Ut>65535&&Ut<1114112&&(st=Ut))}}st===null?(st=65533,It=1):st>65535&&(st-=65536,P.push(st>>>10&1023|55296),st=56320|st&1023),P.push(st),U+=It}return xt(P)}const Rt=4096;function xt(b){const h=b.length;if(h<=Rt)return String.fromCharCode.apply(String,b);let d="",P=0;for(;P<h;)d+=String.fromCharCode.apply(String,b.slice(P,P+=Rt));return d}function Pt(b,h,d){let P="";d=Math.min(b.length,d);for(let U=h;U<d;++U)P+=String.fromCharCode(b[U]&127);return P}function jt(b,h,d){let P="";d=Math.min(b.length,d);for(let U=h;U<d;++U)P+=String.fromCharCode(b[U]);return P}function W(b,h,d){const P=b.length;(!h||h<0)&&(h=0),(!d||d<0||d>P)&&(d=P);let U="";for(let J=h;J<d;++J)U+=Fe[b[J]];return U}function Z(b,h,d){const P=b.slice(h,d);let U="";for(let J=0;J<P.length-1;J+=2)U+=String.fromCharCode(P[J]+P[J+1]*256);return U}f.prototype.slice=function(h,d){const P=this.length;h=~~h,d=d===void 0?P:~~d,h<0?(h+=P,h<0&&(h=0)):h>P&&(h=P),d<0?(d+=P,d<0&&(d=0)):d>P&&(d=P),d<h&&(d=h);const U=this.subarray(h,d);return Object.setPrototypeOf(U,f.prototype),U};function nt(b,h,d){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+h>d)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(h,d,P){h=h>>>0,d=d>>>0,P||nt(h,d,this.length);let U=this[h],J=1,st=0;for(;++st<d&&(J*=256);)U+=this[h+st]*J;return U},f.prototype.readUintBE=f.prototype.readUIntBE=function(h,d,P){h=h>>>0,d=d>>>0,P||nt(h,d,this.length);let U=this[h+--d],J=1;for(;d>0&&(J*=256);)U+=this[h+--d]*J;return U},f.prototype.readUint8=f.prototype.readUInt8=function(h,d){return h=h>>>0,d||nt(h,1,this.length),this[h]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(h,d){return h=h>>>0,d||nt(h,2,this.length),this[h]|this[h+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(h,d){return h=h>>>0,d||nt(h,2,this.length),this[h]<<8|this[h+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(h,d){return h=h>>>0,d||nt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(h,d){return h=h>>>0,d||nt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},f.prototype.readBigUInt64LE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&kt(h,this.length-8);const U=d+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,J=this[++h]+this[++h]*2**8+this[++h]*2**16+P*2**24;return BigInt(U)+(BigInt(J)<<BigInt(32))}),f.prototype.readBigUInt64BE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&kt(h,this.length-8);const U=d*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],J=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+P;return(BigInt(U)<<BigInt(32))+BigInt(J)}),f.prototype.readIntLE=function(h,d,P){h=h>>>0,d=d>>>0,P||nt(h,d,this.length);let U=this[h],J=1,st=0;for(;++st<d&&(J*=256);)U+=this[h+st]*J;return J*=128,U>=J&&(U-=Math.pow(2,8*d)),U},f.prototype.readIntBE=function(h,d,P){h=h>>>0,d=d>>>0,P||nt(h,d,this.length);let U=d,J=1,st=this[h+--U];for(;U>0&&(J*=256);)st+=this[h+--U]*J;return J*=128,st>=J&&(st-=Math.pow(2,8*d)),st},f.prototype.readInt8=function(h,d){return h=h>>>0,d||nt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},f.prototype.readInt16LE=function(h,d){h=h>>>0,d||nt(h,2,this.length);const P=this[h]|this[h+1]<<8;return P&32768?P|4294901760:P},f.prototype.readInt16BE=function(h,d){h=h>>>0,d||nt(h,2,this.length);const P=this[h+1]|this[h]<<8;return P&32768?P|4294901760:P},f.prototype.readInt32LE=function(h,d){return h=h>>>0,d||nt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},f.prototype.readInt32BE=function(h,d){return h=h>>>0,d||nt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},f.prototype.readBigInt64LE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&kt(h,this.length-8);const U=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(P<<24);return(BigInt(U)<<BigInt(32))+BigInt(d+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),f.prototype.readBigInt64BE=_e(function(h){h=h>>>0,bt(h,"offset");const d=this[h],P=this[h+7];(d===void 0||P===void 0)&&kt(h,this.length-8);const U=(d<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(U)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+P)}),f.prototype.readFloatLE=function(h,d){return h=h>>>0,d||nt(h,4,this.length),e.read(this,h,!0,23,4)},f.prototype.readFloatBE=function(h,d){return h=h>>>0,d||nt(h,4,this.length),e.read(this,h,!1,23,4)},f.prototype.readDoubleLE=function(h,d){return h=h>>>0,d||nt(h,8,this.length),e.read(this,h,!0,52,8)},f.prototype.readDoubleBE=function(h,d){return h=h>>>0,d||nt(h,8,this.length),e.read(this,h,!1,52,8)};function yt(b,h,d,P,U,J){if(!f.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>U||h<J)throw new RangeError('"value" argument is out of bounds');if(d+P>b.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(h,d,P,U){if(h=+h,d=d>>>0,P=P>>>0,!U){const It=Math.pow(2,8*P)-1;yt(this,h,d,P,It,0)}let J=1,st=0;for(this[d]=h&255;++st<P&&(J*=256);)this[d+st]=h/J&255;return d+P},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(h,d,P,U){if(h=+h,d=d>>>0,P=P>>>0,!U){const It=Math.pow(2,8*P)-1;yt(this,h,d,P,It,0)}let J=P-1,st=1;for(this[d+J]=h&255;--J>=0&&(st*=256);)this[d+J]=h/st&255;return d+P},f.prototype.writeUint8=f.prototype.writeUInt8=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,1,255,0),this[d]=h&255,d+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,2,65535,0),this[d]=h&255,this[d+1]=h>>>8,d+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,2,65535,0),this[d]=h>>>8,this[d+1]=h&255,d+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,4,4294967295,0),this[d+3]=h>>>24,this[d+2]=h>>>16,this[d+1]=h>>>8,this[d]=h&255,d+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,4,4294967295,0),this[d]=h>>>24,this[d+1]=h>>>16,this[d+2]=h>>>8,this[d+3]=h&255,d+4};function H(b,h,d,P,U){Bt(h,P,U,b,d,7);let J=Number(h&BigInt(4294967295));b[d++]=J,J=J>>8,b[d++]=J,J=J>>8,b[d++]=J,J=J>>8,b[d++]=J;let st=Number(h>>BigInt(32)&BigInt(4294967295));return b[d++]=st,st=st>>8,b[d++]=st,st=st>>8,b[d++]=st,st=st>>8,b[d++]=st,d}function M(b,h,d,P,U){Bt(h,P,U,b,d,7);let J=Number(h&BigInt(4294967295));b[d+7]=J,J=J>>8,b[d+6]=J,J=J>>8,b[d+5]=J,J=J>>8,b[d+4]=J;let st=Number(h>>BigInt(32)&BigInt(4294967295));return b[d+3]=st,st=st>>8,b[d+2]=st,st=st>>8,b[d+1]=st,st=st>>8,b[d]=st,d+8}f.prototype.writeBigUInt64LE=_e(function(h,d=0){return H(this,h,d,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=_e(function(h,d=0){return M(this,h,d,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(h,d,P,U){if(h=+h,d=d>>>0,!U){const Vt=Math.pow(2,8*P-1);yt(this,h,d,P,Vt-1,-Vt)}let J=0,st=1,It=0;for(this[d]=h&255;++J<P&&(st*=256);)h<0&&It===0&&this[d+J-1]!==0&&(It=1),this[d+J]=(h/st>>0)-It&255;return d+P},f.prototype.writeIntBE=function(h,d,P,U){if(h=+h,d=d>>>0,!U){const Vt=Math.pow(2,8*P-1);yt(this,h,d,P,Vt-1,-Vt)}let J=P-1,st=1,It=0;for(this[d+J]=h&255;--J>=0&&(st*=256);)h<0&&It===0&&this[d+J+1]!==0&&(It=1),this[d+J]=(h/st>>0)-It&255;return d+P},f.prototype.writeInt8=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,1,127,-128),h<0&&(h=255+h+1),this[d]=h&255,d+1},f.prototype.writeInt16LE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,2,32767,-32768),this[d]=h&255,this[d+1]=h>>>8,d+2},f.prototype.writeInt16BE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,2,32767,-32768),this[d]=h>>>8,this[d+1]=h&255,d+2},f.prototype.writeInt32LE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,4,2147483647,-2147483648),this[d]=h&255,this[d+1]=h>>>8,this[d+2]=h>>>16,this[d+3]=h>>>24,d+4},f.prototype.writeInt32BE=function(h,d,P){return h=+h,d=d>>>0,P||yt(this,h,d,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[d]=h>>>24,this[d+1]=h>>>16,this[d+2]=h>>>8,this[d+3]=h&255,d+4},f.prototype.writeBigInt64LE=_e(function(h,d=0){return H(this,h,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=_e(function(h,d=0){return M(this,h,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function X(b,h,d,P,U,J){if(d+P>b.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function ct(b,h,d,P,U){return h=+h,d=d>>>0,U||X(b,h,d,4),e.write(b,h,d,P,23,4),d+4}f.prototype.writeFloatLE=function(h,d,P){return ct(this,h,d,!0,P)},f.prototype.writeFloatBE=function(h,d,P){return ct(this,h,d,!1,P)};function _t(b,h,d,P,U){return h=+h,d=d>>>0,U||X(b,h,d,8),e.write(b,h,d,P,52,8),d+8}f.prototype.writeDoubleLE=function(h,d,P){return _t(this,h,d,!0,P)},f.prototype.writeDoubleBE=function(h,d,P){return _t(this,h,d,!1,P)},f.prototype.copy=function(h,d,P,U){if(!f.isBuffer(h))throw new TypeError("argument should be a Buffer");if(P||(P=0),!U&&U!==0&&(U=this.length),d>=h.length&&(d=h.length),d||(d=0),U>0&&U<P&&(U=P),U===P||h.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(P<0||P>=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),h.length-d<U-P&&(U=h.length-d+P);const J=U-P;return this===h&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,P,U):o.prototype.set.call(h,this.subarray(P,U),d),J},f.prototype.fill=function(h,d,P,U){if(typeof h=="string"){if(typeof d=="string"?(U=d,d=0,P=this.length):typeof P=="string"&&(U=P,P=this.length),U!==void 0&&typeof U!="string")throw new TypeError("encoding must be a string");if(typeof U=="string"&&!f.isEncoding(U))throw new TypeError("Unknown encoding: "+U);if(h.length===1){const st=h.charCodeAt(0);(U==="utf8"&&st<128||U==="latin1")&&(h=st)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(d<0||this.length<d||this.length<P)throw new RangeError("Out of range index");if(P<=d)return this;d=d>>>0,P=P===void 0?this.length:P>>>0,h||(h=0);let J;if(typeof h=="number")for(J=d;J<P;++J)this[J]=h;else{const st=f.isBuffer(h)?h:f.from(h,U),It=st.length;if(It===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(J=0;J<P-d;++J)this[J+d]=st[J%It]}return this};const x={};function S(b,h,d){x[b]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(U){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:U,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}S("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),S("ERR_INVALID_ARG_TYPE",function(b,h){return`The "${b}" argument must be of type number. Received type ${typeof h}`},TypeError),S("ERR_OUT_OF_RANGE",function(b,h,d){let P=`The value of "${b}" is out of range.`,U=d;return Number.isInteger(d)&&Math.abs(d)>2**32?U=rt(String(d)):typeof d=="bigint"&&(U=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(U=rt(U)),U+="n"),P+=` It must be ${h}. Received ${U}`,P},RangeError);function rt(b){let h="",d=b.length;const P=b[0]==="-"?1:0;for(;d>=P+4;d-=3)h=`_${b.slice(d-3,d)}${h}`;return`${b.slice(0,d)}${h}`}function lt(b,h,d){bt(h,"offset"),(b[h]===void 0||b[h+d]===void 0)&&kt(h,b.length-(d+1))}function Bt(b,h,d,P,U,J){if(b>d||b<h){const st=typeof h=="bigint"?"n":"";let It;throw h===0||h===BigInt(0)?It=`>= 0${st} and < 2${st} ** ${(J+1)*8}${st}`:It=`>= -(2${st} ** ${(J+1)*8-1}${st}) and < 2 ** ${(J+1)*8-1}${st}`,new x.ERR_OUT_OF_RANGE("value",It,b)}lt(P,U,J)}function bt(b,h){if(typeof b!="number")throw new x.ERR_INVALID_ARG_TYPE(h,"number",b)}function kt(b,h,d){throw Math.floor(b)!==b?(bt(b,d),new x.ERR_OUT_OF_RANGE("offset","an integer",b)):h<0?new x.ERR_BUFFER_OUT_OF_BOUNDS:new x.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,b)}const pe=/[^+/0-9A-Za-z-_]/g;function it(b){if(b=b.split("=")[0],b=b.trim().replace(pe,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function de(b,h){h=h||1/0;let d;const P=b.length;let U=null;const J=[];for(let st=0;st<P;++st){if(d=b.charCodeAt(st),d>55295&&d<57344){if(!U){if(d>56319){(h-=3)>-1&&J.push(239,191,189);continue}else if(st+1===P){(h-=3)>-1&&J.push(239,191,189);continue}U=d;continue}if(d<56320){(h-=3)>-1&&J.push(239,191,189),U=d;continue}d=(U-55296<<10|d-56320)+65536}else U&&(h-=3)>-1&&J.push(239,191,189);if(U=null,d<128){if((h-=1)<0)break;J.push(d)}else if(d<2048){if((h-=2)<0)break;J.push(d>>6|192,d&63|128)}else if(d<65536){if((h-=3)<0)break;J.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((h-=4)<0)break;J.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return J}function we(b){const h=[];for(let d=0;d<b.length;++d)h.push(b.charCodeAt(d)&255);return h}function Gt(b,h){let d,P,U;const J=[];for(let st=0;st<b.length&&!((h-=2)<0);++st)d=b.charCodeAt(st),P=d>>8,U=d%256,J.push(U),J.push(P);return J}function Qt(b){return t.toByteArray(it(b))}function ge(b,h,d,P){let U;for(U=0;U<P&&!(U+d>=h.length||U>=b.length);++U)h[U+d]=b[U];return U}function he(b,h){return b instanceof h||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===h.name}function ze(b){return b!==b}const Fe=function(){const b="0123456789abcdef",h=new Array(256);for(let d=0;d<16;++d){const P=d*16;for(let U=0;U<16;++U)h[P+U]=b[d]+b[U]}return h}();function _e(b){return typeof BigInt>"u"?Ye:b}function Ye(){throw new Error("BigInt not supported")}})(x_);const Ne=x_.Buffer,sy="6.15.0";function oy(n,t,e){const r=t.split("|").map(o=>o.trim());for(let o=0;o<r.length;o++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof n===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${e}`,i.value=n,i}async function Ee(n){const t=Object.keys(n);return(await Promise.all(t.map(r=>Promise.resolve(n[r])))).reduce((r,i,o)=>(r[t[o]]=i,r),{})}function St(n,t,e){for(let r in t){let i=t[r];const o=e?e[r]:null;o&&oy(i,o,r),Object.defineProperty(n,r,{enumerable:!0,value:i,writable:!1})}}function Yi(n,t){if(n==null)return"null";if(t==null&&(t=new Set),typeof n=="object"){if(t.has(n))return"[Circular]";t.add(n)}if(Array.isArray(n))return"[ "+n.map(e=>Yi(e,t)).join(", ")+" ]";if(n instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let i=0;i<n.length;i++)r+=e[n[i]>>4],r+=e[n[i]&15];return r}if(typeof n=="object"&&typeof n.toJSON=="function")return Yi(n.toJSON(),t);switch(typeof n){case"boolean":case"number":case"symbol":return n.toString();case"bigint":return BigInt(n).toString();case"string":return JSON.stringify(n);case"object":{const e=Object.keys(n);return e.sort(),"{ "+e.map(r=>`${Yi(r,t)}: ${Yi(n[r],t)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function me(n,t){return n&&n.code===t}function fa(n){return me(n,"CALL_EXCEPTION")}function re(n,t,e){let r=n;{const o=[];if(e){if("message"in e||"code"in e||"name"in e)throw new Error(`value will overwrite populated values: ${Yi(e)}`);for(const a in e){if(a==="shortMessage")continue;const u=e[a];o.push(a+"="+Yi(u))}}o.push(`code=${t}`),o.push(`version=${sy}`),o.length&&(n+=" ("+o.join(", ")+")")}let i;switch(t){case"INVALID_ARGUMENT":i=new TypeError(n);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(n);break;default:i=new Error(n)}return St(i,{code:t}),e&&Object.assign(i,e),i.shortMessage==null&&St(i,{shortMessage:r}),i}function ut(n,t,e,r){if(!n)throw re(t,e,r)}function G(n,t,e,r){ut(n,t,"INVALID_ARGUMENT",{argument:e,value:r})}function S_(n,t,e){e==null&&(e=""),e&&(e=": "+e),ut(n>=t,"missing argument"+e,"MISSING_ARGUMENT",{count:n,expectedCount:t}),ut(n<=t,"too many arguments"+e,"UNEXPECTED_ARGUMENT",{count:n,expectedCount:t})}["NFD","NFC","NFKD","NFKC"].reduce((n,t)=>{try{if("test".normalize(t)!=="test")throw new Error("bad");if(t==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");n.push(t)}catch{}return n},[]);function co(n,t,e){if(e==null&&(e=""),n!==t){let r=e,i="new";e&&(r+=".",i+=" "+e),ut(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function z_(n,t,e){if(n instanceof Uint8Array)return e?new Uint8Array(n):n;if(typeof n=="string"&&n.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((n.length-2)/2);let i=2;for(let o=0;o<r.length;o++)r[o]=parseInt(n.substring(i,i+2),16),i+=2;return r}G(!1,"invalid BytesLike value",t||"value",n)}function zt(n,t){return z_(n,t,!1)}function ve(n,t){return z_(n,t,!0)}function $t(n,t){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||typeof t=="number"&&n.length!==2+2*t||t===!0&&n.length%2!==0)}function la(n){return $t(n,!0)||n instanceof Uint8Array}const B_="0123456789abcdef";function gt(n){const t=zt(n);let e="0x";for(let r=0;r<t.length;r++){const i=t[r];e+=B_[(i&240)>>4]+B_[i&15]}return e}function te(n){return"0x"+n.map(t=>gt(t).substring(2)).join("")}function mi(n){return $t(n,!0)?(n.length-2)/2:zt(n).length}function ie(n,t,e){const r=zt(n);return e!=null&&e>r.length&&ut(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:e}),gt(r.slice(t??0,e??r.length))}function k_(n,t,e){const r=zt(n);ut(t>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:t,offset:t+1});const i=new Uint8Array(t);return i.fill(0),e?i.set(r,t-r.length):i.set(r,0),gt(i)}function Ge(n,t){return k_(n,t,!0)}function P_(n,t){return k_(n,t,!1)}const uo=BigInt(0),Xe=BigInt(1),Zi=9007199254740991;function ay(n,t){const e=_o(n,"value"),r=BigInt(Tt(t,"width"));if(ut(e>>r===uo,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:n}),e>>r-Xe){const i=(Xe<<r)-Xe;return-((~e&i)+Xe)}return e}function ha(n,t){let e=Et(n,"value");const r=BigInt(Tt(t,"width")),i=Xe<<r-Xe;if(e<uo){e=-e,ut(e<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});const o=(Xe<<r)-Xe;return(~e&o)+Xe}else ut(e<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});return e}function Ss(n,t){const e=_o(n,"value"),r=BigInt(Tt(t,"bits"));return e&(Xe<<r)-Xe}function Et(n,t){switch(typeof n){case"bigint":return n;case"number":return G(Number.isInteger(n),"underflow",t||"value",n),G(n>=-Zi&&n<=Zi,"overflow",t||"value",n),BigInt(n);case"string":try{if(n==="")throw new Error("empty string");return n[0]==="-"&&n[1]!=="-"?-BigInt(n.substring(1)):BigInt(n)}catch(e){G(!1,`invalid BigNumberish string: ${e.message}`,t||"value",n)}}G(!1,"invalid BigNumberish value",t||"value",n)}function _o(n,t){const e=Et(n,t);return ut(e>=uo,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:n}),e}const I_="0123456789abcdef";function pa(n){if(n instanceof Uint8Array){let t="0x0";for(const e of n)t+=I_[e>>4],t+=I_[e&15];return BigInt(t)}return Et(n)}function Tt(n,t){switch(typeof n){case"bigint":return G(n>=-Zi&&n<=Zi,"overflow",t||"value",n),Number(n);case"number":return G(Number.isInteger(n),"underflow",t||"value",n),G(n>=-Zi&&n<=Zi,"overflow",t||"value",n),n;case"string":try{if(n==="")throw new Error("empty string");return Tt(BigInt(n),t)}catch(e){G(!1,`invalid numeric string: ${e.message}`,t||"value",n)}}G(!1,"invalid numeric value",t||"value",n)}function cy(n){return Tt(pa(n))}function ii(n,t){let r=_o(n,"value").toString(16);if(t==null)r.length%2&&(r="0"+r);else{const i=Tt(t,"width");for(ut(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:n});r.length<i*2;)r="0"+r}return"0x"+r}function fe(n){const t=_o(n,"value");if(t===uo)return new Uint8Array([]);let e=t.toString(16);e.length%2&&(e="0"+e);const r=new Uint8Array(e.length/2);for(let i=0;i<r.length;i++){const o=i*2;r[i]=parseInt(e.substring(o,o+2),16)}return r}function tr(n){let t=gt(la(n)?n:fe(n)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return t===""&&(t="0"),"0x"+t}const F_="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);const O_=BigInt(58);function uy(n){const t=zt(n);let e=pa(t),r="";for(;e;)r=F_[Number(e%O_)]+r,e/=O_;for(let i=0;i<t.length&&!t[i];i++)r=F_[0]+r;return r}function _y(n){n=atob(n);const t=new Uint8Array(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return zt(t)}function fy(n){const t=zt(n);let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}class T_{filter;emitter;#t;constructor(t,e,r){this.#t=e,St(this,{emitter:t,filter:r})}async removeListener(){this.#t!=null&&await this.emitter.off(this.filter,this.#t)}}function ly(n,t,e,r,i){G(!1,`invalid codepoint at offset ${t}; ${n}`,"bytes",e)}function C_(n,t,e,r,i){if(n==="BAD_PREFIX"||n==="UNEXPECTED_CONTINUE"){let o=0;for(let a=t+1;a<e.length&&e[a]>>6===2;a++)o++;return o}return n==="OVERRUN"?e.length-t-1:0}function hy(n,t,e,r,i){return n==="OVERLONG"?(G(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),C_(n,t,e))}const py=Object.freeze({error:ly,ignore:C_,replace:hy});function dy(n,t){t==null&&(t=py.error);const e=zt(n,"bytes"),r=[];let i=0;for(;i<e.length;){const o=e[i++];if(o>>7===0){r.push(o);continue}let a=null,u=null;if((o&224)===192)a=1,u=127;else if((o&240)===224)a=2,u=2047;else if((o&248)===240)a=3,u=65535;else{(o&192)===128?i+=t("UNEXPECTED_CONTINUE",i-1,e,r):i+=t("BAD_PREFIX",i-1,e,r);continue}if(i-1+a>=e.length){i+=t("OVERRUN",i-1,e,r);continue}let _=o&(1<<8-a-1)-1;for(let l=0;l<a;l++){let f=e[i];if((f&192)!=128){i+=t("MISSING_CONTINUE",i,e,r),_=null;break}_=_<<6|f&63,i++}if(_!==null){if(_>1114111){i+=t("OUT_OF_RANGE",i-1-a,e,r,_);continue}if(_>=55296&&_<=57343){i+=t("UTF16_SURROGATE",i-1-a,e,r,_);continue}if(_<=u){i+=t("OVERLONG",i-1-a,e,r,_);continue}r.push(_)}}return r}function Nn(n,t){G(typeof n=="string","invalid string value","str",n);let e=[];for(let r=0;r<n.length;r++){const i=n.charCodeAt(r);if(i<128)e.push(i);else if(i<2048)e.push(i>>6|192),e.push(i&63|128);else if((i&64512)==55296){r++;const o=n.charCodeAt(r);G(r<n.length&&(o&64512)===56320,"invalid surrogate pair","str",n);const a=65536+((i&1023)<<10)+(o&1023);e.push(a>>18|240),e.push(a>>12&63|128),e.push(a>>6&63|128),e.push(a&63|128)}else e.push(i>>12|224),e.push(i>>6&63|128),e.push(i&63|128)}return new Uint8Array(e)}function wy(n){return n.map(t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10&1023)+55296,(t&1023)+56320))).join("")}function fo(n,t){return wy(dy(n,t))}function N_(n){async function t(e,r){ut(r==null||!r.cancelled,"request cancelled before sending","CANCELLED");const i=e.url.split(":")[0].toLowerCase();ut(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ut(i==="https"||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let o=null;const a=new AbortController,u=setTimeout(()=>{o=re("request timeout","TIMEOUT"),a.abort()},e.timeout);r&&r.addListener(()=>{o=re("request cancelled","CANCELLED"),a.abort()});const _=Object.assign({},n,{method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:a.signal});let l;try{l=await fetch(e.url,_)}catch(v){throw clearTimeout(u),o||v}clearTimeout(u);const f={};l.headers.forEach((v,I)=>{f[I.toLowerCase()]=v});const g=await l.arrayBuffer(),y=g==null?null:new Uint8Array(g);return{statusCode:l.status,statusMessage:l.statusText,headers:f,body:y}}return t}const gy=12,yy=250;let L_=N_();const by=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),my=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let da=!1;async function D_(n,t){try{const e=n.match(by);if(!e)throw new Error("invalid data");return new si(200,"OK",{"content-type":e[1]||"text/plain"},e[2]?_y(e[3]):Ey(e[3]))}catch{return new si(599,"BAD REQUEST (invalid data: URI)",{},null,new Ln(n))}}function U_(n){async function t(e,r){try{const i=e.match(my);if(!i)throw new Error("invalid link");return new Ln(`${n}${i[2]}`)}catch{return new si(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Ln(e))}}return t}const lo={data:D_,ipfs:U_("https://gateway.ipfs.io/ipfs/")},M_=new WeakMap;class Ay{#t;#e;constructor(t){this.#t=[],this.#e=!1,M_.set(t,()=>{if(!this.#e){this.#e=!0;for(const e of this.#t)setTimeout(()=>{e()},0);this.#t=[]}})}addListener(t){ut(!this.#e,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#t.push(t)}get cancelled(){return this.#e}checkSignal(){ut(!this.cancelled,"cancelled","CANCELLED",{})}}function ho(n){if(n==null)throw new Error("missing signal; should not happen");return n.checkSignal(),n}class Ln{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#d;#c;#_;#f;get url(){return this.#o}set url(t){this.#o=String(t)}get body(){return this.#s==null?null:new Uint8Array(this.#s)}set body(t){if(t==null)this.#s=void 0,this.#a=void 0;else if(typeof t=="string")this.#s=Nn(t),this.#a="text/plain";else if(t instanceof Uint8Array)this.#s=t,this.#a="application/octet-stream";else if(typeof t=="object")this.#s=Nn(JSON.stringify(t)),this.#a="application/json";else throw new Error("invalid body")}hasBody(){return this.#s!=null}get method(){return this.#n?this.#n:this.hasBody()?"POST":"GET"}set method(t){t==null&&(t=""),this.#n=String(t).toUpperCase()}get headers(){const t=Object.assign({},this.#r);return this.#h&&(t.authorization=`Basic ${fy(Nn(this.#h))}`),this.allowGzip&&(t["accept-encoding"]="gzip"),t["content-type"]==null&&this.#a&&(t["content-type"]=this.#a),this.body&&(t["content-length"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,e){this.#r[String(t).toLowerCase()]=String(e)}clearHeaders(){this.#r={}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#h||null}setCredentials(t,e){G(!t.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#h=`${t}:${e}`}get allowGzip(){return this.#e}set allowGzip(t){this.#e=!!t}get allowInsecureAuthentication(){return!!this.#t}set allowInsecureAuthentication(t){this.#t=!!t}get timeout(){return this.#i}set timeout(t){G(t>=0,"timeout must be non-zero","timeout",t),this.#i=t}get preflightFunc(){return this.#u||null}set preflightFunc(t){this.#u=t}get processFunc(){return this.#p||null}set processFunc(t){this.#p=t}get retryFunc(){return this.#d||null}set retryFunc(t){this.#d=t}get getUrlFunc(){return this.#f||L_}set getUrlFunc(t){this.#f=t}constructor(t){this.#o=String(t),this.#t=!1,this.#e=!0,this.#r={},this.#n="",this.#i=3e5,this.#_={slotInterval:yy,maxAttempts:gy},this.#f=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#s?gt(this.#s):"null"}>`}setThrottleParams(t){t.slotInterval!=null&&(this.#_.slotInterval=t.slotInterval),t.maxAttempts!=null&&(this.#_.maxAttempts=t.maxAttempts)}async#l(t,e,r,i,o){if(t>=this.#_.maxAttempts)return o.makeServerError("exceeded maximum retry limit");ut(j_()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await vy(r);let a=this.clone();const u=(a.url.split(":")[0]||"").toLowerCase();if(u in lo){const f=await lo[u](a.url,ho(i.#c));if(f instanceof si){let g=f;if(this.processFunc){ho(i.#c);try{g=await this.processFunc(a,g)}catch(y){(y.throttle==null||typeof y.stall!="number")&&g.makeServerError("error in post-processing function",y).assertOk()}}return g}a=f}this.preflightFunc&&(a=await this.preflightFunc(a));const _=await this.getUrlFunc(a,ho(i.#c));let l=new si(_.statusCode,_.statusMessage,_.headers,_.body,i);if(l.statusCode===301||l.statusCode===302){try{const f=l.headers.location||"";return a.redirect(f).#l(t+1,e,0,i,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(a,l,t))){const f=l.headers["retry-after"];let g=this.#_.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof f=="string"&&f.match(/^[1-9][0-9]*$/)&&(g=parseInt(f)),a.clone().#l(t+1,e,g,i,l)}if(this.processFunc){ho(i.#c);try{l=await this.processFunc(a,l)}catch(f){(f.throttle==null||typeof f.stall!="number")&&l.makeServerError("error in post-processing function",f).assertOk();let g=this.#_.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return f.stall>=0&&(g=f.stall),a.clone().#l(t+1,e,g,i,l)}}return l}send(){return ut(this.#c==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#c=new Ay(this),this.#l(0,j_()+this.timeout,0,this,new si(0,"",{},null,this))}cancel(){ut(this.#c!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const t=M_.get(this);if(!t)throw new Error("missing signal; should not happen");t()}redirect(t){const e=this.url.split(":")[0].toLowerCase(),r=t.split(":")[0].toLowerCase();ut(this.method==="GET"&&(e!=="https"||r!=="http")&&t.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const i=new Ln(t);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,i.#r=Object.assign({},this.#r),this.#s&&(i.#s=new Uint8Array(this.#s)),i.#a=this.#a,i}clone(){const t=new Ln(this.url);return t.#n=this.#n,this.#s&&(t.#s=this.#s),t.#a=this.#a,t.#r=Object.assign({},this.#r),t.#h=this.#h,this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),t.#u=this.#u,t.#p=this.#p,t.#d=this.#d,t.#_=Object.assign({},this.#_),t.#f=this.#f,t}static lockConfig(){da=!0}static getGateway(t){return lo[t.toLowerCase()]||null}static registerGateway(t,e){if(t=t.toLowerCase(),t==="http"||t==="https")throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(da)throw new Error("gateways locked");lo[t]=e}static registerGetUrl(t){if(da)throw new Error("gateways locked");L_=t}static createGetUrlFunc(t){return N_(t)}static createDataGateway(){return D_}static createIpfsGatewayFunc(t){return U_(t)}}class si{#t;#e;#r;#n;#i;#o;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#n?gt(this.#n):"null"}>`}get statusCode(){return this.#t}get statusMessage(){return this.#e}get headers(){return Object.assign({},this.#r)}get body(){return this.#n==null?null:new Uint8Array(this.#n)}get bodyText(){try{return this.#n==null?"":fo(this.#n)}catch{ut(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ut(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}constructor(t,e,r,i,o){this.#t=t,this.#e=e,this.#r=Object.keys(r).reduce((a,u)=>(a[u.toLowerCase()]=String(r[u]),a),{}),this.#n=i==null?null:new Uint8Array(i),this.#i=o||null,this.#o={message:""}}makeServerError(t,e){let r;t?r=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${t})`:(t=`${this.statusCode} ${this.statusMessage}`,r=`CLIENT ESCALATED SERVER ERROR (${t})`);const i=new si(599,r,this.headers,this.body,this.#i||void 0);return i.#o={message:t,error:e},i}throwThrottleError(t,e){e==null?e=-1:G(Number.isInteger(e)&&e>=0,"invalid stall timeout","stall",e);const r=new Error(t||"throttling requests");throw St(r,{stall:e,throttle:!0}),r}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return this.#n!=null}get request(){return this.#i}ok(){return this.#o.message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:t,error:e}=this.#o;t===""&&(t=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let i=null;try{this.#n&&(i=fo(this.#n))}catch{}ut(!1,t,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:e,info:{requestUrl:r,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function j_(){return new Date().getTime()}function Ey(n){return Nn(n.replace(/%([0-9a-f][0-9a-f])/gi,(t,e)=>String.fromCharCode(parseInt(e,16))))}function vy(n){return new Promise(t=>setTimeout(t,n))}function xy(n){let t=n.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function G_(n,t,e){let r=0;for(let i=0;i<e;i++)r=r*256+n[t+i];return r}function H_(n,t,e,r){const i=[];for(;e<t+1+r;){const o=V_(n,e);i.push(o.result),e+=o.consumed,ut(e<=t+1+r,"child data too short","BUFFER_OVERRUN",{buffer:n,length:r,offset:t})}return{consumed:1+r,result:i}}function V_(n,t){ut(n.length!==0,"data too short","BUFFER_OVERRUN",{buffer:n,length:0,offset:1});const e=r=>{ut(r<=n.length,"data short segment too short","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r})};if(n[t]>=248){const r=n[t]-247;e(t+1+r);const i=G_(n,t+1,r);return e(t+1+r+i),H_(n,t,t+1+r,r+i)}else if(n[t]>=192){const r=n[t]-192;return e(t+1+r),H_(n,t,t+1,r)}else if(n[t]>=184){const r=n[t]-183;e(t+1+r);const i=G_(n,t+1,r);e(t+1+r+i);const o=gt(n.slice(t+1+r,t+1+r+i));return{consumed:1+r+i,result:o}}else if(n[t]>=128){const r=n[t]-128;e(t+1+r);const i=gt(n.slice(t+1,t+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:xy(n[t])}}function zs(n){const t=zt(n,"data"),e=V_(t,0);return G(e.consumed===t.length,"unexpected junk after rlp payload","data",n),e.result}function q_(n){const t=[];for(;n;)t.unshift(n&255),n>>=8;return t}function Q_(n){if(Array.isArray(n)){let r=[];if(n.forEach(function(o){r=r.concat(Q_(o))}),r.length<=55)return r.unshift(192+r.length),r;const i=q_(r.length);return i.unshift(247+i.length),i.concat(r)}const t=Array.prototype.slice.call(zt(n,"object"));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const e=q_(t.length);return e.unshift(183+e.length),e.concat(t)}const K_="0123456789abcdef";function oi(n){let t="0x";for(const e of Q_(n))t+=K_[e>>4],t+=K_[e&15];return t}const xe=32,wa=new Uint8Array(xe),Ry=["then"],po={},W_=new WeakMap;function Ai(n){return W_.get(n)}function J_(n,t){W_.set(n,t)}function Bs(n,t){const e=new Error(`deferred error during ABI decoding triggered accessing ${n}`);throw e.error=t,e}function ga(n,t,e){return n.indexOf(null)>=0?t.map((r,i)=>r instanceof Kn?ga(Ai(r),r,e):r):n.reduce((r,i,o)=>{let a=t.getValue(i);return i in r||(e&&a instanceof Kn&&(a=ga(Ai(a),a,e)),r[i]=a),r},{})}class Kn extends Array{#t;constructor(...t){const e=t[0];let r=t[1],i=(t[2]||[]).slice(),o=!0;e!==po&&(r=t,i=[],o=!1),super(r.length),r.forEach((_,l)=>{this[l]=_});const a=i.reduce((_,l)=>(typeof l=="string"&&_.set(l,(_.get(l)||0)+1),_),new Map);if(J_(this,Object.freeze(r.map((_,l)=>{const f=i[l];return f!=null&&a.get(f)===1?f:null}))),this.#t=[],this.#t==null&&this.#t,!o)return;Object.freeze(this);const u=new Proxy(this,{get:(_,l,f)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){const y=Tt(l,"%index");if(y<0||y>=this.length)throw new RangeError("out of result range");const v=_[y];return v instanceof Error&&Bs(`index ${y}`,v),v}if(Ry.indexOf(l)>=0)return Reflect.get(_,l,f);const g=_[l];if(g instanceof Function)return function(...y){return g.apply(this===f?_:this,y)};if(!(l in _))return _.getValue.apply(this===f?_:this,[l])}return Reflect.get(_,l,f)}});return J_(u,Ai(this)),u}toArray(t){const e=[];return this.forEach((r,i)=>{r instanceof Error&&Bs(`index ${i}`,r),t&&r instanceof Kn&&(r=r.toArray(t)),e.push(r)}),e}toObject(t){const e=Ai(this);return e.reduce((r,i,o)=>(ut(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),ga(e,this,t)),{})}slice(t,e){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),e==null&&(e=this.length),e<0&&(e+=this.length,e<0&&(e=0)),e>this.length&&(e=this.length);const r=Ai(this),i=[],o=[];for(let a=t;a<e;a++)i.push(this[a]),o.push(r[a]);return new Kn(po,i,o)}filter(t,e){const r=Ai(this),i=[],o=[];for(let a=0;a<this.length;a++){const u=this[a];u instanceof Error&&Bs(`index ${a}`,u),t.call(e,u,a,this)&&(i.push(u),o.push(r[a]))}return new Kn(po,i,o)}map(t,e){const r=[];for(let i=0;i<this.length;i++){const o=this[i];o instanceof Error&&Bs(`index ${i}`,o),r.push(t.call(e,o,i,this))}return r}getValue(t){const e=Ai(this).indexOf(t);if(e===-1)return;const r=this[e];return r instanceof Error&&Bs(`property ${JSON.stringify(t)}`,r.error),r}static fromItems(t,e){return new Kn(po,t,e)}}function $_(n){let t=fe(n);return ut(t.length<=xe,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:xe,offset:t.length}),t.length!==xe&&(t=ve(te([wa.slice(t.length%xe),t]))),t}class Wn{name;type;localName;dynamic;constructor(t,e,r,i){St(this,{name:t,type:e,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(t,e){G(!1,t,this.localName,e)}}class ya{#t;#e;constructor(){this.#t=[],this.#e=0}get data(){return te(this.#t)}get length(){return this.#e}#r(t){return this.#t.push(t),this.#e+=t.length,t.length}appendWriter(t){return this.#r(ve(t.data))}writeBytes(t){let e=ve(t);const r=e.length%xe;return r&&(e=ve(te([e,wa.slice(r)]))),this.#r(e)}writeValue(t){return this.#r($_(t))}writeUpdatableValue(){const t=this.#t.length;return this.#t.push(wa),this.#e+=xe,e=>{this.#t[t]=$_(e)}}}class ba{allowLoose;#t;#e;#r;#n;#i;constructor(t,e,r){St(this,{allowLoose:!!e}),this.#t=ve(t),this.#r=0,this.#n=null,this.#i=r??1024,this.#e=0}get data(){return gt(this.#t)}get dataLength(){return this.#t.length}get consumed(){return this.#e}get bytes(){return new Uint8Array(this.#t)}#o(t){if(this.#n)return this.#n.#o(t);this.#r+=t,ut(this.#i<1||this.#r<=this.#i*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#i} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:ve(this.#t),offset:this.#e,length:t,info:{bytesRead:this.#r,dataLength:this.dataLength}})}#s(t,e,r){let i=Math.ceil(e/xe)*xe;return this.#e+i>this.#t.length&&(this.allowLoose&&r&&this.#e+e<=this.#t.length?i=e:ut(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:ve(this.#t),length:this.#t.length,offset:this.#e+i})),this.#t.slice(this.#e,this.#e+i)}subReader(t){const e=new ba(this.#t.slice(this.#e+t),this.allowLoose,this.#i);return e.#n=this,e}readBytes(t,e){let r=this.#s(0,t,!!e);return this.#o(t),this.#e+=r.length,r.slice(0,t)}readValue(){return pa(this.readBytes(xe))}readIndex(){return cy(this.readBytes(xe))}}function wo(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function ma(n,...t){if(!(n instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(n.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${n.length}`)}function Sy(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");wo(n.outputLen),wo(n.blockLen)}function Xi(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function Y_(n,t){ma(n);const e=t.outputLen;if(n.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}const Aa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Z_=n=>n instanceof Uint8Array,zy=n=>new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4)),Ea=n=>new DataView(n.buffer,n.byteOffset,n.byteLength),Dn=(n,t)=>n<<32-t|n>>>t;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");function By(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function go(n){if(typeof n=="string"&&(n=By(n)),!Z_(n))throw new Error(`expected Uint8Array, got ${typeof n}`);return n}function ky(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!Z_(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}class va{clone(){return this._cloneInto()}}function xa(n){const t=r=>n().update(go(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function Py(n=32){if(Aa&&typeof Aa.getRandomValues=="function")return Aa.getRandomValues(new Uint8Array(n));throw new Error("crypto.getRandomValues must be defined")}class X_ extends va{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,Sy(t);const r=go(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let a=0;a<o.length;a++)o[a]^=54;this.iHash.update(o),this.oHash=t.create();for(let a=0;a<o.length;a++)o[a]^=106;this.oHash.update(o),o.fill(0)}update(t){return Xi(this),this.iHash.update(t),this}digestInto(t){Xi(this),ma(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:i,destroyed:o,blockLen:a,outputLen:u}=this;return t=t,t.finished=i,t.destroyed=o,t.blockLen=a,t.outputLen=u,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const tf=(n,t,e)=>new X_(n,t).update(e).digest();tf.create=(n,t)=>new X_(n,t);function Iy(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),o=BigInt(4294967295),a=Number(e>>i&o),u=Number(e&o),_=r?4:0,l=r?0:4;n.setUint32(t+_,a,r),n.setUint32(t+l,u,r)}class ef extends va{constructor(t,e,r,i){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Ea(this.buffer)}update(t){Xi(this);const{view:e,buffer:r,blockLen:i}=this;t=go(t);const o=t.length;for(let a=0;a<o;){const u=Math.min(i-this.pos,o-a);if(u===i){const _=Ea(t);for(;i<=o-a;a+=i)this.process(_,a);continue}r.set(t.subarray(a,a+u),this.pos),this.pos+=u,a+=u,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Xi(this),Y_(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:i,isLE:o}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(r,0),a=0);for(let g=a;g<i;g++)e[g]=0;Iy(r,i-8,BigInt(this.length*8),o),this.process(r,0);const u=Ea(t),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=_/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let g=0;g<l;g++)u.setUint32(4*g,f[g],o)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:i,finished:o,destroyed:a,pos:u}=this;return t.length=i,t.pos=u,t.finished=o,t.destroyed=a,i%e&&t.buffer.set(r),t}}const Fy=(n,t,e)=>n&t^~n&e,Oy=(n,t,e)=>n&t^n&e^t&e,Ty=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ai=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ci=new Uint32Array(64);class Cy extends ef{constructor(){super(64,32,8,!1),this.A=ai[0]|0,this.B=ai[1]|0,this.C=ai[2]|0,this.D=ai[3]|0,this.E=ai[4]|0,this.F=ai[5]|0,this.G=ai[6]|0,this.H=ai[7]|0}get(){const{A:t,B:e,C:r,D:i,E:o,F:a,G:u,H:_}=this;return[t,e,r,i,o,a,u,_]}set(t,e,r,i,o,a,u,_){this.A=t|0,this.B=e|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=a|0,this.G=u|0,this.H=_|0}process(t,e){for(let g=0;g<16;g++,e+=4)ci[g]=t.getUint32(e,!1);for(let g=16;g<64;g++){const y=ci[g-15],v=ci[g-2],I=Dn(y,7)^Dn(y,18)^y>>>3,k=Dn(v,17)^Dn(v,19)^v>>>10;ci[g]=k+ci[g-7]+I+ci[g-16]|0}let{A:r,B:i,C:o,D:a,E:u,F:_,G:l,H:f}=this;for(let g=0;g<64;g++){const y=Dn(u,6)^Dn(u,11)^Dn(u,25),v=f+y+Fy(u,_,l)+Ty[g]+ci[g]|0,k=(Dn(r,2)^Dn(r,13)^Dn(r,22))+Oy(r,i,o)|0;f=l,l=_,_=u,u=a+v|0,a=o,o=i,i=r,r=v+k|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,a=a+this.D|0,u=u+this.E|0,_=_+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,i,o,a,u,_,l,f)}roundClean(){ci.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const rf=xa(()=>new Cy),yo=BigInt(2**32-1),Ra=BigInt(32);function nf(n,t=!1){return t?{h:Number(n&yo),l:Number(n>>Ra&yo)}:{h:Number(n>>Ra&yo)|0,l:Number(n&yo)|0}}function sf(n,t=!1){let e=new Uint32Array(n.length),r=new Uint32Array(n.length);for(let i=0;i<n.length;i++){const{h:o,l:a}=nf(n[i],t);[e[i],r[i]]=[o,a]}return[e,r]}const Ny=(n,t)=>BigInt(n>>>0)<<Ra|BigInt(t>>>0),Ly=(n,t,e)=>n>>>e,Dy=(n,t,e)=>n<<32-e|t>>>e,Uy=(n,t,e)=>n>>>e|t<<32-e,My=(n,t,e)=>n<<32-e|t>>>e,jy=(n,t,e)=>n<<64-e|t>>>e-32,Gy=(n,t,e)=>n>>>e-32|t<<64-e,Hy=(n,t)=>t,Vy=(n,t)=>n,of=(n,t,e)=>n<<e|t>>>32-e,af=(n,t,e)=>t<<e|n>>>32-e,cf=(n,t,e)=>t<<e-32|n>>>64-e,uf=(n,t,e)=>n<<e-32|t>>>64-e;function qy(n,t,e,r){const i=(t>>>0)+(r>>>0);return{h:n+e+(i/2**32|0)|0,l:i|0}}const Ot={fromBig:nf,split:sf,toBig:Ny,shrSH:Ly,shrSL:Dy,rotrSH:Uy,rotrSL:My,rotrBH:jy,rotrBL:Gy,rotr32H:Hy,rotr32L:Vy,rotlSH:of,rotlSL:af,rotlBH:cf,rotlBL:uf,add:qy,add3L:(n,t,e)=>(n>>>0)+(t>>>0)+(e>>>0),add3H:(n,t,e,r)=>t+e+r+(n/2**32|0)|0,add4L:(n,t,e,r)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0),add4H:(n,t,e,r,i)=>t+e+r+i+(n/2**32|0)|0,add5H:(n,t,e,r,i,o)=>t+e+r+i+o+(n/2**32|0)|0,add5L:(n,t,e,r,i)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0)+(i>>>0)},[Qy,Ky]=Ot.split(["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","0xf40e35855771202a","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(n=>BigInt(n))),ui=new Uint32Array(80),_i=new Uint32Array(80);class Wy extends ef{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:r,Bl:i,Ch:o,Cl:a,Dh:u,Dl:_,Eh:l,El:f,Fh:g,Fl:y,Gh:v,Gl:I,Hh:k,Hl:T}=this;return[t,e,r,i,o,a,u,_,l,f,g,y,v,I,k,T]}set(t,e,r,i,o,a,u,_,l,f,g,y,v,I,k,T){this.Ah=t|0,this.Al=e|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=a|0,this.Dh=u|0,this.Dl=_|0,this.Eh=l|0,this.El=f|0,this.Fh=g|0,this.Fl=y|0,this.Gh=v|0,this.Gl=I|0,this.Hh=k|0,this.Hl=T|0}process(t,e){for(let B=0;B<16;B++,e+=4)ui[B]=t.getUint32(e),_i[B]=t.getUint32(e+=4);for(let B=16;B<80;B++){const z=ui[B-15]|0,O=_i[B-15]|0,C=Ot.rotrSH(z,O,1)^Ot.rotrSH(z,O,8)^Ot.shrSH(z,O,7),N=Ot.rotrSL(z,O,1)^Ot.rotrSL(z,O,8)^Ot.shrSL(z,O,7),D=ui[B-2]|0,$=_i[B-2]|0,et=Ot.rotrSH(D,$,19)^Ot.rotrBH(D,$,61)^Ot.shrSH(D,$,6),ft=Ot.rotrSL(D,$,19)^Ot.rotrBL(D,$,61)^Ot.shrSL(D,$,6),L=Ot.add4L(N,ft,_i[B-7],_i[B-16]),vt=Ot.add4H(L,C,et,ui[B-7],ui[B-16]);ui[B]=vt|0,_i[B]=L|0}let{Ah:r,Al:i,Bh:o,Bl:a,Ch:u,Cl:_,Dh:l,Dl:f,Eh:g,El:y,Fh:v,Fl:I,Gh:k,Gl:T,Hh:E,Hl:R}=this;for(let B=0;B<80;B++){const z=Ot.rotrSH(g,y,14)^Ot.rotrSH(g,y,18)^Ot.rotrBH(g,y,41),O=Ot.rotrSL(g,y,14)^Ot.rotrSL(g,y,18)^Ot.rotrBL(g,y,41),C=g&v^~g&k,N=y&I^~y&T,D=Ot.add5L(R,O,N,Ky[B],_i[B]),$=Ot.add5H(D,E,z,C,Qy[B],ui[B]),et=D|0,ft=Ot.rotrSH(r,i,28)^Ot.rotrBH(r,i,34)^Ot.rotrBH(r,i,39),L=Ot.rotrSL(r,i,28)^Ot.rotrBL(r,i,34)^Ot.rotrBL(r,i,39),vt=r&o^r&u^o&u,wt=i&a^i&_^a&_;E=k|0,R=T|0,k=v|0,T=I|0,v=g|0,I=y|0,{h:g,l:y}=Ot.add(l|0,f|0,$|0,et|0),l=u|0,f=_|0,u=o|0,_=a|0,o=r|0,a=i|0;const at=Ot.add3L(et,L,wt);r=Ot.add3H(at,$,ft,vt),i=at|0}({h:r,l:i}=Ot.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:a}=Ot.add(this.Bh|0,this.Bl|0,o|0,a|0),{h:u,l:_}=Ot.add(this.Ch|0,this.Cl|0,u|0,_|0),{h:l,l:f}=Ot.add(this.Dh|0,this.Dl|0,l|0,f|0),{h:g,l:y}=Ot.add(this.Eh|0,this.El|0,g|0,y|0),{h:v,l:I}=Ot.add(this.Fh|0,this.Fl|0,v|0,I|0),{h:k,l:T}=Ot.add(this.Gh|0,this.Gl|0,k|0,T|0),{h:E,l:R}=Ot.add(this.Hh|0,this.Hl|0,E|0,R|0),this.set(r,i,o,a,u,_,l,f,g,y,v,I,k,T,E,R)}roundClean(){ui.fill(0),_i.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Jy=xa(()=>new Wy);function $y(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Ji<"u")return Ji;throw new Error("unable to locate global object")}const _f=$y();_f.crypto||_f.msCrypto;function Yy(n){switch(n){case"sha256":return rf.create();case"sha512":return Jy.create()}G(!1,"invalid hashing algorithm name","algorithm",n)}const[ff,lf,hf]=[[],[],[]],Zy=BigInt(0),ks=BigInt(1),Xy=BigInt(2),t0=BigInt(7),e0=BigInt(256),r0=BigInt(113);for(let n=0,t=ks,e=1,r=0;n<24;n++){[e,r]=[r,(2*e+3*r)%5],ff.push(2*(5*r+e)),lf.push((n+1)*(n+2)/2%64);let i=Zy;for(let o=0;o<7;o++)t=(t<<ks^(t>>t0)*r0)%e0,t&Xy&&(i^=ks<<(ks<<BigInt(o))-ks);hf.push(i)}const[n0,i0]=sf(hf,!0),pf=(n,t,e)=>e>32?cf(n,t,e):of(n,t,e),df=(n,t,e)=>e>32?uf(n,t,e):af(n,t,e);function s0(n,t=24){const e=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)e[a]=n[a]^n[a+10]^n[a+20]^n[a+30]^n[a+40];for(let a=0;a<10;a+=2){const u=(a+8)%10,_=(a+2)%10,l=e[_],f=e[_+1],g=pf(l,f,1)^e[u],y=df(l,f,1)^e[u+1];for(let v=0;v<50;v+=10)n[a+v]^=g,n[a+v+1]^=y}let i=n[2],o=n[3];for(let a=0;a<24;a++){const u=lf[a],_=pf(i,o,u),l=df(i,o,u),f=ff[a];i=n[f],o=n[f+1],n[f]=_,n[f+1]=l}for(let a=0;a<50;a+=10){for(let u=0;u<10;u++)e[u]=n[a+u];for(let u=0;u<10;u++)n[a+u]^=~e[(u+2)%10]&e[(u+4)%10]}n[0]^=n0[r],n[1]^=i0[r]}e.fill(0)}class Sa extends va{constructor(t,e,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,wo(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=zy(this.state)}keccak(){s0(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Xi(this);const{blockLen:e,state:r}=this;t=go(t);const i=t.length;for(let o=0;o<i;){const a=Math.min(e-this.pos,i-o);for(let u=0;u<a;u++)r[this.pos++]^=t[o++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,(e&128)!==0&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){Xi(this,!1),ma(t),this.finish();const e=this.state,{blockLen:r}=this;for(let i=0,o=t.length;i<o;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,o-i);t.set(e.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return wo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Y_(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:i,rounds:o,enableXOF:a}=this;return t||(t=new Sa(e,r,i,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=a,t.destroyed=this.destroyed,t}}const o0=((n,t,e)=>xa(()=>new Sa(t,n,e)))(1,136,256/8);let wf=!1;const gf=function(n){return o0(n)};let yf=gf;function le(n){const t=zt(n,"data");return gt(yf(t))}le._=gf,le.lock=function(){wf=!0},le.register=function(n){if(wf)throw new TypeError("keccak256 is locked");yf=n},Object.freeze(le);const bf=function(n){return Yy("sha256").update(n).digest()};let mf=bf,Af=!1;function ts(n){const t=zt(n,"data");return gt(mf(t))}ts._=bf,ts.lock=function(){Af=!0},ts.register=function(n){if(Af)throw new Error("sha256 is locked");mf=n},Object.freeze(ts),Object.freeze(ts);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ef=BigInt(0),bo=BigInt(1),a0=BigInt(2),mo=n=>n instanceof Uint8Array,c0=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function es(n){if(!mo(n))throw new Error("Uint8Array expected");let t="";for(let e=0;e<n.length;e++)t+=c0[n[e]];return t}function vf(n){const t=n.toString(16);return t.length&1?`0${t}`:t}function za(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return BigInt(n===""?"0":`0x${n}`)}function rs(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);const t=n.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const e=new Uint8Array(t/2);for(let r=0;r<e.length;r++){const i=r*2,o=n.slice(i,i+2),a=Number.parseInt(o,16);if(Number.isNaN(a)||a<0)throw new Error("Invalid byte sequence");e[r]=a}return e}function Ei(n){return za(es(n))}function Ba(n){if(!mo(n))throw new Error("Uint8Array expected");return za(es(Uint8Array.from(n).reverse()))}function ns(n,t){return rs(n.toString(16).padStart(t*2,"0"))}function ka(n,t){return ns(n,t).reverse()}function u0(n){return rs(vf(n))}function er(n,t,e){let r;if(typeof t=="string")try{r=rs(t)}catch(o){throw new Error(`${n} must be valid hex string, got "${t}". Cause: ${o}`)}else if(mo(t))r=Uint8Array.from(t);else throw new Error(`${n} must be hex string or Uint8Array`);const i=r.length;if(typeof e=="number"&&i!==e)throw new Error(`${n} expected ${e} bytes, got ${i}`);return r}function Ps(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!mo(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}function _0(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function f0(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function l0(n){let t;for(t=0;n>Ef;n>>=bo,t+=1);return t}function h0(n,t){return n>>BigInt(t)&bo}const p0=(n,t,e)=>n|(e?bo:Ef)<<BigInt(t),Pa=n=>(a0<<BigInt(n-1))-bo,Ia=n=>new Uint8Array(n),xf=n=>Uint8Array.from(n);function Rf(n,t,e){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Ia(n),i=Ia(n),o=0;const a=()=>{r.fill(1),i.fill(0),o=0},u=(...g)=>e(i,r,...g),_=(g=Ia())=>{i=u(xf([0]),g),r=u(),g.length!==0&&(i=u(xf([1]),g),r=u())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let g=0;const y=[];for(;g<t;){r=u();const v=r.slice();y.push(v),g+=r.length}return Ps(...y)};return(g,y)=>{a(),_(g);let v;for(;!(v=y(l()));)_();return a(),v}}const d0={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||n instanceof Uint8Array,isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,t)=>t.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function Is(n,t,e={}){const r=(i,o,a)=>{const u=d0[o];if(typeof u!="function")throw new Error(`Invalid validator "${o}", expected function`);const _=n[i];if(!(a&&_===void 0)&&!u(_,n))throw new Error(`Invalid param ${String(i)}=${_} (${typeof _}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(e))r(i,o,!0);return n}const w0=Object.freeze(Object.defineProperty({__proto__:null,bitGet:h0,bitLen:l0,bitMask:Pa,bitSet:p0,bytesToHex:es,bytesToNumberBE:Ei,bytesToNumberLE:Ba,concatBytes:Ps,createHmacDrbg:Rf,ensureBytes:er,equalBytes:_0,hexToBytes:rs,hexToNumber:za,numberToBytesBE:ns,numberToBytesLE:ka,numberToHexUnpadded:vf,numberToVarBytesBE:u0,utf8ToBytes:f0,validateObject:Is},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ye=BigInt(0),ae=BigInt(1),vi=BigInt(2),g0=BigInt(3),Fa=BigInt(4),Sf=BigInt(5),zf=BigInt(8);BigInt(9),BigInt(16);function Be(n,t){const e=n%t;return e>=ye?e:t+e}function y0(n,t,e){if(e<=ye||t<ye)throw new Error("Expected power/modulo > 0");if(e===ae)return ye;let r=ae;for(;t>ye;)t&ae&&(r=r*n%e),n=n*n%e,t>>=ae;return r}function He(n,t,e){let r=n;for(;t-- >ye;)r*=r,r%=e;return r}function Oa(n,t){if(n===ye||t<=ye)throw new Error(`invert: expected positive integers, got n=${n} mod=${t}`);let e=Be(n,t),r=t,i=ye,o=ae;for(;e!==ye;){const u=r/e,_=r%e,l=i-o*u;r=e,e=_,i=o,o=l}if(r!==ae)throw new Error("invert: does not exist");return Be(i,t)}function b0(n){const t=(n-ae)/vi;let e,r,i;for(e=n-ae,r=0;e%vi===ye;e/=vi,r++);for(i=vi;i<n&&y0(i,t,n)!==n-ae;i++);if(r===1){const a=(n+ae)/Fa;return function(_,l){const f=_.pow(l,a);if(!_.eql(_.sqr(f),l))throw new Error("Cannot find square root");return f}}const o=(e+ae)/vi;return function(u,_){if(u.pow(_,t)===u.neg(u.ONE))throw new Error("Cannot find square root");let l=r,f=u.pow(u.mul(u.ONE,i),e),g=u.pow(_,o),y=u.pow(_,e);for(;!u.eql(y,u.ONE);){if(u.eql(y,u.ZERO))return u.ZERO;let v=1;for(let k=u.sqr(y);v<l&&!u.eql(k,u.ONE);v++)k=u.sqr(k);const I=u.pow(f,ae<<BigInt(l-v-1));f=u.sqr(I),g=u.mul(g,I),y=u.mul(y,f),l=v}return g}}function m0(n){if(n%Fa===g0){const t=(n+ae)/Fa;return function(r,i){const o=r.pow(i,t);if(!r.eql(r.sqr(o),i))throw new Error("Cannot find square root");return o}}if(n%zf===Sf){const t=(n-Sf)/zf;return function(r,i){const o=r.mul(i,vi),a=r.pow(o,t),u=r.mul(i,a),_=r.mul(r.mul(u,vi),a),l=r.mul(u,r.sub(_,r.ONE));if(!r.eql(r.sqr(l),i))throw new Error("Cannot find square root");return l}}return b0(n)}const A0=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function E0(n){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=A0.reduce((r,i)=>(r[i]="function",r),t);return Is(n,e)}function v0(n,t,e){if(e<ye)throw new Error("Expected power > 0");if(e===ye)return n.ONE;if(e===ae)return t;let r=n.ONE,i=t;for(;e>ye;)e&ae&&(r=n.mul(r,i)),i=n.sqr(i),e>>=ae;return r}function x0(n,t){const e=new Array(t.length),r=t.reduce((o,a,u)=>n.is0(a)?o:(e[u]=o,n.mul(o,a)),n.ONE),i=n.inv(r);return t.reduceRight((o,a,u)=>n.is0(a)?o:(e[u]=n.mul(o,e[u]),n.mul(o,a)),i),e}function Bf(n,t){const e=t!==void 0?t:n.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function R0(n,t,e=!1,r={}){if(n<=ye)throw new Error(`Expected Field ORDER > 0, got ${n}`);const{nBitLength:i,nByteLength:o}=Bf(n,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=m0(n),u=Object.freeze({ORDER:n,BITS:i,BYTES:o,MASK:Pa(i),ZERO:ye,ONE:ae,create:_=>Be(_,n),isValid:_=>{if(typeof _!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof _}`);return ye<=_&&_<n},is0:_=>_===ye,isOdd:_=>(_&ae)===ae,neg:_=>Be(-_,n),eql:(_,l)=>_===l,sqr:_=>Be(_*_,n),add:(_,l)=>Be(_+l,n),sub:(_,l)=>Be(_-l,n),mul:(_,l)=>Be(_*l,n),pow:(_,l)=>v0(u,_,l),div:(_,l)=>Be(_*Oa(l,n),n),sqrN:_=>_*_,addN:(_,l)=>_+l,subN:(_,l)=>_-l,mulN:(_,l)=>_*l,inv:_=>Oa(_,n),sqrt:r.sqrt||(_=>a(u,_)),invertBatch:_=>x0(u,_),cmov:(_,l,f)=>f?l:_,toBytes:_=>e?ka(_,o):ns(_,o),fromBytes:_=>{if(_.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${_.length}`);return e?Ba(_):Ei(_)}});return Object.freeze(u)}function kf(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const t=n.toString(2).length;return Math.ceil(t/8)}function Pf(n){const t=kf(n);return t+Math.ceil(t/2)}function S0(n,t,e=!1){const r=n.length,i=kf(t),o=Pf(t);if(r<16||r<o||r>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const a=e?Ei(n):Ba(n),u=Be(a,t-ae)+ae;return e?ka(u,i):ns(u,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const z0=BigInt(0),Ta=BigInt(1);function B0(n,t){const e=(i,o)=>{const a=o.negate();return i?a:o},r=i=>{const o=Math.ceil(t/i)+1,a=2**(i-1);return{windows:o,windowSize:a}};return{constTimeNegate:e,unsafeLadder(i,o){let a=n.ZERO,u=i;for(;o>z0;)o&Ta&&(a=a.add(u)),u=u.double(),o>>=Ta;return a},precomputeWindow(i,o){const{windows:a,windowSize:u}=r(o),_=[];let l=i,f=l;for(let g=0;g<a;g++){f=l,_.push(f);for(let y=1;y<u;y++)f=f.add(l),_.push(f);l=f.double()}return _},wNAF(i,o,a){const{windows:u,windowSize:_}=r(i);let l=n.ZERO,f=n.BASE;const g=BigInt(2**i-1),y=2**i,v=BigInt(i);for(let I=0;I<u;I++){const k=I*_;let T=Number(a&g);a>>=v,T>_&&(T-=y,a+=Ta);const E=k,R=k+Math.abs(T)-1,B=I%2!==0,z=T<0;T===0?f=f.add(e(B,o[E])):l=l.add(e(z,o[R]))}return{p:l,f}},wNAFCached(i,o,a,u){const _=i._WINDOW_SIZE||1;let l=o.get(i);return l||(l=this.precomputeWindow(i,_),_!==1&&o.set(i,u(l))),this.wNAF(_,l,a)}}}function If(n){return E0(n.Fp),Is(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Bf(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function k0(n){const t=If(n);Is(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:r,a:i}=t;if(e){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:P0,hexToBytes:I0}=w0,xi={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(n){const{Err:t}=xi;if(n.length<2||n[0]!==2)throw new t("Invalid signature integer tag");const e=n[1],r=n.subarray(2,e+2);if(!e||r.length!==e)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:P0(r),l:n.subarray(e+2)}},toSig(n){const{Err:t}=xi,e=typeof n=="string"?I0(n):n;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let r=e.length;if(r<2||e[0]!=48)throw new t("Invalid signature tag");if(e[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=xi._parseInt(e.subarray(2)),{d:a,l:u}=xi._parseInt(o);if(u.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(n){const t=l=>Number.parseInt(l[0],16)&8?"00"+l:l,e=l=>{const f=l.toString(16);return f.length&1?`0${f}`:f},r=t(e(n.s)),i=t(e(n.r)),o=r.length/2,a=i.length/2,u=e(o),_=e(a);return`30${e(a+o+4)}02${_}${i}02${u}${r}`}},Jn=BigInt(0),Ve=BigInt(1);BigInt(2);const Ff=BigInt(3);BigInt(4);function F0(n){const t=k0(n),{Fp:e}=t,r=t.toBytes||((I,k,T)=>{const E=k.toAffine();return Ps(Uint8Array.from([4]),e.toBytes(E.x),e.toBytes(E.y))}),i=t.fromBytes||(I=>{const k=I.subarray(1),T=e.fromBytes(k.subarray(0,e.BYTES)),E=e.fromBytes(k.subarray(e.BYTES,2*e.BYTES));return{x:T,y:E}});function o(I){const{a:k,b:T}=t,E=e.sqr(I),R=e.mul(E,I);return e.add(e.add(R,e.mul(I,k)),T)}if(!e.eql(e.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function a(I){return typeof I=="bigint"&&Jn<I&&I<t.n}function u(I){if(!a(I))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function _(I){const{allowedPrivateKeyLengths:k,nByteLength:T,wrapPrivateKey:E,n:R}=t;if(k&&typeof I!="bigint"){if(I instanceof Uint8Array&&(I=es(I)),typeof I!="string"||!k.includes(I.length))throw new Error("Invalid key");I=I.padStart(T*2,"0")}let B;try{B=typeof I=="bigint"?I:Ei(er("private key",I,T))}catch{throw new Error(`private key must be ${T} bytes, hex or bigint, not ${typeof I}`)}return E&&(B=Be(B,R)),u(B),B}const l=new Map;function f(I){if(!(I instanceof g))throw new Error("ProjectivePoint expected")}class g{constructor(k,T,E){if(this.px=k,this.py=T,this.pz=E,k==null||!e.isValid(k))throw new Error("x required");if(T==null||!e.isValid(T))throw new Error("y required");if(E==null||!e.isValid(E))throw new Error("z required")}static fromAffine(k){const{x:T,y:E}=k||{};if(!k||!e.isValid(T)||!e.isValid(E))throw new Error("invalid affine point");if(k instanceof g)throw new Error("projective point not allowed");const R=B=>e.eql(B,e.ZERO);return R(T)&&R(E)?g.ZERO:new g(T,E,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(k){const T=e.invertBatch(k.map(E=>E.pz));return k.map((E,R)=>E.toAffine(T[R])).map(g.fromAffine)}static fromHex(k){const T=g.fromAffine(i(er("pointHex",k)));return T.assertValidity(),T}static fromPrivateKey(k){return g.BASE.multiply(_(k))}_setWindowSize(k){this._WINDOW_SIZE=k,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!e.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:k,y:T}=this.toAffine();if(!e.isValid(k)||!e.isValid(T))throw new Error("bad point: x or y not FE");const E=e.sqr(T),R=o(k);if(!e.eql(E,R))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:k}=this.toAffine();if(e.isOdd)return!e.isOdd(k);throw new Error("Field doesn't support isOdd")}equals(k){f(k);const{px:T,py:E,pz:R}=this,{px:B,py:z,pz:O}=k,C=e.eql(e.mul(T,O),e.mul(B,R)),N=e.eql(e.mul(E,O),e.mul(z,R));return C&&N}negate(){return new g(this.px,e.neg(this.py),this.pz)}double(){const{a:k,b:T}=t,E=e.mul(T,Ff),{px:R,py:B,pz:z}=this;let O=e.ZERO,C=e.ZERO,N=e.ZERO,D=e.mul(R,R),$=e.mul(B,B),et=e.mul(z,z),ft=e.mul(R,B);return ft=e.add(ft,ft),N=e.mul(R,z),N=e.add(N,N),O=e.mul(k,N),C=e.mul(E,et),C=e.add(O,C),O=e.sub($,C),C=e.add($,C),C=e.mul(O,C),O=e.mul(ft,O),N=e.mul(E,N),et=e.mul(k,et),ft=e.sub(D,et),ft=e.mul(k,ft),ft=e.add(ft,N),N=e.add(D,D),D=e.add(N,D),D=e.add(D,et),D=e.mul(D,ft),C=e.add(C,D),et=e.mul(B,z),et=e.add(et,et),D=e.mul(et,ft),O=e.sub(O,D),N=e.mul(et,$),N=e.add(N,N),N=e.add(N,N),new g(O,C,N)}add(k){f(k);const{px:T,py:E,pz:R}=this,{px:B,py:z,pz:O}=k;let C=e.ZERO,N=e.ZERO,D=e.ZERO;const $=t.a,et=e.mul(t.b,Ff);let ft=e.mul(T,B),L=e.mul(E,z),vt=e.mul(R,O),wt=e.add(T,E),at=e.add(B,z);wt=e.mul(wt,at),at=e.add(ft,L),wt=e.sub(wt,at),at=e.add(T,R);let pt=e.add(B,O);return at=e.mul(at,pt),pt=e.add(ft,vt),at=e.sub(at,pt),pt=e.add(E,R),C=e.add(z,O),pt=e.mul(pt,C),C=e.add(L,vt),pt=e.sub(pt,C),D=e.mul($,at),C=e.mul(et,vt),D=e.add(C,D),C=e.sub(L,D),D=e.add(L,D),N=e.mul(C,D),L=e.add(ft,ft),L=e.add(L,ft),vt=e.mul($,vt),at=e.mul(et,at),L=e.add(L,vt),vt=e.sub(ft,vt),vt=e.mul($,vt),at=e.add(at,vt),ft=e.mul(L,at),N=e.add(N,ft),ft=e.mul(pt,at),C=e.mul(wt,C),C=e.sub(C,ft),ft=e.mul(wt,L),D=e.mul(pt,D),D=e.add(D,ft),new g(C,N,D)}subtract(k){return this.add(k.negate())}is0(){return this.equals(g.ZERO)}wNAF(k){return v.wNAFCached(this,l,k,T=>{const E=e.invertBatch(T.map(R=>R.pz));return T.map((R,B)=>R.toAffine(E[B])).map(g.fromAffine)})}multiplyUnsafe(k){const T=g.ZERO;if(k===Jn)return T;if(u(k),k===Ve)return this;const{endo:E}=t;if(!E)return v.unsafeLadder(this,k);let{k1neg:R,k1:B,k2neg:z,k2:O}=E.splitScalar(k),C=T,N=T,D=this;for(;B>Jn||O>Jn;)B&Ve&&(C=C.add(D)),O&Ve&&(N=N.add(D)),D=D.double(),B>>=Ve,O>>=Ve;return R&&(C=C.negate()),z&&(N=N.negate()),N=new g(e.mul(N.px,E.beta),N.py,N.pz),C.add(N)}multiply(k){u(k);let T=k,E,R;const{endo:B}=t;if(B){const{k1neg:z,k1:O,k2neg:C,k2:N}=B.splitScalar(T);let{p:D,f:$}=this.wNAF(O),{p:et,f:ft}=this.wNAF(N);D=v.constTimeNegate(z,D),et=v.constTimeNegate(C,et),et=new g(e.mul(et.px,B.beta),et.py,et.pz),E=D.add(et),R=$.add(ft)}else{const{p:z,f:O}=this.wNAF(T);E=z,R=O}return g.normalizeZ([E,R])[0]}multiplyAndAddUnsafe(k,T,E){const R=g.BASE,B=(O,C)=>C===Jn||C===Ve||!O.equals(R)?O.multiplyUnsafe(C):O.multiply(C),z=B(this,T).add(B(k,E));return z.is0()?void 0:z}toAffine(k){const{px:T,py:E,pz:R}=this,B=this.is0();k==null&&(k=B?e.ONE:e.inv(R));const z=e.mul(T,k),O=e.mul(E,k),C=e.mul(R,k);if(B)return{x:e.ZERO,y:e.ZERO};if(!e.eql(C,e.ONE))throw new Error("invZ was invalid");return{x:z,y:O}}isTorsionFree(){const{h:k,isTorsionFree:T}=t;if(k===Ve)return!0;if(T)return T(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:k,clearCofactor:T}=t;return k===Ve?this:T?T(g,this):this.multiplyUnsafe(t.h)}toRawBytes(k=!0){return this.assertValidity(),r(g,this,k)}toHex(k=!0){return es(this.toRawBytes(k))}}g.BASE=new g(t.Gx,t.Gy,e.ONE),g.ZERO=new g(e.ZERO,e.ONE,e.ZERO);const y=t.nBitLength,v=B0(g,t.endo?Math.ceil(y/2):y);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:_,weierstrassEquation:o,isWithinCurveOrder:a}}function O0(n){const t=If(n);return Is(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function T0(n){const t=O0(n),{Fp:e,n:r}=t,i=e.BYTES+1,o=2*e.BYTES+1;function a(at){return Jn<at&&at<e.ORDER}function u(at){return Be(at,r)}function _(at){return Oa(at,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:f,weierstrassEquation:g,isWithinCurveOrder:y}=F0({...t,toBytes(at,pt,mt){const Rt=pt.toAffine(),xt=e.toBytes(Rt.x),Pt=Ps;return mt?Pt(Uint8Array.from([pt.hasEvenY()?2:3]),xt):Pt(Uint8Array.from([4]),xt,e.toBytes(Rt.y))},fromBytes(at){const pt=at.length,mt=at[0],Rt=at.subarray(1);if(pt===i&&(mt===2||mt===3)){const xt=Ei(Rt);if(!a(xt))throw new Error("Point is not on curve");const Pt=g(xt);let jt=e.sqrt(Pt);const W=(jt&Ve)===Ve;return(mt&1)===1!==W&&(jt=e.neg(jt)),{x:xt,y:jt}}else if(pt===o&&mt===4){const xt=e.fromBytes(Rt.subarray(0,e.BYTES)),Pt=e.fromBytes(Rt.subarray(e.BYTES,2*e.BYTES));return{x:xt,y:Pt}}else throw new Error(`Point of length ${pt} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),v=at=>es(ns(at,t.nByteLength));function I(at){const pt=r>>Ve;return at>pt}function k(at){return I(at)?u(-at):at}const T=(at,pt,mt)=>Ei(at.slice(pt,mt));class E{constructor(pt,mt,Rt){this.r=pt,this.s=mt,this.recovery=Rt,this.assertValidity()}static fromCompact(pt){const mt=t.nByteLength;return pt=er("compactSignature",pt,mt*2),new E(T(pt,0,mt),T(pt,mt,2*mt))}static fromDER(pt){const{r:mt,s:Rt}=xi.toSig(er("DER",pt));return new E(mt,Rt)}assertValidity(){if(!y(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!y(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(pt){return new E(this.r,this.s,pt)}recoverPublicKey(pt){const{r:mt,s:Rt,recovery:xt}=this,Pt=N(er("msgHash",pt));if(xt==null||![0,1,2,3].includes(xt))throw new Error("recovery id invalid");const jt=xt===2||xt===3?mt+t.n:mt;if(jt>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const W=(xt&1)===0?"02":"03",Z=l.fromHex(W+v(jt)),nt=_(jt),yt=u(-Pt*nt),H=u(Rt*nt),M=l.BASE.multiplyAndAddUnsafe(Z,yt,H);if(!M)throw new Error("point at infinify");return M.assertValidity(),M}hasHighS(){return I(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,u(-this.s),this.recovery):this}toDERRawBytes(){return rs(this.toDERHex())}toDERHex(){return xi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return rs(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const R={isValidPrivateKey(at){try{return f(at),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const at=Pf(t.n);return S0(t.randomBytes(at),t.n)},precompute(at=8,pt=l.BASE){return pt._setWindowSize(at),pt.multiply(BigInt(3)),pt}};function B(at,pt=!0){return l.fromPrivateKey(at).toRawBytes(pt)}function z(at){const pt=at instanceof Uint8Array,mt=typeof at=="string",Rt=(pt||mt)&&at.length;return pt?Rt===i||Rt===o:mt?Rt===2*i||Rt===2*o:at instanceof l}function O(at,pt,mt=!0){if(z(at))throw new Error("first arg must be private key");if(!z(pt))throw new Error("second arg must be public key");return l.fromHex(pt).multiply(f(at)).toRawBytes(mt)}const C=t.bits2int||function(at){const pt=Ei(at),mt=at.length*8-t.nBitLength;return mt>0?pt>>BigInt(mt):pt},N=t.bits2int_modN||function(at){return u(C(at))},D=Pa(t.nBitLength);function $(at){if(typeof at!="bigint")throw new Error("bigint expected");if(!(Jn<=at&&at<D))throw new Error(`bigint expected < 2^${t.nBitLength}`);return ns(at,t.nByteLength)}function et(at,pt,mt=ft){if(["recovered","canonical"].some(ct=>ct in mt))throw new Error("sign() legacy options not supported");const{hash:Rt,randomBytes:xt}=t;let{lowS:Pt,prehash:jt,extraEntropy:W}=mt;Pt==null&&(Pt=!0),at=er("msgHash",at),jt&&(at=er("prehashed msgHash",Rt(at)));const Z=N(at),nt=f(pt),yt=[$(nt),$(Z)];if(W!=null){const ct=W===!0?xt(e.BYTES):W;yt.push(er("extraEntropy",ct))}const H=Ps(...yt),M=Z;function X(ct){const _t=C(ct);if(!y(_t))return;const x=_(_t),S=l.BASE.multiply(_t).toAffine(),rt=u(S.x);if(rt===Jn)return;const lt=u(x*u(M+rt*nt));if(lt===Jn)return;let Bt=(S.x===rt?0:2)|Number(S.y&Ve),bt=lt;return Pt&&I(lt)&&(bt=k(lt),Bt^=1),new E(rt,bt,Bt)}return{seed:H,k2sig:X}}const ft={lowS:t.lowS,prehash:!1},L={lowS:t.lowS,prehash:!1};function vt(at,pt,mt=ft){const{seed:Rt,k2sig:xt}=et(at,pt,mt),Pt=t;return Rf(Pt.hash.outputLen,Pt.nByteLength,Pt.hmac)(Rt,xt)}l.BASE._setWindowSize(8);function wt(at,pt,mt,Rt=L){const xt=at;if(pt=er("msgHash",pt),mt=er("publicKey",mt),"strict"in Rt)throw new Error("options.strict was renamed to lowS");const{lowS:Pt,prehash:jt}=Rt;let W,Z;try{if(typeof xt=="string"||xt instanceof Uint8Array)try{W=E.fromDER(xt)}catch(S){if(!(S instanceof xi.Err))throw S;W=E.fromCompact(xt)}else if(typeof xt=="object"&&typeof xt.r=="bigint"&&typeof xt.s=="bigint"){const{r:S,s:rt}=xt;W=new E(S,rt)}else throw new Error("PARSE");Z=l.fromHex(mt)}catch(S){if(S.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Pt&&W.hasHighS())return!1;jt&&(pt=t.hash(pt));const{r:nt,s:yt}=W,H=N(pt),M=_(yt),X=u(H*M),ct=u(nt*M),_t=l.BASE.multiplyAndAddUnsafe(Z,X,ct)?.toAffine();return _t?u(_t.x)===nt:!1}return{CURVE:t,getPublicKey:B,getSharedSecret:O,sign:vt,verify:wt,ProjectivePoint:l,Signature:E,utils:R}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function C0(n){return{hash:n,hmac:(t,...e)=>tf(n,t,ky(...e)),randomBytes:Py}}function N0(n,t){const e=r=>T0({...n,...C0(r)});return Object.freeze({...e(t),create:e})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Of=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Tf=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),L0=BigInt(1),Ca=BigInt(2),Cf=(n,t)=>(n+t/Ca)/t;function D0(n){const t=Of,e=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),u=BigInt(44),_=BigInt(88),l=n*n*n%t,f=l*l*n%t,g=He(f,e,t)*f%t,y=He(g,e,t)*f%t,v=He(y,Ca,t)*l%t,I=He(v,i,t)*v%t,k=He(I,o,t)*I%t,T=He(k,u,t)*k%t,E=He(T,_,t)*T%t,R=He(E,u,t)*k%t,B=He(R,e,t)*f%t,z=He(B,a,t)*I%t,O=He(z,r,t)*l%t,C=He(O,Ca,t);if(!Na.eql(Na.sqr(C),n))throw new Error("Cannot find square root");return C}const Na=R0(Of,void 0,void 0,{sqrt:D0}),fi=N0({a:BigInt(0),b:BigInt(7),Fp:Na,n:Tf,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const t=Tf,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-L0*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=e,a=BigInt("0x100000000000000000000000000000000"),u=Cf(o*n,t),_=Cf(-r*n,t);let l=Be(n-u*e-_*i,t),f=Be(-u*r-_*o,t);const g=l>a,y=f>a;if(g&&(l=t-l),y&&(f=t-f),l>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:g,k1:l,k2neg:y,k2:f}}}},rf);BigInt(0),fi.ProjectivePoint;const Fs="0x0000000000000000000000000000000000000000",Nf="0x0000000000000000000000000000000000000000000000000000000000000000",Lf=BigInt(0),Df=BigInt(1),Uf=BigInt(2),Mf=BigInt(27),jf=BigInt(28),Ao=BigInt(35),is={};function Gf(n){return Ge(fe(n),32)}class se{#t;#e;#r;#n;get r(){return this.#t}set r(t){G(mi(t)===32,"invalid r","value",t),this.#t=gt(t)}get s(){return G(parseInt(this.#e.substring(0,3))<8,"non-canonical s; use ._s","s",this.#e),this.#e}set s(t){G(mi(t)===32,"invalid s","value",t),this.#e=gt(t)}get _s(){return this.#e}isValid(){return parseInt(this.#e.substring(0,3))<8}get v(){return this.#r}set v(t){const e=Tt(t,"value");G(e===27||e===28,"invalid v","v",t),this.#r=e}get networkV(){return this.#n}get legacyChainId(){const t=this.networkV;return t==null?null:se.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){const t=zt(this.s);return this.yParity&&(t[0]|=128),gt(t)}get compactSerialized(){return te([this.r,this.yParityAndS])}get serialized(){return te([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(t,e,r,i){co(t,is,"Signature"),this.#t=e,this.#e=r,this.#r=i,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this._s}"${this.isValid()?"":', valid: "false"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new se(is,this.r,this._s,this.v);return this.networkV&&(t.#n=this.networkV),t}toJSON(){const t=this.networkV;return{_type:"signature",networkV:t!=null?t.toString():null,r:this.r,s:this._s,v:this.v}}static getChainId(t){const e=Et(t,"v");return e==Mf||e==jf?Lf:(G(e>=Ao,"invalid EIP-155 v","v",t),(e-Ao)/Uf)}static getChainIdV(t,e){return Et(t)*Uf+BigInt(35+e-27)}static getNormalizedV(t){const e=Et(t);return e===Lf||e===Mf?27:e===Df||e===jf?28:(G(e>=Ao,"invalid v","v",t),e&Df?27:28)}static from(t){function e(l,f){G(l,f,"signature",t)}if(t==null)return new se(is,Nf,Nf,27);if(typeof t=="string"){const l=zt(t,"signature");if(l.length===64){const f=gt(l.slice(0,32)),g=l.slice(32,64),y=g[0]&128?28:27;return g[0]&=127,new se(is,f,gt(g),y)}if(l.length===65){const f=gt(l.slice(0,32)),g=gt(l.slice(32,64)),y=se.getNormalizedV(l[64]);return new se(is,f,g,y)}e(!1,"invalid raw signature length")}if(t instanceof se)return t.clone();const r=t.r;e(r!=null,"missing r");const i=Gf(r),o=function(l,f){if(l!=null)return Gf(l);if(f!=null){e($t(f,32),"invalid yParityAndS");const g=zt(f);return g[0]&=127,gt(g)}e(!1,"missing s")}(t.s,t.yParityAndS),{networkV:a,v:u}=function(l,f,g){if(l!=null){const y=Et(l);return{networkV:y>=Ao?y:void 0,v:se.getNormalizedV(y)}}if(f!=null)return e($t(f,32),"invalid yParityAndS"),{v:zt(f)[0]&128?28:27};if(g!=null){switch(Tt(g,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}e(!1,"invalid yParity")}e(!1,"missing v")}(t.v,t.yParityAndS,t.yParity),_=new se(is,i,o,u);return a&&(_.#n=a),e(t.yParity==null||Tt(t.yParity,"sig.yParity")===_.yParity,"yParity mismatch"),e(t.yParityAndS==null||t.yParityAndS===_.yParityAndS,"yParityAndS mismatch"),_}}class $n{#t;constructor(t){G(mi(t)===32,"invalid private key","privateKey","[REDACTED]"),this.#t=gt(t)}get privateKey(){return this.#t}get publicKey(){return $n.computePublicKey(this.#t)}get compressedPublicKey(){return $n.computePublicKey(this.#t,!0)}sign(t){G(mi(t)===32,"invalid digest length","digest",t);const e=fi.sign(ve(t),ve(this.#t),{lowS:!0});return se.from({r:ii(e.r,32),s:ii(e.s,32),v:e.recovery?28:27})}computeSharedSecret(t){const e=$n.computePublicKey(t);return gt(fi.getSharedSecret(ve(this.#t),zt(e),!1))}static computePublicKey(t,e){let r=zt(t,"key");if(r.length===32){const o=fi.getPublicKey(r,!!e);return gt(o)}if(r.length===64){const o=new Uint8Array(65);o[0]=4,o.set(r,1),r=o}const i=fi.ProjectivePoint.fromHex(r);return gt(i.toRawBytes(e))}static recoverPublicKey(t,e){G(mi(t)===32,"invalid digest length","digest",t);const r=se.from(e);let i=fi.Signature.fromCompact(ve(te([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const o=i.recoverPublicKey(ve(t));return G(o!=null,"invalid signature for digest","signature",e),"0x"+o.toHex(!1)}static addPoints(t,e,r){const i=fi.ProjectivePoint.fromHex($n.computePublicKey(t).substring(2)),o=fi.ProjectivePoint.fromHex($n.computePublicKey(e).substring(2));return"0x"+i.add(o).toHex(!!r)}}const U0=BigInt(0),M0=BigInt(36);function Hf(n){n=n.toLowerCase();const t=n.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const r=zt(le(e));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(r[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const La={};for(let n=0;n<10;n++)La[String(n)]=String(n);for(let n=0;n<26;n++)La[String.fromCharCode(65+n)]=String(10+n);const Vf=15;function j0(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let t=n.split("").map(r=>La[r]).join("");for(;t.length>=Vf;){let r=t.substring(0,Vf);t=parseInt(r,10)%97+t.substring(r.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}const G0=function(){const n={};for(let t=0;t<36;t++){const e="0123456789abcdefghijklmnopqrstuvwxyz"[t];n[e]=BigInt(t)}return n}();function H0(n){n=n.toLowerCase();let t=U0;for(let e=0;e<n.length;e++)t=t*M0+G0[n[e]];return t}function Dt(n){if(G(typeof n=="string","invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/)){n.startsWith("0x")||(n="0x"+n);const t=Hf(n);return G(!n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===n,"bad address checksum","address",n),t}if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){G(n.substring(2,4)===j0(n),"bad icap checksum","address",n);let t=H0(n.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return Hf("0x"+t)}G(!1,"invalid address","address",n)}function V0(n){const t=Dt(n.from);let r=Et(n.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,Dt(ie(le(oi([t,r])),12))}function qf(n){return n&&typeof n.getAddress=="function"}function qe(n){try{return Dt(n),!0}catch{}return!1}async function Da(n,t){const e=await t;return(e==null||e==="0x0000000000000000000000000000000000000000")&&(ut(typeof n!="string","unconfigured name","UNCONFIGURED_NAME",{value:n}),G(!1,"invalid AddressLike value; did not resolve to a value address","target",n)),Dt(e)}function Re(n,t){if(typeof n=="string")return n.match(/^0x[0-9a-f]{40}$/i)?Dt(n):(ut(t!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Da(n,t.resolveName(n)));if(qf(n))return Da(n,n.getAddress());if(n&&typeof n.then=="function")return Da(n,n);G(!1,"unsupported addressable value","target",n)}const Yn={};function At(n,t){let e=!1;return t<0&&(e=!0,t*=-1),new oe(Yn,`${e?"":"u"}int${t}`,n,{signed:e,width:t})}function Mt(n,t){return new oe(Yn,`bytes${t||""}`,n,{size:t})}const Qf=Symbol.for("_ethers_typed");class oe{type;value;#t;_typedSymbol;constructor(t,e,r,i){i==null&&(i=null),co(Yn,t,"Typed"),St(this,{_typedSymbol:Qf,type:e,value:r}),this.#t=i,this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(t=>t.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return this.#t}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return this.#t===!0?-1:this.#t===!1?this.value.length:null}static from(t,e){return new oe(Yn,t,e)}static uint8(t){return At(t,8)}static uint16(t){return At(t,16)}static uint24(t){return At(t,24)}static uint32(t){return At(t,32)}static uint40(t){return At(t,40)}static uint48(t){return At(t,48)}static uint56(t){return At(t,56)}static uint64(t){return At(t,64)}static uint72(t){return At(t,72)}static uint80(t){return At(t,80)}static uint88(t){return At(t,88)}static uint96(t){return At(t,96)}static uint104(t){return At(t,104)}static uint112(t){return At(t,112)}static uint120(t){return At(t,120)}static uint128(t){return At(t,128)}static uint136(t){return At(t,136)}static uint144(t){return At(t,144)}static uint152(t){return At(t,152)}static uint160(t){return At(t,160)}static uint168(t){return At(t,168)}static uint176(t){return At(t,176)}static uint184(t){return At(t,184)}static uint192(t){return At(t,192)}static uint200(t){return At(t,200)}static uint208(t){return At(t,208)}static uint216(t){return At(t,216)}static uint224(t){return At(t,224)}static uint232(t){return At(t,232)}static uint240(t){return At(t,240)}static uint248(t){return At(t,248)}static uint256(t){return At(t,256)}static uint(t){return At(t,256)}static int8(t){return At(t,-8)}static int16(t){return At(t,-16)}static int24(t){return At(t,-24)}static int32(t){return At(t,-32)}static int40(t){return At(t,-40)}static int48(t){return At(t,-48)}static int56(t){return At(t,-56)}static int64(t){return At(t,-64)}static int72(t){return At(t,-72)}static int80(t){return At(t,-80)}static int88(t){return At(t,-88)}static int96(t){return At(t,-96)}static int104(t){return At(t,-104)}static int112(t){return At(t,-112)}static int120(t){return At(t,-120)}static int128(t){return At(t,-128)}static int136(t){return At(t,-136)}static int144(t){return At(t,-144)}static int152(t){return At(t,-152)}static int160(t){return At(t,-160)}static int168(t){return At(t,-168)}static int176(t){return At(t,-176)}static int184(t){return At(t,-184)}static int192(t){return At(t,-192)}static int200(t){return At(t,-200)}static int208(t){return At(t,-208)}static int216(t){return At(t,-216)}static int224(t){return At(t,-224)}static int232(t){return At(t,-232)}static int240(t){return At(t,-240)}static int248(t){return At(t,-248)}static int256(t){return At(t,-256)}static int(t){return At(t,-256)}static bytes1(t){return Mt(t,1)}static bytes2(t){return Mt(t,2)}static bytes3(t){return Mt(t,3)}static bytes4(t){return Mt(t,4)}static bytes5(t){return Mt(t,5)}static bytes6(t){return Mt(t,6)}static bytes7(t){return Mt(t,7)}static bytes8(t){return Mt(t,8)}static bytes9(t){return Mt(t,9)}static bytes10(t){return Mt(t,10)}static bytes11(t){return Mt(t,11)}static bytes12(t){return Mt(t,12)}static bytes13(t){return Mt(t,13)}static bytes14(t){return Mt(t,14)}static bytes15(t){return Mt(t,15)}static bytes16(t){return Mt(t,16)}static bytes17(t){return Mt(t,17)}static bytes18(t){return Mt(t,18)}static bytes19(t){return Mt(t,19)}static bytes20(t){return Mt(t,20)}static bytes21(t){return Mt(t,21)}static bytes22(t){return Mt(t,22)}static bytes23(t){return Mt(t,23)}static bytes24(t){return Mt(t,24)}static bytes25(t){return Mt(t,25)}static bytes26(t){return Mt(t,26)}static bytes27(t){return Mt(t,27)}static bytes28(t){return Mt(t,28)}static bytes29(t){return Mt(t,29)}static bytes30(t){return Mt(t,30)}static bytes31(t){return Mt(t,31)}static bytes32(t){return Mt(t,32)}static address(t){return new oe(Yn,"address",t)}static bool(t){return new oe(Yn,"bool",!!t)}static bytes(t){return new oe(Yn,"bytes",t)}static string(t){return new oe(Yn,"string",t)}static array(t,e){throw new Error("not implemented yet")}static tuple(t,e){throw new Error("not implemented yet")}static overrides(t){return new oe(Yn,"overrides",Object.assign({},t))}static isTyped(t){return t&&typeof t=="object"&&"_typedSymbol"in t&&t._typedSymbol===Qf}static dereference(t,e){if(oe.isTyped(t)){if(t.type!==e)throw new Error(`invalid type: expecetd ${e}, got ${t.type}`);return t.value}return t}}class q0 extends Wn{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){let r=oe.dereference(e,"string");try{r=Dt(r)}catch(i){return this._throwError(i.message,e)}return t.writeValue(r)}decode(t){return Dt(ii(t.readValue(),20))}}class Q0 extends Wn{coder;constructor(t){super(t.name,t.type,"_",t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}function Kf(n,t,e){let r=[];if(Array.isArray(e))r=e;else if(e&&typeof e=="object"){let _={};r=t.map(l=>{const f=l.localName;return ut(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),ut(!_[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),_[f]=!0,e[f]})}else G(!1,"invalid tuple value","tuple",e);G(t.length===r.length,"types/value length mismatch","tuple",e);let i=new ya,o=new ya,a=[];t.forEach((_,l)=>{let f=r[l];if(_.dynamic){let g=o.length;_.encode(o,f);let y=i.writeUpdatableValue();a.push(v=>{y(v+g)})}else _.encode(i,f)}),a.forEach(_=>{_(i.length)});let u=n.appendWriter(i);return u+=n.appendWriter(o),u}function Wf(n,t){let e=[],r=[],i=n.subReader(0);return t.forEach(o=>{let a=null;if(o.dynamic){let u=n.readIndex(),_=i.subReader(u);try{a=o.decode(_)}catch(l){if(me(l,"BUFFER_OVERRUN"))throw l;a=l,a.baseType=o.name,a.name=o.localName,a.type=o.type}}else try{a=o.decode(n)}catch(u){if(me(u,"BUFFER_OVERRUN"))throw u;a=u,a.baseType=o.name,a.name=o.localName,a.type=o.type}if(a==null)throw new Error("investigate");e.push(a),r.push(o.localName||null)}),Kn.fromItems(e,r)}class K0 extends Wn{coder;length;constructor(t,e,r){const i=t.type+"["+(e>=0?e:"")+"]",o=e===-1||t.dynamic;super("array",i,r,o),St(this,{coder:t,length:e})}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){const r=oe.dereference(e,"array");Array.isArray(r)||this._throwError("expected array value",r);let i=this.length;i===-1&&(i=r.length,t.writeValue(r.length)),S_(r.length,i,"coder array"+(this.localName?" "+this.localName:""));let o=[];for(let a=0;a<r.length;a++)o.push(this.coder);return Kf(t,o,r)}decode(t){let e=this.length;e===-1&&(e=t.readIndex(),ut(e*xe<=t.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:t.bytes,offset:e*xe,length:t.dataLength}));let r=[];for(let i=0;i<e;i++)r.push(new Q0(this.coder));return Wf(t,r)}}class W0 extends Wn{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){const r=oe.dereference(e,"bool");return t.writeValue(r?1:0)}decode(t){return!!t.readValue()}}class Jf extends Wn{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=ve(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readIndex(),!0)}}class J0 extends Jf{constructor(t){super("bytes",t)}decode(t){return gt(super.decode(t))}}class $0 extends Wn{size;constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),St(this,{size:t},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(t,e){let r=ve(oe.dereference(e,this.type));return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return gt(t.readBytes(this.size))}}const Y0=new Uint8Array([]);class Z0 extends Wn{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return e!=null&&this._throwError("not null",e),t.writeBytes(Y0)}decode(t){return t.readBytes(0),null}}const X0=BigInt(0),tb=BigInt(1),eb=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class rb extends Wn{size;signed;constructor(t,e,r){const i=(e?"int":"uint")+t*8;super(i,i,r,!1),St(this,{size:t,signed:e},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(t,e){let r=Et(oe.dereference(e,this.type)),i=Ss(eb,xe*8);if(this.signed){let o=Ss(i,this.size*8-1);(r>o||r<-(o+tb))&&this._throwError("value out-of-bounds",e),r=ha(r,8*xe)}else(r<X0||r>Ss(i,this.size*8))&&this._throwError("value out-of-bounds",e);return t.writeValue(r)}decode(t){let e=Ss(t.readValue(),this.size*8);return this.signed&&(e=ay(e,this.size*8)),e}}class nb extends Jf{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,Nn(oe.dereference(e,"string")))}decode(t){return fo(super.decode(t))}}class Eo extends Wn{coders;constructor(t,e){let r=!1;const i=[];t.forEach(a=>{a.dynamic&&(r=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,e,r),St(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(r=>{t.push(r.defaultValue())});const e=this.coders.reduce((r,i)=>{const o=i.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});return this.coders.forEach((r,i)=>{let o=r.localName;!o||e[o]!==1||(o==="length"&&(o="_length"),t[o]==null&&(t[o]=t[i]))}),Object.freeze(t)}encode(t,e){const r=oe.dereference(e,"tuple");return Kf(t,this.coders,r)}decode(t){return Wf(t,this.coders)}}function Ua(n,t){return{address:Dt(n),storageKeys:t.map((e,r)=>(G($t(e,32),"invalid slot",`storageKeys[${r}]`,e),e.toLowerCase()))}}function Ri(n){if(Array.isArray(n))return n.map((e,r)=>Array.isArray(e)?(G(e.length===2,"invalid slot set",`value[${r}]`,e),Ua(e[0],e[1])):(G(e!=null&&typeof e=="object","invalid address-slot set","value",n),Ua(e.address,e.storageKeys)));G(n!=null&&typeof n=="object","invalid access list","value",n);const t=Object.keys(n).map(e=>{const r=n[e].reduce((i,o)=>(i[o]=!0,i),{});return Ua(e,Object.keys(r).sort())});return t.sort((e,r)=>e.address.localeCompare(r.address)),t}function $f(n){return{address:Dt(n.address),nonce:Et(n.nonce!=null?n.nonce:0),chainId:Et(n.chainId!=null?n.chainId:0),signature:se.from(n.signature)}}function ib(n){let t;return typeof n=="string"?t=$n.computePublicKey(n,!1):t=n.publicKey,Dt(le("0x"+t.substring(4)).substring(26))}function Yf(n,t){return ib($n.recoverPublicKey(n,t))}const be=BigInt(0),sb=BigInt(2),ob=BigInt(27),ab=BigInt(28),cb=BigInt(35),ub=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ma=4096*32;function _b(n){return{blobToKzgCommitment:r=>{if("computeBlobProof"in n){if("blobToKzgCommitment"in n&&typeof n.blobToKzgCommitment=="function")return zt(n.blobToKzgCommitment(gt(r)))}else if("blobToKzgCommitment"in n&&typeof n.blobToKzgCommitment=="function")return zt(n.blobToKzgCommitment(r));if("blobToKZGCommitment"in n&&typeof n.blobToKZGCommitment=="function")return zt(n.blobToKZGCommitment(gt(r)));G(!1,"unsupported KZG library","kzg",n)},computeBlobKzgProof:(r,i)=>{if("computeBlobProof"in n&&typeof n.computeBlobProof=="function")return zt(n.computeBlobProof(gt(r),gt(i)));if("computeBlobKzgProof"in n&&typeof n.computeBlobKzgProof=="function")return n.computeBlobKzgProof(r,i);if("computeBlobKZGProof"in n&&typeof n.computeBlobKZGProof=="function")return zt(n.computeBlobKZGProof(gt(r),gt(i)));G(!1,"unsupported KZG library","kzg",n)}}}function Zf(n,t){let e=n.toString(16);for(;e.length<2;)e="0"+e;return e+=ts(t).substring(4),"0x"+e}function ss(n){return n==="0x"?null:Dt(n)}function vo(n,t){try{return Ri(n)}catch(e){G(!1,e.message,t,n)}}function fb(n,t){try{if(!Array.isArray(n))throw new Error("authorizationList: invalid array");const e=[];for(let r=0;r<n.length;r++){const i=n[r];if(!Array.isArray(i))throw new Error(`authorization[${r}]: invalid array`);if(i.length!==6)throw new Error(`authorization[${r}]: wrong length`);if(!i[1])throw new Error(`authorization[${r}]: null address`);e.push({address:ss(i[1]),nonce:Kt(i[2],"nonce"),chainId:Kt(i[0],"chainId"),signature:se.from({yParity:Si(i[3],"yParity"),r:Ge(i[4],32),s:Ge(i[5],32)})})}return e}catch(e){G(!1,e.message,t,n)}}function Si(n,t){return n==="0x"?0:Tt(n,t)}function Kt(n,t){if(n==="0x")return be;const e=Et(n,t);return G(e<=ub,"value exceeds uint size",t,e),e}function Nt(n,t){const e=Et(n,"value"),r=fe(e);return G(r.length<=32,"value too large",`tx.${t}`,e),r}function xo(n){return Ri(n).map(t=>[t.address,t.storageKeys])}function lb(n){return n.map(t=>[Nt(t.chainId,"chainId"),t.address,Nt(t.nonce,"nonce"),Nt(t.signature.yParity,"yParity"),fe(t.signature.r),fe(t.signature.s)])}function hb(n,t){G(Array.isArray(n),`invalid ${t}`,"value",n);for(let e=0;e<n.length;e++)G($t(n[e],32),"invalid ${ param } hash",`value[${e}]`,n[e]);return n}function pb(n){const t=zs(n);G(Array.isArray(t)&&(t.length===9||t.length===6),"invalid field count for legacy transaction","data",n);const e={type:0,nonce:Si(t[0],"nonce"),gasPrice:Kt(t[1],"gasPrice"),gasLimit:Kt(t[2],"gasLimit"),to:ss(t[3]),value:Kt(t[4],"value"),data:gt(t[5]),chainId:be};if(t.length===6)return e;const r=Kt(t[6],"v"),i=Kt(t[7],"r"),o=Kt(t[8],"s");if(i===be&&o===be)e.chainId=r;else{let a=(r-cb)/sb;a<be&&(a=be),e.chainId=a,G(a!==be||r===ob||r===ab,"non-canonical legacy v","v",t[6]),e.signature=se.from({r:Ge(t[7],32),s:Ge(t[8],32),v:r})}return e}function db(n,t){const e=[Nt(n.nonce,"nonce"),Nt(n.gasPrice||0,"gasPrice"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data];let r=be;if(n.chainId!=be)r=Et(n.chainId,"tx.chainId"),G(!t||t.networkV==null||t.legacyChainId===r,"tx.chainId/sig.v mismatch","sig",t);else if(n.signature){const o=n.signature.legacyChainId;o!=null&&(r=o)}if(!t)return r!==be&&(e.push(fe(r)),e.push("0x"),e.push("0x")),oi(e);let i=BigInt(27+t.yParity);return r!==be?i=se.getChainIdV(r,t.v):BigInt(t.v)!==i&&G(!1,"tx.chainId/sig.v mismatch","sig",t),e.push(fe(i)),e.push(fe(t.r)),e.push(fe(t.s)),oi(e)}function Ro(n,t){let e;try{if(e=Si(t[0],"yParity"),e!==0&&e!==1)throw new Error("bad yParity")}catch{G(!1,"invalid yParity","yParity",t[0])}const r=Ge(t[1],32),i=Ge(t[2],32),o=se.from({r,s:i,yParity:e});n.signature=o}function wb(n){const t=zs(zt(n).slice(1));G(Array.isArray(t)&&(t.length===9||t.length===12),"invalid field count for transaction type: 2","data",gt(n));const e={type:2,chainId:Kt(t[0],"chainId"),nonce:Si(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ss(t[5]),value:Kt(t[6],"value"),data:gt(t[7]),accessList:vo(t[8],"accessList")};return t.length===9||Ro(e,t.slice(9)),e}function gb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,xo(n.accessList||[])];return t&&(e.push(Nt(t.yParity,"yParity")),e.push(fe(t.r)),e.push(fe(t.s))),te(["0x02",oi(e)])}function yb(n){const t=zs(zt(n).slice(1));G(Array.isArray(t)&&(t.length===8||t.length===11),"invalid field count for transaction type: 1","data",gt(n));const e={type:1,chainId:Kt(t[0],"chainId"),nonce:Si(t[1],"nonce"),gasPrice:Kt(t[2],"gasPrice"),gasLimit:Kt(t[3],"gasLimit"),to:ss(t[4]),value:Kt(t[5],"value"),data:gt(t[6]),accessList:vo(t[7],"accessList")};return t.length===8||Ro(e,t.slice(8)),e}function bb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.gasPrice||0,"gasPrice"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,xo(n.accessList||[])];return t&&(e.push(Nt(t.yParity,"recoveryParam")),e.push(fe(t.r)),e.push(fe(t.s))),te(["0x01",oi(e)])}function mb(n){let t=zs(zt(n).slice(1)),e="3",r=null;if(t.length===4&&Array.isArray(t[0])){e="3 (network format)";const o=t[1],a=t[2],u=t[3];G(Array.isArray(o),"invalid network format: blobs not an array","fields[1]",o),G(Array.isArray(a),"invalid network format: commitments not an array","fields[2]",a),G(Array.isArray(u),"invalid network format: proofs not an array","fields[3]",u),G(o.length===a.length,"invalid network format: blobs/commitments length mismatch","fields",t),G(o.length===u.length,"invalid network format: blobs/proofs length mismatch","fields",t),r=[];for(let _=0;_<t[1].length;_++)r.push({data:o[_],commitment:a[_],proof:u[_]});t=t[0]}G(Array.isArray(t)&&(t.length===11||t.length===14),`invalid field count for transaction type: ${e}`,"data",gt(n));const i={type:3,chainId:Kt(t[0],"chainId"),nonce:Si(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ss(t[5]),value:Kt(t[6],"value"),data:gt(t[7]),accessList:vo(t[8],"accessList"),maxFeePerBlobGas:Kt(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};r&&(i.blobs=r),G(i.to!=null,`invalid address for transaction type: ${e}`,"data",n),G(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",n);for(let o=0;o<i.blobVersionedHashes.length;o++)G($t(i.blobVersionedHashes[o],32),`invalid blobVersionedHash at index ${o}: must be length 32`,"data",n);return t.length===11||Ro(i,t.slice(11)),i}function Ab(n,t,e){const r=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||Fs,Nt(n.value,"value"),n.data,xo(n.accessList||[]),Nt(n.maxFeePerBlobGas||0,"maxFeePerBlobGas"),hb(n.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(r.push(Nt(t.yParity,"yParity")),r.push(fe(t.r)),r.push(fe(t.s)),e)?te(["0x03",oi([r,e.map(i=>i.data),e.map(i=>i.commitment),e.map(i=>i.proof)])]):te(["0x03",oi(r)])}function Eb(n){const t=zs(zt(n).slice(1));G(Array.isArray(t)&&(t.length===10||t.length===13),"invalid field count for transaction type: 4","data",gt(n));const e={type:4,chainId:Kt(t[0],"chainId"),nonce:Si(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ss(t[5]),value:Kt(t[6],"value"),data:gt(t[7]),accessList:vo(t[8],"accessList"),authorizationList:fb(t[9],"authorizationList")};return t.length===10||Ro(e,t.slice(10)),e}function vb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,xo(n.accessList||[]),lb(n.authorizationList||[])];return t&&(e.push(Nt(t.yParity,"yParity")),e.push(fe(t.r)),e.push(fe(t.s))),te(["0x04",oi(e)])}class rr{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#d;#c;#_;#f;#l;#g;get type(){return this.#t}set type(t){switch(t){case null:this.#t=null;break;case 0:case"legacy":this.#t=0;break;case 1:case"berlin":case"eip-2930":this.#t=1;break;case 2:case"london":case"eip-1559":this.#t=2;break;case 3:case"cancun":case"eip-4844":this.#t=3;break;case 4:case"pectra":case"eip-7702":this.#t=4;break;default:G(!1,"unsupported transaction type","type",t)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const t=this.#e;return t==null&&this.type===3?Fs:t}set to(t){this.#e=t==null?null:Dt(t)}get nonce(){return this.#n}set nonce(t){this.#n=Tt(t,"value")}get gasLimit(){return this.#i}set gasLimit(t){this.#i=Et(t)}get gasPrice(){const t=this.#o;return t==null&&(this.type===0||this.type===1)?be:t}set gasPrice(t){this.#o=t==null?null:Et(t,"gasPrice")}get maxPriorityFeePerGas(){const t=this.#s;return t??(this.type===2||this.type===3?be:null)}set maxPriorityFeePerGas(t){this.#s=t==null?null:Et(t,"maxPriorityFeePerGas")}get maxFeePerGas(){const t=this.#a;return t??(this.type===2||this.type===3?be:null)}set maxFeePerGas(t){this.#a=t==null?null:Et(t,"maxFeePerGas")}get data(){return this.#r}set data(t){this.#r=gt(t)}get value(){return this.#h}set value(t){this.#h=Et(t,"value")}get chainId(){return this.#u}set chainId(t){this.#u=Et(t)}get signature(){return this.#p||null}set signature(t){this.#p=t==null?null:se.from(t)}get accessList(){const t=this.#d||null;return t??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(t){this.#d=t==null?null:Ri(t)}get authorizationList(){const t=this.#g||null;return t==null&&this.type===4?[]:t}set authorizationList(t){this.#g=t==null?null:t.map(e=>$f(e))}get maxFeePerBlobGas(){const t=this.#c;return t==null&&this.type===3?be:t}set maxFeePerBlobGas(t){this.#c=t==null?null:Et(t,"maxFeePerBlobGas")}get blobVersionedHashes(){let t=this.#_;return t==null&&this.type===3?[]:t}set blobVersionedHashes(t){if(t!=null){G(Array.isArray(t),"blobVersionedHashes must be an Array","value",t),t=t.slice();for(let e=0;e<t.length;e++)G($t(t[e],32),"invalid blobVersionedHash",`value[${e}]`,t[e])}this.#_=t}get blobs(){return this.#l==null?null:this.#l.map(t=>Object.assign({},t))}set blobs(t){if(t==null){this.#l=null;return}const e=[],r=[];for(let i=0;i<t.length;i++){const o=t[i];if(la(o)){ut(this.#f,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let a=zt(o);if(G(a.length<=Ma,"blob is too large",`blobs[${i}]`,o),a.length!==Ma){const l=new Uint8Array(Ma);l.set(a),a=l}const u=this.#f.blobToKzgCommitment(a),_=gt(this.#f.computeBlobKzgProof(a,u));e.push({data:gt(a),commitment:gt(u),proof:_}),r.push(Zf(1,u))}else{const a=gt(o.commitment);e.push({data:gt(o.data),commitment:a,proof:gt(o.proof)}),r.push(Zf(1,a))}}this.#l=e,this.#_=r}get kzg(){return this.#f}set kzg(t){t==null?this.#f=null:this.#f=_b(t)}constructor(){this.#t=null,this.#e=null,this.#n=0,this.#i=be,this.#o=null,this.#s=null,this.#a=null,this.#r="0x",this.#h=be,this.#u=be,this.#p=null,this.#d=null,this.#c=null,this.#_=null,this.#f=null,this.#l=null,this.#g=null}get hash(){return this.signature==null?null:le(this.#w(!0,!1))}get unsignedHash(){return le(this.unsignedSerialized)}get from(){return this.signature==null?null:Yf(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:$n.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}#w(t,e){ut(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=t?this.signature:null;switch(this.inferType()){case 0:return db(this,r);case 1:return bb(this,r);case 2:return gb(this,r);case 3:return Ab(this,r,e?this.blobs:null);case 4:return vb(this,r)}ut(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#w(!0,!0)}get unsignedSerialized(){return this.#w(!1,!1)}inferType(){const t=this.inferTypes();return t.indexOf(2)>=0?2:t.pop()}inferTypes(){const t=this.gasPrice!=null,e=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,r=this.accessList!=null,i=this.#c!=null||this.#_;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ut(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ut(!e||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ut(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const o=[];return this.type!=null?o.push(this.type):this.authorizationList&&this.authorizationList.length?o.push(4):e?o.push(2):t?(o.push(1),r||o.push(0)):r?(o.push(1),o.push(2)):(i&&this.to||(o.push(0),o.push(1),o.push(2)),o.push(3)),o.sort(),o}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return rr.from(this)}toJSON(){const t=e=>e==null?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(t==null)return new rr;if(typeof t=="string"){const r=zt(t);if(r[0]>=127)return rr.from(pb(r));switch(r[0]){case 1:return rr.from(yb(r));case 2:return rr.from(wb(r));case 3:return rr.from(mb(r));case 4:return rr.from(Eb(r))}ut(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const e=new rr;return t.type!=null&&(e.type=t.type),t.to!=null&&(e.to=t.to),t.nonce!=null&&(e.nonce=t.nonce),t.gasLimit!=null&&(e.gasLimit=t.gasLimit),t.gasPrice!=null&&(e.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(e.maxFeePerGas=t.maxFeePerGas),t.maxFeePerBlobGas!=null&&(e.maxFeePerBlobGas=t.maxFeePerBlobGas),t.data!=null&&(e.data=t.data),t.value!=null&&(e.value=t.value),t.chainId!=null&&(e.chainId=t.chainId),t.signature!=null&&(e.signature=se.from(t.signature)),t.accessList!=null&&(e.accessList=t.accessList),t.authorizationList!=null&&(e.authorizationList=t.authorizationList),t.blobVersionedHashes!=null&&(e.blobVersionedHashes=t.blobVersionedHashes),t.kzg!=null&&(e.kzg=t.kzg),t.blobs!=null&&(e.blobs=t.blobs),t.hash!=null&&(G(e.isSigned(),"unsigned transaction cannot define '.hash'","tx",t),G(e.hash===t.hash,"hash mismatch","tx",t)),t.from!=null&&(G(e.isSigned(),"unsigned transaction cannot define '.from'","tx",t),G(e.from.toLowerCase()===(t.from||"").toLowerCase(),"from mismatch","tx",t)),e}}function zi(n){return le(Nn(n))}var xb="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";const Xf=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),tl=4;function Rb(n){let t=0;function e(){return n[t++]<<8|n[t++]}let r=e(),i=1,o=[0,1];for(let O=1;O<r;O++)o.push(i+=e());let a=e(),u=t;t+=a;let _=0,l=0;function f(){return _==0&&(l=l<<8|n[t++],_=8),l>>--_&1}const g=31,y=2**g,v=y>>>1,I=v>>1,k=y-1;let T=0;for(let O=0;O<g;O++)T=T<<1|f();let E=[],R=0,B=y;for(;;){let O=Math.floor(((T-R+1)*i-1)/B),C=0,N=r;for(;N-C>1;){let et=C+N>>>1;O<o[et]?N=et:C=et}if(C==0)break;E.push(C);let D=R+Math.floor(B*o[C]/i),$=R+Math.floor(B*o[C+1]/i)-1;for(;((D^$)&v)==0;)T=T<<1&k|f(),D=D<<1&k,$=$<<1&k|1;for(;D&~$&I;)T=T&v|T<<1&k>>>1|f(),D=D<<1^v,$=($^v)<<1|v|1;R=D,B=1+$-D}let z=r-4;return E.map(O=>{switch(O-z){case 3:return z+65792+(n[u++]<<16|n[u++]<<8|n[u++]);case 2:return z+256+(n[u++]<<8|n[u++]);case 1:return z+n[u++];default:return O-1}})}function Sb(n){let t=0;return()=>n[t++]}function el(n){return Sb(Rb(zb(n)))}function zb(n){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,o)=>t[i.charCodeAt(0)]=o);let e=n.length,r=new Uint8Array(6*e>>3);for(let i=0,o=0,a=0,u=0;i<e;i++)u=u<<6|t[n.charCodeAt(i)],a+=6,a>=8&&(r[o++]=u>>(a-=8));return r}function Bb(n){return n&1?~n>>1:n>>1}function kb(n,t){let e=Array(n);for(let r=0,i=0;r<n;r++)e[r]=i+=Bb(t());return e}function Os(n,t=0){let e=[];for(;;){let r=n(),i=n();if(!i)break;t+=r;for(let o=0;o<i;o++)e.push(t+o);t+=i+1}return e}function rl(n){return Ts(()=>{let t=Os(n);if(t.length)return t})}function nl(n){let t=[];for(;;){let e=n();if(e==0)break;t.push(Pb(e,n))}for(;;){let e=n()-1;if(e<0)break;t.push(Ib(e,n))}return t.flat()}function Ts(n){let t=[];for(;;){let e=n(t.length);if(!e)break;t.push(e)}return t}function il(n,t,e){let r=Array(n).fill().map(()=>[]);for(let i=0;i<t;i++)kb(n,e).forEach((o,a)=>r[a].push(o));return r}function Pb(n,t){let e=1+t(),r=t(),i=Ts(t);return il(i.length,1+n,t).flatMap((a,u)=>{let[_,...l]=a;return Array(i[u]).fill().map((f,g)=>{let y=g*r;return[_+g*e,l.map(v=>v+y)]})})}function Ib(n,t){let e=1+t();return il(e,1+n,t).map(i=>[i[0],i.slice(1)])}function Fb(n){let t=[],e=Os(n);return i(r([]),[]),t;function r(o){let a=n(),u=Ts(()=>{let _=Os(n).map(l=>e[l]);if(_.length)return r(_)});return{S:a,B:u,Q:o}}function i({S:o,B:a},u,_){if(!(o&4&&_===u[u.length-1])){o&2&&(_=u[u.length-1]),o&1&&t.push(u);for(let l of a)for(let f of l.Q)i(l,[...u,f],_)}}}function Ob(n){return n.toString(16).toUpperCase().padStart(2,"0")}function sl(n){return`{${Ob(n)}}`}function Tb(n){let t=[];for(let e=0,r=n.length;e<r;){let i=n.codePointAt(e);e+=i<65536?1:2,t.push(i)}return t}function os(n){let e=n.length;if(e<4096)return String.fromCodePoint(...n);let r=[];for(let i=0;i<e;)r.push(String.fromCodePoint(...n.slice(i,i+=4096)));return r.join("")}function Cb(n,t){let e=n.length,r=e-t.length;for(let i=0;r==0&&i<e;i++)r=n[i]-t[i];return r}var Nb="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";const Cs=44032,So=4352,zo=4449,Bo=4519,ol=19,al=21,as=28,ko=al*as,Lb=ol*ko,Db=Cs+Lb,Ub=So+ol,Mb=zo+al,jb=Bo+as;function Ns(n){return n>>24&255}function cl(n){return n&16777215}let ja,ul,Ga,Po;function Gb(){let n=el(Nb);ja=new Map(rl(n).flatMap((t,e)=>t.map(r=>[r,e+1<<24]))),ul=new Set(Os(n)),Ga=new Map,Po=new Map;for(let[t,e]of nl(n)){if(!ul.has(t)&&e.length==2){let[r,i]=e,o=Po.get(r);o||(o=new Map,Po.set(r,o)),o.set(i,t)}Ga.set(t,e.reverse())}}function _l(n){return n>=Cs&&n<Db}function Hb(n,t){if(n>=So&&n<Ub&&t>=zo&&t<Mb)return Cs+(n-So)*ko+(t-zo)*as;if(_l(n)&&t>Bo&&t<jb&&(n-Cs)%as==0)return n+(t-Bo);{let e=Po.get(n);return e&&(e=e.get(t),e)?e:-1}}function fl(n){ja||Gb();let t=[],e=[],r=!1;function i(o){let a=ja.get(o);a&&(r=!0,o|=a),t.push(o)}for(let o of n)for(;;){if(o<128)t.push(o);else if(_l(o)){let a=o-Cs,u=a/ko|0,_=a%ko/as|0,l=a%as;i(So+u),i(zo+_),l>0&&i(Bo+l)}else{let a=Ga.get(o);a?e.push(...a):i(o)}if(!e.length)break;o=e.pop()}if(r&&t.length>1){let o=Ns(t[0]);for(let a=1;a<t.length;a++){let u=Ns(t[a]);if(u==0||o<=u){o=u;continue}let _=a-1;for(;;){let l=t[_+1];if(t[_+1]=t[_],t[_]=l,!_||(o=Ns(t[--_]),o<=u))break}o=Ns(t[a])}}return t}function Vb(n){let t=[],e=[],r=-1,i=0;for(let o of n){let a=Ns(o),u=cl(o);if(r==-1)a==0?r=u:t.push(u);else if(i>0&&i>=a)a==0?(t.push(r,...e),e.length=0,r=u):e.push(u),i=a;else{let _=Hb(r,u);_>=0?r=_:i==0&&a==0?(t.push(r),r=u):(e.push(u),i=a)}}return r>=0&&t.push(r,...e),t}function ll(n){return fl(n).map(cl)}function qb(n){return Vb(fl(n))}const hl=45,pl=".",dl=65039,wl=1,Io=n=>Array.from(n);function Ls(n,t){return n.P.has(t)||n.Q.has(t)}class Qb extends Array{get is_emoji(){return!0}}let Ha,gl,Bi,Va,yl,cs,qa,us,ki,bl,Qa;function Ka(){if(Ha)return;let n=el(xb);const t=()=>Os(n),e=()=>new Set(t()),r=(f,g)=>g.forEach(y=>f.add(y));Ha=new Map(nl(n)),gl=e(),Bi=t(),Va=new Set(t().map(f=>Bi[f])),Bi=new Set(Bi),yl=e(),e();let i=rl(n),o=n();const a=()=>{let f=new Set;return t().forEach(g=>r(f,i[g])),r(f,t()),f};cs=Ts(f=>{let g=Ts(n).map(y=>y+96);if(g.length){let y=f>=o;g[0]-=32,g=os(g),y&&(g=`Restricted[${g}]`);let v=a(),I=a(),k=!n();return{N:g,P:v,Q:I,M:k,R:y}}}),qa=e(),us=new Map;let u=t().concat(Io(qa)).sort((f,g)=>f-g);u.forEach((f,g)=>{let y=n(),v=u[g]=y?u[g-y]:{V:[],M:new Map};v.V.push(f),qa.has(f)||us.set(f,v)});for(let{V:f,M:g}of new Set(us.values())){let y=[];for(let I of f){let k=cs.filter(E=>Ls(E,I)),T=y.find(({G:E})=>k.some(R=>E.has(R)));T||(T={G:new Set,V:[]},y.push(T)),T.V.push(I),r(T.G,k)}let v=y.flatMap(I=>Io(I.G));for(let{G:I,V:k}of y){let T=new Set(v.filter(E=>!I.has(E)));for(let E of k)g.set(E,T)}}ki=new Set;let _=new Set;const l=f=>ki.has(f)?_.add(f):ki.add(f);for(let f of cs){for(let g of f.P)l(g);for(let g of f.Q)l(g)}for(let f of ki)!us.has(f)&&!_.has(f)&&us.set(f,wl);r(ki,ll(ki)),bl=Fb(n).map(f=>Qb.from(f)).sort(Cb),Qa=new Map;for(let f of bl){let g=[Qa];for(let y of f){let v=g.map(I=>{let k=I.get(y);return k||(k=new Map,I.set(y,k)),k});y===dl?g.push(...v):g=v}for(let y of g)y.V=f}}function Wa(n){return(ml(n)?"":`${Ja(Fo([n]))} `)+sl(n)}function Ja(n){return`"${n}"‎`}function Kb(n){if(n.length>=4&&n[2]==hl&&n[3]==hl)throw new Error(`invalid label extension: "${os(n.slice(0,4))}"`)}function Wb(n){for(let e=n.lastIndexOf(95);e>0;)if(n[--e]!==95)throw new Error("underscore allowed only at start")}function Jb(n){let t=n[0],e=Xf.get(t);if(e)throw Ds(`leading ${e}`);let r=n.length,i=-1;for(let o=1;o<r;o++){t=n[o];let a=Xf.get(t);if(a){if(i==o)throw Ds(`${e} + ${a}`);i=o+1,e=a}}if(i==r)throw Ds(`trailing ${e}`)}function Fo(n,t=1/0,e=sl){let r=[];$b(n[0])&&r.push("◌"),n.length>t&&(t>>=1,n=[...n.slice(0,t),8230,...n.slice(-t)]);let i=0,o=n.length;for(let a=0;a<o;a++){let u=n[a];ml(u)&&(r.push(os(n.slice(i,a))),r.push(e(u)),i=a+1)}return r.push(os(n.slice(i,o))),r.join("")}function $b(n){return Ka(),Bi.has(n)}function ml(n){return Ka(),yl.has(n)}function Yb(n){return e1(Zb(n,qb,i1))}function Zb(n,t,e){if(!n)return[];Ka();let r=0;return n.split(pl).map(i=>{let o=Tb(i),a={input:o,offset:r};r+=o.length+1;try{let u=a.tokens=n1(o,t,e),_=u.length,l;if(!_)throw new Error("empty label");let f=a.output=u.flat();if(Wb(f),!(a.emoji=_>1||u[0].is_emoji)&&f.every(y=>y<128))Kb(f),l="ASCII";else{let y=u.flatMap(v=>v.is_emoji?[]:v);if(!y.length)l="Emoji";else{if(Bi.has(f[0]))throw Ds("leading combining mark");for(let k=1;k<_;k++){let T=u[k];if(!T.is_emoji&&Bi.has(T[0]))throw Ds(`emoji + combining mark: "${os(u[k-1])} + ${Fo([T[0]])}"`)}Jb(f);let v=Io(new Set(y)),[I]=t1(v);r1(I,y),Xb(I,v),l=I.N}}a.type=l}catch(u){a.error=u}return a})}function Xb(n,t){let e,r=[];for(let i of t){let o=us.get(i);if(o===wl)return;if(o){let a=o.M.get(i);if(e=e?e.filter(u=>a.has(u)):Io(a),!e.length)return}else r.push(i)}if(e){for(let i of e)if(r.every(o=>Ls(i,o)))throw new Error(`whole-script confusable: ${n.N}/${i.N}`)}}function t1(n){let t=cs;for(let e of n){let r=t.filter(i=>Ls(i,e));if(!r.length)throw cs.some(i=>Ls(i,e))?El(t[0],e):Al(e);if(t=r,r.length==1)break}return t}function e1(n){return n.map(({input:t,error:e,output:r})=>{if(e){let i=e.message;throw new Error(n.length==1?i:`Invalid label ${Ja(Fo(t,63))}: ${i}`)}return os(r)}).join(pl)}function Al(n){return new Error(`disallowed character: ${Wa(n)}`)}function El(n,t){let e=Wa(t),r=cs.find(i=>i.P.has(t));return r&&(e=`${r.N} ${e}`),new Error(`illegal mixture: ${n.N} + ${e}`)}function Ds(n){return new Error(`illegal placement: ${n}`)}function r1(n,t){for(let e of t)if(!Ls(n,e))throw El(n,e);if(n.M){let e=ll(t);for(let r=1,i=e.length;r<i;r++)if(Va.has(e[r])){let o=r+1;for(let a;o<i&&Va.has(a=e[o]);o++)for(let u=r;u<o;u++)if(e[u]==a)throw new Error(`duplicate non-spacing marks: ${Wa(a)}`);if(o-r>tl)throw new Error(`excessive non-spacing marks: ${Ja(Fo(e.slice(r-1,o)))} (${o-r}/${tl})`);r=o}}}function n1(n,t,e){let r=[],i=[];for(n=n.slice().reverse();n.length;){let o=s1(n);if(o)i.length&&(r.push(t(i)),i=[]),r.push(e(o));else{let a=n.pop();if(ki.has(a))i.push(a);else{let u=Ha.get(a);if(u)i.push(...u);else if(!gl.has(a))throw Al(a)}}}return i.length&&r.push(t(i)),r}function i1(n){return n.filter(t=>t!=dl)}function s1(n,t){let e=Qa,r,i=n.length;for(;i&&(e=e.get(n[--i]),!!e);){let{V:o}=e;o&&(r=o,n.length=i)}return r}const vl=new Uint8Array(32);vl.fill(0);function xl(n){return G(n.length!==0,"invalid ENS name; empty component","comp",n),n}function Rl(n){const t=Nn(o1(n)),e=[];if(n.length===0)return e;let r=0;for(let i=0;i<t.length;i++)t[i]===46&&(e.push(xl(t.slice(r,i))),r=i+1);return G(r<t.length,"invalid ENS name; empty component","name",n),e.push(xl(t.slice(r))),e}function o1(n){try{if(n.length===0)throw new Error("empty label");return Yb(n)}catch(t){G(!1,`invalid ENS name (${t.message})`,"name",n)}}function $a(n){G(typeof n=="string","invalid ENS name; not a string","name",n),G(n.length,"invalid ENS name (empty label)","name",n);let t=vl;const e=Rl(n);for(;e.length;)t=le(te([t,le(e.pop())]));return gt(t)}function a1(n,t){const e=t;return G(e<=255,"DNS encoded label cannot exceed 255","length",e),gt(te(Rl(n).map(r=>{G(r.length<=e,`label ${JSON.stringify(n)} exceeds ${e} bytes`,"name",n);const i=new Uint8Array(r.length+1);return i.set(r,1),i[0]=i.length-1,i})))+"00"}const c1=new RegExp("^bytes([0-9]+)$"),u1=new RegExp("^(u?int)([0-9]*)$"),_1=new RegExp("^(.*)\\[([0-9]*)\\]$");function Sl(n,t,e){switch(n){case"address":return zt(e?Ge(t,32):Dt(t));case"string":return Nn(t);case"bytes":return zt(t);case"bool":return t=t?"0x01":"0x00",zt(e?Ge(t,32):t)}let r=n.match(u1);if(r){let i=r[1]==="int",o=parseInt(r[2]||"256");return G((!r[2]||r[2]===String(o))&&o%8===0&&o!==0&&o<=256,"invalid number type","type",n),e&&(o=256),i&&(t=ha(t,o)),zt(Ge(fe(t),o/8))}if(r=n.match(c1),r){const i=parseInt(r[1]);return G(String(i)===r[1]&&i!==0&&i<=32,"invalid bytes type","type",n),G(mi(t)===i,`invalid value for ${n}`,"value",t),e?zt(P_(t,32)):t}if(r=n.match(_1),r&&Array.isArray(t)){const i=r[1],o=parseInt(r[2]||String(t.length));G(o===t.length,`invalid array length for ${n}`,"value",t);const a=[];return t.forEach(function(u){a.push(Sl(i,u,!0))}),zt(te(a))}G(!1,"invalid type","type",n)}function zl(n,t){G(n.length===t.length,"wrong number of values; expected ${ types.length }","values",t);const e=[];return n.forEach(function(r,i){e.push(Sl(r,t[i]))}),gt(te(e))}const Bl=new Uint8Array(32);Bl.fill(0);const f1=BigInt(-1),kl=BigInt(0),Pl=BigInt(1),l1=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function h1(n){const t=zt(n),e=t.length%32;return e?te([t,Bl.slice(e)]):gt(t)}const p1=ii(Pl,32),d1=ii(kl,32),Il={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ya=["name","version","chainId","verifyingContract","salt"];function Fl(n){return function(t){return G(typeof t=="string",`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,t),t}}const w1={name:Fl("name"),version:Fl("version"),chainId:function(n){const t=Et(n,"domain.chainId");return G(t>=0,"invalid chain ID","domain.chainId",n),Number.isSafeInteger(t)?Number(t):tr(t)},verifyingContract:function(n){try{return Dt(n).toLowerCase()}catch{}G(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){const t=zt(n,"domain.salt");return G(t.length===32,'invalid domain value "salt"',"domain.salt",n),gt(t)}};function Za(n){{const t=n.match(/^(u?)int(\d+)$/);if(t){const e=t[1]==="",r=parseInt(t[2]);G(r%8===0&&r!==0&&r<=256&&t[2]===String(r),"invalid numeric width","type",n);const i=Ss(l1,e?r-1:r),o=e?(i+Pl)*f1:kl;return function(a){const u=Et(a,"value");return G(u>=o&&u<=i,`value out-of-bounds for ${n}`,"value",u),ii(e?ha(u,256):u,32)}}}{const t=n.match(/^bytes(\d+)$/);if(t){const e=parseInt(t[1]);return G(e!==0&&e<=32&&t[1]===String(e),"invalid bytes width","type",n),function(r){const i=zt(r);return G(i.length===e,`invalid length for ${n}`,"value",r),h1(r)}}}switch(n){case"address":return function(t){return Ge(Dt(t),32)};case"bool":return function(t){return t?p1:d1};case"bytes":return function(t){return le(t)};case"string":return function(t){return zi(t)}}return null}function Ol(n,t){return`${n}(${t.map(({name:e,type:r})=>r+" "+e).join(",")})`}function Oo(n){const t=n.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:n}}class ke{primaryType;#t;get types(){return JSON.parse(this.#t)}#e;#r;constructor(t){this.#e=new Map,this.#r=new Map;const e=new Map,r=new Map,i=new Map,o={};Object.keys(t).forEach(_=>{o[_]=t[_].map(({name:l,type:f})=>{let{base:g,index:y}=Oo(f);return g==="int"&&!t.int&&(g="int256"),g==="uint"&&!t.uint&&(g="uint256"),{name:l,type:g+(y||"")}}),e.set(_,new Set),r.set(_,[]),i.set(_,new Set)}),this.#t=JSON.stringify(o);for(const _ in o){const l=new Set;for(const f of o[_]){G(!l.has(f.name),`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(_)}`,"types",t),l.add(f.name);const g=Oo(f.type).base;G(g!==_,`circular type reference to ${JSON.stringify(g)}`,"types",t),!Za(g)&&(G(r.has(g),`unknown type ${JSON.stringify(g)}`,"types",t),r.get(g).push(_),e.get(_).add(g))}}const a=Array.from(r.keys()).filter(_=>r.get(_).length===0);G(a.length!==0,"missing primary type","types",t),G(a.length===1,`ambiguous primary types or unused types: ${a.map(_=>JSON.stringify(_)).join(", ")}`,"types",t),St(this,{primaryType:a[0]});function u(_,l){G(!l.has(_),`circular type reference to ${JSON.stringify(_)}`,"types",t),l.add(_);for(const f of e.get(_))if(r.has(f)){u(f,l);for(const g of l)i.get(g).add(f)}l.delete(_)}u(this.primaryType,new Set);for(const[_,l]of i){const f=Array.from(l);f.sort(),this.#e.set(_,Ol(_,o[_])+f.map(g=>Ol(g,o[g])).join(""))}}getEncoder(t){let e=this.#r.get(t);return e||(e=this.#n(t),this.#r.set(t,e)),e}#n(t){{const i=Za(t);if(i)return i}const e=Oo(t).array;if(e){const i=e.prefix,o=this.getEncoder(i);return a=>{G(e.count===-1||e.count===a.length,`array length mismatch; expected length ${e.count}`,"value",a);let u=a.map(o);return this.#e.has(i)&&(u=u.map(le)),le(te(u))}}const r=this.types[t];if(r){const i=zi(this.#e.get(t));return o=>{const a=r.map(({name:u,type:_})=>{const l=this.getEncoder(_)(o[u]);return this.#e.has(_)?le(l):l});return a.unshift(i),te(a)}}G(!1,`unknown type: ${t}`,"type",t)}encodeType(t){const e=this.#e.get(t);return G(e,`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return le(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(Za(t))return r(t,e);const i=Oo(t).array;if(i)return G(i.count===-1||i.count===e.length,`array length mismatch; expected length ${i.count}`,"value",e),e.map(a=>this._visit(i.prefix,a,r));const o=this.types[t];if(o)return o.reduce((a,{name:u,type:_})=>(a[u]=this._visit(_,e[u],r),a),{});G(!1,`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new ke(t)}static getPrimaryType(t){return ke.from(t).primaryType}static hashStruct(t,e,r){return ke.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){if(t[r]==null)continue;const i=Il[r];G(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:i})}return e.sort((r,i)=>Ya.indexOf(r.name)-Ya.indexOf(i.name)),ke.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return te(["0x1901",ke.hashDomain(t),ke.from(e).hash(r)])}static hash(t,e,r){return le(ke.encode(t,e,r))}static async resolveNames(t,e,r,i){t=Object.assign({},t);for(const u in t)t[u]==null&&delete t[u];const o={};t.verifyingContract&&!$t(t.verifyingContract,20)&&(o[t.verifyingContract]="0x");const a=ke.from(e);a.visit(r,(u,_)=>(u==="address"&&!$t(_,20)&&(o[_]="0x"),_));for(const u in o)o[u]=await i(u);return t.verifyingContract&&o[t.verifyingContract]&&(t.verifyingContract=o[t.verifyingContract]),r=a.visit(r,(u,_)=>u==="address"&&o[_]?o[_]:_),{domain:t,value:r}}static getPayload(t,e,r){ke.hashDomain(t);const i={},o=[];Ya.forEach(_=>{const l=t[_];l!=null&&(i[_]=w1[_](l),o.push({name:_,type:Il[_]}))});const a=ke.from(e);e=a.types;const u=Object.assign({},e);return G(u.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",e),u.EIP712Domain=o,a.encode(r),{types:u,domain:i,primaryType:a.primaryType,message:a.visit(r,(_,l)=>{if(_.match(/^bytes(\d*)/))return gt(zt(l));if(_.match(/^u?int/))return Et(l).toString();switch(_){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return G(typeof l=="string","invalid string","value",l),l}G(!1,"unsupported type","type",_)})}}}function Tl(n,t,e,r){return Yf(ke.hash(n,t,e),r)}function Se(n){const t=new Set;return n.forEach(e=>t.add(e)),Object.freeze(t)}const g1=Se("external public payable override".split(" ")),Cl="constant external internal payable private public pure view override",y1=Se(Cl.split(" ")),Nl="constructor error event fallback function receive struct",Ll=Se(Nl.split(" ")),Dl="calldata memory storage payable indexed",b1=Se(Dl.split(" ")),m1=[Nl,Dl,"tuple returns",Cl].join(" "),A1=Se(m1.split(" ")),E1={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},v1=new RegExp("^(\\s*)"),x1=new RegExp("^([0-9]+)"),R1=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Ul=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Ml=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class Qe{#t;#e;get offset(){return this.#t}get length(){return this.#e.length-this.#t}constructor(t){this.#t=0,this.#e=t.slice()}clone(){return new Qe(this.#e)}reset(){this.#t=0}#r(t=0,e=0){return new Qe(this.#e.slice(t,e).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))}popKeyword(t){const e=this.peek();if(e.type!=="KEYWORD"||!t.has(e.text))throw new Error(`expected keyword ${e.text}`);return this.pop().text}popType(t){if(this.peek().type!==t){const e=this.peek();throw new Error(`expected ${t}; got ${e.type} ${JSON.stringify(e.text)}`)}return this.pop().text}popParen(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=this.#r(this.#t+1,t.match+1);return this.#t=t.match+1,e}popParams(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=[];for(;this.#t<t.match-1;){const r=this.peek().linkNext;e.push(this.#r(this.#t+1,r)),this.#t=r}return this.#t=t.match+1,e}peek(){if(this.#t>=this.#e.length)throw new Error("out-of-bounds");return this.#e[this.#t]}peekKeyword(t){const e=this.peekType("KEYWORD");return e!=null&&t.has(e)?e:null}peekType(t){if(this.length===0)return null;const e=this.peek();return e.type===t?e.text:null}pop(){const t=this.peek();return this.#t++,t}toString(){const t=[];for(let e=this.#t;e<this.#e.length;e++){const r=this.#e[e];t.push(`${r.type}:${r.text}`)}return`<TokenString ${t.join(" ")}>`}}function li(n){const t=[],e=a=>{const u=o<n.length?JSON.stringify(n[o]):"$EOI";throw new Error(`invalid token ${u} at ${o}: ${a}`)};let r=[],i=[],o=0;for(;o<n.length;){let a=n.substring(o),u=a.match(v1);u&&(o+=u[1].length,a=n.substring(o));const _={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:o,value:-1};t.push(_);let l=E1[a[0]]||"";if(l){if(_.type=l,_.text=a[0],o++,l==="OPEN_PAREN")r.push(t.length-1),i.push(t.length-1);else if(l=="CLOSE_PAREN")r.length===0&&e("no matching open bracket"),_.match=r.pop(),t[_.match].match=t.length-1,_.depth--,_.linkBack=i.pop(),t[_.linkBack].linkNext=t.length-1;else if(l==="COMMA")_.linkBack=i.pop(),t[_.linkBack].linkNext=t.length-1,i.push(t.length-1);else if(l==="OPEN_BRACKET")_.type="BRACKET";else if(l==="CLOSE_BRACKET"){let f=t.pop().text;if(t.length>0&&t[t.length-1].type==="NUMBER"){const g=t.pop().text;f=g+f,t[t.length-1].value=Tt(g)}if(t.length===0||t[t.length-1].type!=="BRACKET")throw new Error("missing opening bracket");t[t.length-1].text+=f}continue}if(u=a.match(R1),u){if(_.text=u[1],o+=_.text.length,A1.has(_.text)){_.type="KEYWORD";continue}if(_.text.match(Ml)){_.type="TYPE";continue}_.type="ID";continue}if(u=a.match(x1),u){_.text=u[1],_.type="NUMBER",o+=_.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${o}`)}return new Qe(t.map(a=>Object.freeze(a)))}function jl(n,t){let e=[];for(const r in t.keys())n.has(r)&&e.push(r);if(e.length>1)throw new Error(`conflicting types: ${e.join(", ")}`)}function To(n,t){if(t.peekKeyword(Ll)){const e=t.pop().text;if(e!==n)throw new Error(`expected ${n}, got ${e}`)}return t.popType("ID")}function Zn(n,t){const e=new Set;for(;;){const r=n.peekType("KEYWORD");if(r==null||t&&!t.has(r))break;if(n.pop(),e.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);e.add(r)}return Object.freeze(e)}function Gl(n){let t=Zn(n,y1);return jl(t,Se("constant payable nonpayable".split(" "))),jl(t,Se("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function Xn(n,t){return n.popParams().map(e=>Yt.from(e,t))}function Hl(n){if(n.peekType("AT")){if(n.pop(),n.peekType("NUMBER"))return Et(n.pop().text);throw new Error("invalid gas")}return null}function Pi(n){if(n.length)throw new Error(`unexpected tokens at offset ${n.offset}: ${n.toString()}`)}const S1=new RegExp(/^(.*)\[([0-9]*)\]$/);function Vl(n){const t=n.match(Ml);if(G(t,"invalid type","type",n),n==="uint")return"uint256";if(n==="int")return"int256";if(t[2]){const e=parseInt(t[2]);G(e!==0&&e<=32,"invalid bytes length","type",n)}else if(t[3]){const e=parseInt(t[3]);G(e!==0&&e<=256&&e%8===0,"invalid numeric width","type",n)}return n}const ne={},Pe=Symbol.for("_ethers_internal"),ql="_ParamTypeInternal",Ql="_ErrorInternal",Kl="_EventInternal",Wl="_ConstructorInternal",Jl="_FallbackInternal",$l="_FunctionInternal",Yl="_StructInternal";class Yt{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(t,e,r,i,o,a,u,_){if(co(t,ne,"ParamType"),Object.defineProperty(this,Pe,{value:ql}),a&&(a=Object.freeze(a.slice())),i==="array"){if(u==null||_==null)throw new Error("")}else if(u!=null||_!=null)throw new Error("");if(i==="tuple"){if(a==null)throw new Error("")}else if(a!=null)throw new Error("");St(this,{name:e,type:r,baseType:i,indexed:o,components:a,arrayLength:u,arrayChildren:_})}format(t){if(t==null&&(t="sighash"),t==="json"){const r=this.name||"";if(this.isArray()){const o=JSON.parse(this.arrayChildren.format("json"));return o.name=r,o.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(o)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(o=>JSON.parse(o.format(t)))),JSON.stringify(i)}let e="";return this.isArray()?(e+=this.arrayChildren.format(t),e+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?e+="("+this.components.map(r=>r.format(t)).join(t==="full"?", ":",")+")":e+=this.type,t!=="sighash"&&(this.indexed===!0&&(e+=" indexed"),t==="full"&&this.name&&(e+=" "+this.name)),e}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(t,e){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return t.map(i=>r.arrayChildren.walk(i,e))}if(this.isTuple()){if(!Array.isArray(t))throw new Error("invalid tuple value");if(t.length!==this.components.length)throw new Error("array is wrong length");const r=this;return t.map((i,o)=>r.components[o].walk(i,e))}return e(this.type,t)}#t(t,e,r,i){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const a=this.arrayChildren,u=e.slice();u.forEach((_,l)=>{a.#t(t,_,r,f=>{u[l]=f})}),i(u);return}if(this.isTuple()){const a=this.components;let u;if(Array.isArray(e))u=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");u=a.map(_=>{if(!_.name)throw new Error("cannot use object value with unnamed components");if(!(_.name in e))throw new Error(`missing value for component ${_.name}`);return e[_.name]})}if(u.length!==this.components.length)throw new Error("array is wrong length");u.forEach((_,l)=>{a[l].#t(t,_,r,f=>{u[l]=f})}),i(u);return}const o=r(this.type,e);o.then?t.push(async function(){i(await o)}()):i(o)}async walkAsync(t,e){const r=[],i=[t];return this.#t(r,t,e,o=>{i[0]=o}),r.length&&await Promise.all(r),i[0]}static from(t,e){if(Yt.isParamType(t))return t;if(typeof t=="string")try{return Yt.from(li(t),e)}catch{G(!1,"invalid param type","obj",t)}else if(t instanceof Qe){let u="",_="",l=null;Zn(t,Se(["tuple"])).has("tuple")||t.peekType("OPEN_PAREN")?(_="tuple",l=t.popParams().map(k=>Yt.from(k)),u=`tuple(${l.map(k=>k.format()).join(",")})`):(u=Vl(t.popType("TYPE")),_=u);let f=null,g=null;for(;t.length&&t.peekType("BRACKET");){const k=t.pop();f=new Yt(ne,"",u,_,null,l,g,f),g=k.value,u+=k.text,_="array",l=null}let y=null;if(Zn(t,b1).has("indexed")){if(!e)throw new Error("");y=!0}const I=t.peekType("ID")?t.pop().text:"";if(t.length)throw new Error("leftover tokens");return new Yt(ne,I,u,_,y,l,g,f)}const r=t.name;G(!r||typeof r=="string"&&r.match(Ul),"invalid name","obj.name",r);let i=t.indexed;i!=null&&(G(e,"parameter cannot be indexed","obj.indexed",t.indexed),i=!!i);let o=t.type,a=o.match(S1);if(a){const u=parseInt(a[2]||"-1"),_=Yt.from({type:a[1],components:t.components});return new Yt(ne,r||"",o,"array",i,null,u,_)}if(o==="tuple"||o.startsWith("tuple(")||o.startsWith("(")){const u=t.components!=null?t.components.map(l=>Yt.from(l)):null;return new Yt(ne,r||"",o,"tuple",i,u,null,null)}return o=Vl(t.type),new Yt(ne,r||"",o,o,i,null,null,null)}static isParamType(t){return t&&t[Pe]===ql}}class Ii{type;inputs;constructor(t,e,r){co(t,ne,"Fragment"),r=Object.freeze(r.slice()),St(this,{type:e,inputs:r})}static from(t){if(typeof t=="string"){try{Ii.from(JSON.parse(t))}catch{}return Ii.from(li(t))}if(t instanceof Qe)switch(t.peekKeyword(Ll)){case"constructor":return ti.from(t);case"error":return Ie.from(t);case"event":return Un.from(t);case"fallback":case"receive":return ei.from(t);case"function":return Mn.from(t);case"struct":return Fi.from(t)}else if(typeof t=="object"){switch(t.type){case"constructor":return ti.from(t);case"error":return Ie.from(t);case"event":return Un.from(t);case"fallback":case"receive":return ei.from(t);case"function":return Mn.from(t);case"struct":return Fi.from(t)}ut(!1,`unsupported type: ${t.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}G(!1,"unsupported frgament object","obj",t)}static isConstructor(t){return ti.isFragment(t)}static isError(t){return Ie.isFragment(t)}static isEvent(t){return Un.isFragment(t)}static isFunction(t){return Mn.isFragment(t)}static isStruct(t){return Fi.isFragment(t)}}class Co extends Ii{name;constructor(t,e,r,i){super(t,e,i),G(typeof r=="string"&&r.match(Ul),"invalid identifier","name",r),i=Object.freeze(i.slice()),St(this,{name:r})}}function Us(n,t){return"("+t.map(e=>e.format(n)).join(n==="full"?", ":",")+")"}class Ie extends Co{constructor(t,e,r){super(t,"error",e,r),Object.defineProperty(this,Pe,{value:Ql})}get selector(){return zi(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("error"),e.push(this.name+Us(t,this.inputs)),e.join(" ")}static from(t){if(Ie.isFragment(t))return t;if(typeof t=="string")return Ie.from(li(t));if(t instanceof Qe){const e=To("error",t),r=Xn(t);return Pi(t),new Ie(ne,e,r)}return new Ie(ne,t.name,t.inputs?t.inputs.map(Yt.from):[])}static isFragment(t){return t&&t[Pe]===Ql}}class Un extends Co{anonymous;constructor(t,e,r,i){super(t,"event",e,r),Object.defineProperty(this,Pe,{value:Kl}),St(this,{anonymous:i})}get topicHash(){return zi(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("event"),e.push(this.name+Us(t,this.inputs)),t!=="sighash"&&this.anonymous&&e.push("anonymous"),e.join(" ")}static getTopicHash(t,e){return e=(e||[]).map(i=>Yt.from(i)),new Un(ne,t,e,!1).topicHash}static from(t){if(Un.isFragment(t))return t;if(typeof t=="string")try{return Un.from(li(t))}catch{G(!1,"invalid event fragment","obj",t)}else if(t instanceof Qe){const e=To("event",t),r=Xn(t,!0),i=!!Zn(t,Se(["anonymous"])).has("anonymous");return Pi(t),new Un(ne,e,r,i)}return new Un(ne,t.name,t.inputs?t.inputs.map(e=>Yt.from(e,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[Pe]===Kl}}class ti extends Ii{payable;gas;constructor(t,e,r,i,o){super(t,e,r),Object.defineProperty(this,Pe,{value:Wl}),St(this,{payable:i,gas:o})}format(t){if(ut(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[`constructor${Us(t,this.inputs)}`];return this.payable&&e.push("payable"),this.gas!=null&&e.push(`@${this.gas.toString()}`),e.join(" ")}static from(t){if(ti.isFragment(t))return t;if(typeof t=="string")try{return ti.from(li(t))}catch{G(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof Qe){Zn(t,Se(["constructor"]));const e=Xn(t),r=!!Zn(t,g1).has("payable"),i=Hl(t);return Pi(t),new ti(ne,"constructor",e,r,i)}return new ti(ne,"constructor",t.inputs?t.inputs.map(Yt.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Pe]===Wl}}class ei extends Ii{payable;constructor(t,e,r){super(t,"fallback",e),Object.defineProperty(this,Pe,{value:Jl}),St(this,{payable:r})}format(t){const e=this.inputs.length===0?"receive":"fallback";if(t==="json"){const r=this.payable?"payable":"nonpayable";return JSON.stringify({type:e,stateMutability:r})}return`${e}()${this.payable?" payable":""}`}static from(t){if(ei.isFragment(t))return t;if(typeof t=="string")try{return ei.from(li(t))}catch{G(!1,"invalid fallback fragment","obj",t)}else if(t instanceof Qe){const e=t.toString(),r=t.peekKeyword(Se(["fallback","receive"]));if(G(r,"type must be fallback or receive","obj",e),t.popKeyword(Se(["fallback","receive"]))==="receive"){const u=Xn(t);return G(u.length===0,"receive cannot have arguments","obj.inputs",u),Zn(t,Se(["payable"])),Pi(t),new ei(ne,[],!0)}let o=Xn(t);o.length?G(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(u=>u.format("minimal")).join(", ")):o=[Yt.from("bytes")];const a=Gl(t);if(G(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),Zn(t,Se(["returns"])).has("returns")){const u=Xn(t);G(u.length===1&&u[0].type==="bytes","invalid fallback outputs","obj.outputs",u.map(_=>_.format("minimal")).join(", "))}return Pi(t),new ei(ne,o,a==="payable")}if(t.type==="receive")return new ei(ne,[],!0);if(t.type==="fallback"){const e=[Yt.from("bytes")],r=t.stateMutability==="payable";return new ei(ne,e,r)}G(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[Pe]===Jl}}class Mn extends Co{constant;outputs;stateMutability;payable;gas;constructor(t,e,r,i,o,a){super(t,"function",e,i),Object.defineProperty(this,Pe,{value:$l}),o=Object.freeze(o.slice()),St(this,{constant:r==="view"||r==="pure",gas:a,outputs:o,payable:r==="payable",stateMutability:r})}get selector(){return zi(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t))),outputs:this.outputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("function"),e.push(this.name+Us(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&e.push(this.stateMutability),this.outputs&&this.outputs.length&&(e.push("returns"),e.push(Us(t,this.outputs))),this.gas!=null&&e.push(`@${this.gas.toString()}`)),e.join(" ")}static getSelector(t,e){return e=(e||[]).map(i=>Yt.from(i)),new Mn(ne,t,"view",e,[],null).selector}static from(t){if(Mn.isFragment(t))return t;if(typeof t=="string")try{return Mn.from(li(t))}catch{G(!1,"invalid function fragment","obj",t)}else if(t instanceof Qe){const r=To("function",t),i=Xn(t),o=Gl(t);let a=[];Zn(t,Se(["returns"])).has("returns")&&(a=Xn(t));const u=Hl(t);return Pi(t),new Mn(ne,r,o,i,a,u)}let e=t.stateMutability;return e==null&&(e="payable",typeof t.constant=="boolean"?(e="view",t.constant||(e="payable",typeof t.payable=="boolean"&&!t.payable&&(e="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(e="nonpayable")),new Mn(ne,t.name,e,t.inputs?t.inputs.map(Yt.from):[],t.outputs?t.outputs.map(Yt.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Pe]===$l}}class Fi extends Co{constructor(t,e,r){super(t,"struct",e,r),Object.defineProperty(this,Pe,{value:Yl})}format(){throw new Error("@TODO")}static from(t){if(typeof t=="string")try{return Fi.from(li(t))}catch{G(!1,"invalid struct fragment","obj",t)}else if(t instanceof Qe){const e=To("struct",t),r=Xn(t);return Pi(t),new Fi(ne,e,r)}return new Fi(ne,t.name,t.inputs?t.inputs.map(Yt.from):[])}static isFragment(t){return t&&t[Pe]===Yl}}const nr=new Map;nr.set(0,"GENERIC_PANIC"),nr.set(1,"ASSERT_FALSE"),nr.set(17,"OVERFLOW"),nr.set(18,"DIVIDE_BY_ZERO"),nr.set(33,"ENUM_RANGE_ERROR"),nr.set(34,"BAD_STORAGE_DATA"),nr.set(49,"STACK_UNDERFLOW"),nr.set(50,"ARRAY_RANGE_ERROR"),nr.set(65,"OUT_OF_MEMORY"),nr.set(81,"UNINITIALIZED_FUNCTION_CALL");const z1=new RegExp(/^bytes([0-9]*)$/),B1=new RegExp(/^(u?int)([0-9]*)$/);let Xa=null,Zl=1024;function k1(n,t,e,r){let i="missing revert data",o=null;const a=null;let u=null;if(e){i="execution reverted";const l=zt(e);if(e=gt(e),l.length===0)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(gt(l.slice(0,4))==="0x08c379a0")try{o=r.decode(["string"],l.slice(4))[0],u={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(gt(l.slice(0,4))==="0x4e487b71")try{const f=Number(r.decode(["uint256"],l.slice(4))[0]);u={signature:"Panic(uint256)",name:"Panic",args:[f]},o=`Panic due to ${nr.get(f)||"UNKNOWN"}(${f})`,i+=`: ${o}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const _={to:t.to?Dt(t.to):null,data:t.data||"0x"};return t.from&&(_.from=Dt(t.from)),re(i,"CALL_EXCEPTION",{action:n,data:e,reason:o,transaction:_,invocation:a,revert:u})}class hi{#t(t){if(t.isArray())return new K0(this.#t(t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new Eo(t.components.map(r=>this.#t(r)),t.name);switch(t.baseType){case"address":return new q0(t.name);case"bool":return new W0(t.name);case"string":return new nb(t.name);case"bytes":return new J0(t.name);case"":return new Z0(t.name)}let e=t.type.match(B1);if(e){let r=parseInt(e[2]||"256");return G(r!==0&&r<=256&&r%8===0,"invalid "+e[1]+" bit length","param",t),new rb(r/8,e[1]==="int",t.name)}if(e=t.type.match(z1),e){let r=parseInt(e[1]);return G(r!==0&&r<=32,"invalid bytes length","param",t),new $0(r,t.name)}G(!1,"invalid type","type",t.type)}getDefaultValue(t){const e=t.map(i=>this.#t(Yt.from(i)));return new Eo(e,"_").defaultValue()}encode(t,e){S_(e.length,t.length,"types/values length mismatch");const r=t.map(a=>this.#t(Yt.from(a))),i=new Eo(r,"_"),o=new ya;return i.encode(o,e),o.data}decode(t,e,r){const i=t.map(a=>this.#t(Yt.from(a)));return new Eo(i,"_").decode(new ba(e,r,Zl))}static _setDefaultMaxInflation(t){G(typeof t=="number"&&Number.isInteger(t),"invalid defaultMaxInflation factor","value",t),Zl=t}static defaultAbiCoder(){return Xa==null&&(Xa=new hi),Xa}static getBuiltinCallException(t,e,r){return k1(t,e,r,hi.defaultAbiCoder())}}class P1{fragment;name;signature;topic;args;constructor(t,e,r){const i=t.name,o=t.format();St(this,{fragment:t,name:i,signature:o,topic:e,args:r})}}class I1{fragment;name;args;signature;selector;value;constructor(t,e,r,i){const o=t.name,a=t.format();St(this,{fragment:t,name:o,args:r,signature:a,selector:e,value:i})}}class F1{fragment;name;args;signature;selector;constructor(t,e,r){const i=t.name,o=t.format();St(this,{fragment:t,name:i,args:r,signature:o,selector:e})}}class Xl{hash;_isIndexed;static isIndexed(t){return!!(t&&t._isIndexed)}constructor(t){St(this,{hash:t,_isIndexed:!0})}}const th={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},eh={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:n=>`reverted with reason string ${JSON.stringify(n)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:n=>{let t="unknown panic code";return n>=0&&n<=255&&th[n.toString()]&&(t=th[n.toString()]),`reverted with panic code 0x${n.toString(16)} (${t})`}}};class Oi{fragments;deploy;fallback;receive;#t;#e;#r;#n;constructor(t){let e=[];typeof t=="string"?e=JSON.parse(t):e=t,this.#r=new Map,this.#t=new Map,this.#e=new Map;const r=[];for(const a of e)try{r.push(Ii.from(a))}catch(u){console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`,u.message)}St(this,{fragments:Object.freeze(r)});let i=null,o=!1;this.#n=this.getAbiCoder(),this.fragments.forEach((a,u)=>{let _;switch(a.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}St(this,{deploy:a});return;case"fallback":a.inputs.length===0?o=!0:(G(!i||a.payable!==i.payable,"conflicting fallback fragments",`fragments[${u}]`,a),i=a,o=i.payable);return;case"function":_=this.#r;break;case"event":_=this.#e;break;case"error":_=this.#t;break;default:return}const l=a.format();_.has(l)||_.set(l,a)}),this.deploy||St(this,{deploy:ti.from("constructor()")}),St(this,{fallback:i,receive:o})}format(t){const e=t?"minimal":"full";return this.fragments.map(i=>i.format(e))}formatJson(){const t=this.fragments.map(e=>e.format("json"));return JSON.stringify(t.map(e=>JSON.parse(e)))}getAbiCoder(){return hi.defaultAbiCoder()}#i(t,e,r){if($t(t)){const o=t.toLowerCase();for(const a of this.#r.values())if(o===a.selector)return a;return null}if(t.indexOf("(")===-1){const o=[];for(const[a,u]of this.#r)a.split("(")[0]===t&&o.push(u);if(e){const a=e.length>0?e[e.length-1]:null;let u=e.length,_=!0;oe.isTyped(a)&&a.type==="overrides"&&(_=!1,u--);for(let l=o.length-1;l>=0;l--){const f=o[l].inputs.length;f!==u&&(!_||f!==u-1)&&o.splice(l,1)}for(let l=o.length-1;l>=0;l--){const f=o[l].inputs;for(let g=0;g<e.length;g++)if(oe.isTyped(e[g])){if(g>=f.length){if(e[g].type==="overrides")continue;o.splice(l,1);break}if(e[g].type!==f[g].baseType){o.splice(l,1);break}}}}if(o.length===1&&e&&e.length!==o[0].inputs.length){const a=e[e.length-1];(a==null||Array.isArray(a)||typeof a!="object")&&o.splice(0,1)}if(o.length===0)return null;if(o.length>1&&r){const a=o.map(u=>JSON.stringify(u.format())).join(", ");G(!1,`ambiguous function description (i.e. matches ${a})`,"key",t)}return o[0]}const i=this.#r.get(Mn.from(t).format());return i||null}getFunctionName(t){const e=this.#i(t,null,!1);return G(e,"no matching function","key",t),e.name}hasFunction(t){return!!this.#i(t,null,!1)}getFunction(t,e){return this.#i(t,e||null,!0)}forEachFunction(t){const e=Array.from(this.#r.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#r.get(i),r)}}#o(t,e,r){if($t(t)){const o=t.toLowerCase();for(const a of this.#e.values())if(o===a.topicHash)return a;return null}if(t.indexOf("(")===-1){const o=[];for(const[a,u]of this.#e)a.split("(")[0]===t&&o.push(u);if(e){for(let a=o.length-1;a>=0;a--)o[a].inputs.length<e.length&&o.splice(a,1);for(let a=o.length-1;a>=0;a--){const u=o[a].inputs;for(let _=0;_<e.length;_++)if(oe.isTyped(e[_])&&e[_].type!==u[_].baseType){o.splice(a,1);break}}}if(o.length===0)return null;if(o.length>1&&r){const a=o.map(u=>JSON.stringify(u.format())).join(", ");G(!1,`ambiguous event description (i.e. matches ${a})`,"key",t)}return o[0]}const i=this.#e.get(Un.from(t).format());return i||null}getEventName(t){const e=this.#o(t,null,!1);return G(e,"no matching event","key",t),e.name}hasEvent(t){return!!this.#o(t,null,!1)}getEvent(t,e){return this.#o(t,e||null,!0)}forEachEvent(t){const e=Array.from(this.#e.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#e.get(i),r)}}getError(t,e){if($t(t)){const i=t.toLowerCase();if(eh[i])return Ie.from(eh[i].signature);for(const o of this.#t.values())if(i===o.selector)return o;return null}if(t.indexOf("(")===-1){const i=[];for(const[o,a]of this.#t)o.split("(")[0]===t&&i.push(a);if(i.length===0)return t==="Error"?Ie.from("error Error(string)"):t==="Panic"?Ie.from("error Panic(uint256)"):null;if(i.length>1){const o=i.map(a=>JSON.stringify(a.format())).join(", ");G(!1,`ambiguous error description (i.e. ${o})`,"name",t)}return i[0]}if(t=Ie.from(t).format(),t==="Error(string)")return Ie.from("error Error(string)");if(t==="Panic(uint256)")return Ie.from("error Panic(uint256)");const r=this.#t.get(t);return r||null}forEachError(t){const e=Array.from(this.#t.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#t.get(i),r)}}_decodeParams(t,e){return this.#n.decode(t,e)}_encodeParams(t,e){return this.#n.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);G(r,"unknown error","fragment",t),t=r}return G(ie(e,0,4)===t.selector,`data signature does not match error ${t.name}.`,"data",e),this._decodeParams(t.inputs,ie(e,4))}encodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);G(r,"unknown error","fragment",t),t=r}return te([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);G(r,"unknown function","fragment",t),t=r}return G(ie(e,0,4)===t.selector,`data signature does not match function ${t.name}.`,"data",e),this._decodeParams(t.inputs,ie(e,4))}encodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);G(r,"unknown function","fragment",t),t=r}return te([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionResult(t,e){if(typeof t=="string"){const o=this.getFunction(t);G(o,"unknown function","fragment",t),t=o}let r="invalid length for result data";const i=ve(e);if(i.length%32===0)try{return this.#n.decode(t.outputs,i)}catch{r="could not decode result data"}ut(!1,r,"BAD_DATA",{value:gt(i),info:{method:t.name,signature:t.format()}})}makeError(t,e){const r=zt(t,"data"),i=hi.getBuiltinCallException("call",e,r);if(i.message.startsWith("execution reverted (unknown custom error)")){const u=gt(r.slice(0,4)),_=this.getError(u);if(_)try{const l=this.#n.decode(_.inputs,r.slice(4));i.revert={name:_.name,signature:_.format(),args:l},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const a=this.parseTransaction(e);return a&&(i.invocation={method:a.name,signature:a.signature,args:a.args}),i}encodeFunctionResult(t,e){if(typeof t=="string"){const r=this.getFunction(t);G(r,"unknown function","fragment",t),t=r}return gt(this.#n.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){if(typeof t=="string"){const o=this.getEvent(t);G(o,"unknown event","eventFragment",t),t=o}ut(e.length<=t.inputs.length,`too many arguments for ${t.format()}`,"UNEXPECTED_ARGUMENT",{count:e.length,expectedCount:t.inputs.length});const r=[];t.anonymous||r.push(t.topicHash);const i=(o,a)=>o.type==="string"?zi(a):o.type==="bytes"?le(gt(a)):(o.type==="bool"&&typeof a=="boolean"?a=a?"0x01":"0x00":o.type.match(/^u?int/)?a=ii(a):o.type.match(/^bytes/)?a=P_(a,32):o.type==="address"&&this.#n.encode(["address"],[a]),Ge(gt(a),32));for(e.forEach((o,a)=>{const u=t.inputs[a];if(!u.indexed){G(o==null,"cannot filter non-indexed parameters; must be null","contract."+u.name,o);return}o==null?r.push(null):u.baseType==="array"||u.baseType==="tuple"?G(!1,"filtering with tuples or arrays not supported","contract."+u.name,o):Array.isArray(o)?r.push(o.map(_=>i(u,_))):r.push(i(u,o))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(t,e){if(typeof t=="string"){const a=this.getEvent(t);G(a,"unknown event","eventFragment",t),t=a}const r=[],i=[],o=[];return t.anonymous||r.push(t.topicHash),G(e.length===t.inputs.length,"event arguments/values mismatch","values",e),t.inputs.forEach((a,u)=>{const _=e[u];if(a.indexed)if(a.type==="string")r.push(zi(_));else if(a.type==="bytes")r.push(le(_));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");r.push(this.#n.encode([a.type],[_]))}else i.push(a),o.push(_)}),{data:this.#n.encode(i,o),topics:r}}decodeEventLog(t,e,r){if(typeof t=="string"){const v=this.getEvent(t);G(v,"unknown event","eventFragment",t),t=v}if(r!=null&&!t.anonymous){const v=t.topicHash;G($t(r[0],32)&&r[0].toLowerCase()===v,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],o=[],a=[];t.inputs.forEach((v,I)=>{v.indexed?v.type==="string"||v.type==="bytes"||v.baseType==="tuple"||v.baseType==="array"?(i.push(Yt.from({type:"bytes32",name:v.name})),a.push(!0)):(i.push(v),a.push(!1)):(o.push(v),a.push(!1))});const u=r!=null?this.#n.decode(i,te(r)):null,_=this.#n.decode(o,e,!0),l=[],f=[];let g=0,y=0;return t.inputs.forEach((v,I)=>{let k=null;if(v.indexed)if(u==null)k=new Xl(null);else if(a[I])k=new Xl(u[y++]);else try{k=u[y++]}catch(T){k=T}else try{k=_[g++]}catch(T){k=T}l.push(k),f.push(v.name||null)}),Kn.fromItems(l,f)}parseTransaction(t){const e=zt(t.data,"tx.data"),r=Et(t.value!=null?t.value:0,"tx.value"),i=this.getFunction(gt(e.slice(0,4)));if(!i)return null;const o=this.#n.decode(i.inputs,e.slice(4));return new I1(i,i.selector,o,r)}parseCallResult(t){throw new Error("@TODO")}parseLog(t){const e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new P1(e,e.topicHash,this.decodeEventLog(e,t.data,t.topics))}parseError(t){const e=gt(t),r=this.getError(ie(e,0,4));if(!r)return null;const i=this.#n.decode(r.inputs,ie(e,4));return new F1(r,r.selector,i)}static from(t){return t instanceof Oi?t:typeof t=="string"?new Oi(JSON.parse(t)):typeof t.formatJson=="function"?new Oi(t.formatJson()):typeof t.format=="function"?new Oi(t.format("json")):new Oi(t)}}const rh=BigInt(0);function _s(n){return n??null}function ce(n){return n==null?null:n.toString()}class nh{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(t,e,r){St(this,{gasPrice:_s(t),maxFeePerGas:_s(e),maxPriorityFeePerGas:_s(r)})}toJSON(){const{gasPrice:t,maxFeePerGas:e,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:ce(t),maxFeePerGas:ce(e),maxPriorityFeePerGas:ce(r)}}}function No(n){const t={};n.to&&(t.to=n.to),n.from&&(t.from=n.from),n.data&&(t.data=gt(n.data));const e="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of e)!(i in n)||n[i]==null||(t[i]=Et(n[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in n)||n[i]==null||(t[i]=Tt(n[i],`request.${i}`));return n.accessList&&(t.accessList=Ri(n.accessList)),n.authorizationList&&(t.authorizationList=n.authorizationList.slice()),"blockTag"in n&&(t.blockTag=n.blockTag),"enableCcipRead"in n&&(t.enableCcipRead=!!n.enableCcipRead),"customData"in n&&(t.customData=n.customData),"blobVersionedHashes"in n&&n.blobVersionedHashes&&(t.blobVersionedHashes=n.blobVersionedHashes.slice()),"kzg"in n&&(t.kzg=n.kzg),"blobs"in n&&n.blobs&&(t.blobs=n.blobs.map(i=>la(i)?gt(i):Object.assign({},i))),t}class O1{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#t;constructor(t,e){this.#t=t.transactions.map(r=>typeof r!="string"?new js(r,e):r),St(this,{provider:e,hash:_s(t.hash),number:t.number,timestamp:t.timestamp,parentHash:t.parentHash,parentBeaconBlockRoot:t.parentBeaconBlockRoot,nonce:t.nonce,difficulty:t.difficulty,gasLimit:t.gasLimit,gasUsed:t.gasUsed,blobGasUsed:t.blobGasUsed,excessBlobGas:t.excessBlobGas,miner:t.miner,prevRandao:_s(t.prevRandao),extraData:t.extraData,baseFeePerGas:_s(t.baseFeePerGas),stateRoot:t.stateRoot,receiptsRoot:t.receiptsRoot})}get transactions(){return this.#t.map(t=>typeof t=="string"?t:t.hash)}get prefetchedTransactions(){const t=this.#t.slice();return t.length===0?[]:(ut(typeof t[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),t)}toJSON(){const{baseFeePerGas:t,difficulty:e,extraData:r,gasLimit:i,gasUsed:o,hash:a,miner:u,prevRandao:_,nonce:l,number:f,parentHash:g,parentBeaconBlockRoot:y,stateRoot:v,receiptsRoot:I,timestamp:k,transactions:T}=this;return{_type:"Block",baseFeePerGas:ce(t),difficulty:ce(e),extraData:r,gasLimit:ce(i),gasUsed:ce(o),blobGasUsed:ce(this.blobGasUsed),excessBlobGas:ce(this.excessBlobGas),hash:a,miner:u,prevRandao:_,nonce:l,number:f,parentHash:g,timestamp:k,parentBeaconBlockRoot:y,stateRoot:v,receiptsRoot:I,transactions:T}}[Symbol.iterator](){let t=0;const e=this.transactions;return{next:()=>t<this.length?{value:e[t++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#t.length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(t){let e;if(typeof t=="number")e=this.#t[t];else{const r=t.toLowerCase();for(const i of this.#t)if(typeof i=="string"){if(i!==r)continue;e=i;break}else{if(i.hash!==r)continue;e=i;break}}if(e==null)throw new Error("no such tx");return typeof e=="string"?await this.provider.getTransaction(e):e}getPrefetchedTransaction(t){const e=this.prefetchedTransactions;if(typeof t=="number")return e[t];t=t.toLowerCase();for(const r of e)if(r.hash===t)return r;G(!1,"no matching transaction","indexOrHash",t)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return T1(this)}}class Ms{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(t,e){this.provider=e;const r=Object.freeze(t.topics.slice());St(this,{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,removed:t.removed,address:t.address,data:t.data,topics:r,index:t.index,transactionIndex:t.transactionIndex})}toJSON(){const{address:t,blockHash:e,blockNumber:r,data:i,index:o,removed:a,topics:u,transactionHash:_,transactionIndex:l}=this;return{_type:"log",address:t,blockHash:e,blockNumber:r,data:i,index:o,removed:a,topics:u,transactionHash:_,transactionIndex:l}}async getBlock(){const t=await this.provider.getBlock(this.blockHash);return ut(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransaction(){const t=await this.provider.getTransaction(this.transactionHash);return ut(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransactionReceipt(){const t=await this.provider.getTransactionReceipt(this.transactionHash);return ut(!!t,"failed to find transaction receipt","UNKNOWN_ERROR",{}),t}removedEvent(){return C1(this)}}class ih{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#t;constructor(t,e){this.#t=Object.freeze(t.logs.map(i=>new Ms(i,e)));let r=rh;t.effectiveGasPrice!=null?r=t.effectiveGasPrice:t.gasPrice!=null&&(r=t.gasPrice),St(this,{provider:e,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,blobGasUsed:t.blobGasUsed,gasPrice:r,blobGasPrice:t.blobGasPrice,type:t.type,status:t.status,root:t.root})}get logs(){return this.#t}toJSON(){const{to:t,from:e,contractAddress:r,hash:i,index:o,blockHash:a,blockNumber:u,logsBloom:_,logs:l,status:f,root:g}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:u,contractAddress:r,cumulativeGasUsed:ce(this.cumulativeGasUsed),from:e,gasPrice:ce(this.gasPrice),blobGasUsed:ce(this.blobGasUsed),blobGasPrice:ce(this.blobGasPrice),gasUsed:ce(this.gasUsed),hash:i,index:o,logs:l,logsBloom:_,root:g,status:f,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t<this.length?{value:this.logs[t++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const t=await this.provider.getBlock(this.blockHash);if(t==null)throw new Error("TODO");return t}async getTransaction(){const t=await this.provider.getTransaction(this.hash);if(t==null)throw new Error("TODO");return t}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return oh(this)}reorderedEvent(t){return ut(!t||t.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),sh(this,t)}}class js{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#t;constructor(t,e){this.provider=e,this.blockNumber=t.blockNumber!=null?t.blockNumber:null,this.blockHash=t.blockHash!=null?t.blockHash:null,this.hash=t.hash,this.index=t.index,this.type=t.type,this.from=t.from,this.to=t.to||null,this.gasLimit=t.gasLimit,this.nonce=t.nonce,this.data=t.data,this.value=t.value,this.gasPrice=t.gasPrice,this.maxPriorityFeePerGas=t.maxPriorityFeePerGas!=null?t.maxPriorityFeePerGas:null,this.maxFeePerGas=t.maxFeePerGas!=null?t.maxFeePerGas:null,this.maxFeePerBlobGas=t.maxFeePerBlobGas!=null?t.maxFeePerBlobGas:null,this.chainId=t.chainId,this.signature=t.signature,this.accessList=t.accessList!=null?t.accessList:null,this.blobVersionedHashes=t.blobVersionedHashes!=null?t.blobVersionedHashes:null,this.authorizationList=t.authorizationList!=null?t.authorizationList:null,this.#t=-1}toJSON(){const{blockNumber:t,blockHash:e,index:r,hash:i,type:o,to:a,from:u,nonce:_,data:l,signature:f,accessList:g,blobVersionedHashes:y}=this;return{_type:"TransactionResponse",accessList:g,blockNumber:t,blockHash:e,blobVersionedHashes:y,chainId:ce(this.chainId),data:l,from:u,gasLimit:ce(this.gasLimit),gasPrice:ce(this.gasPrice),hash:i,maxFeePerGas:ce(this.maxFeePerGas),maxPriorityFeePerGas:ce(this.maxPriorityFeePerGas),maxFeePerBlobGas:ce(this.maxFeePerBlobGas),nonce:_,signature:f,to:a,index:r,type:o,value:ce(this.value)}}async getBlock(){let t=this.blockNumber;if(t==null){const r=await this.getTransaction();r&&(t=r.blockNumber)}if(t==null)return null;const e=this.provider.getBlock(t);if(e==null)throw new Error("TODO");return e}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:e,blockNumber:r}=await Ee({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return e==null||e.blockNumber==null?0:r-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(t,e){const r=t??1,i=e??0;let o=this.#t,a=-1,u=o===-1;const _=async()=>{if(u)return null;const{blockNumber:y,nonce:v}=await Ee({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(v<this.nonce){o=y;return}if(u)return null;const I=await this.getTransaction();if(!(I&&I.blockNumber!=null))for(a===-1&&(a=o-3,a<this.#t&&(a=this.#t));a<=y;){if(u)return null;const k=await this.provider.getBlock(a,!0);if(k==null)return;for(const T of k)if(T===this.hash)return;for(let T=0;T<k.length;T++){const E=await k.getTransaction(T);if(E.from===this.from&&E.nonce===this.nonce){if(u)return null;const R=await this.provider.getTransactionReceipt(E.hash);if(R==null||y-R.blockNumber+1<r)return;let B="replaced";E.data===this.data&&E.to===this.to&&E.value===this.value?B="repriced":E.data==="0x"&&E.from===E.to&&E.value===rh&&(B="cancelled"),ut(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:B==="replaced"||B==="cancelled",reason:B,replacement:E.replaceableTransaction(o),hash:E.hash,receipt:R})}}a++}},l=y=>{if(y==null||y.status!==0)return y;ut(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:y.to,from:y.from,data:""},receipt:y})},f=await this.provider.getTransactionReceipt(this.hash);if(r===0)return l(f);if(f){if(r===1||await f.confirmations()>=r)return l(f)}else if(await _(),r===0)return null;return await new Promise((y,v)=>{const I=[],k=()=>{I.forEach(E=>E())};if(I.push(()=>{u=!0}),i>0){const E=setTimeout(()=>{k(),v(re("wait for transaction timeout","TIMEOUT"))},i);I.push(()=>{clearTimeout(E)})}const T=async E=>{if(await E.confirmations()>=r){k();try{y(l(E))}catch(R){v(R)}}};if(I.push(()=>{this.provider.off(this.hash,T)}),this.provider.on(this.hash,T),o>=0){const E=async()=>{try{await _()}catch(R){if(me(R,"TRANSACTION_REPLACED")){k(),v(R);return}}u||this.provider.once("block",E)};I.push(()=>{this.provider.off("block",E)}),this.provider.once("block",E)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ut(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),oh(this)}reorderedEvent(t){return ut(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ut(!t||t.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),sh(this,t)}replaceableTransaction(t){G(Number.isInteger(t)&&t>=0,"invalid startBlock","startBlock",t);const e=new js(this,this.provider);return e.#t=t,e}}function T1(n){return{orphan:"drop-block",hash:n.hash,number:n.number}}function sh(n,t){return{orphan:"reorder-transaction",tx:n,other:t}}function oh(n){return{orphan:"drop-transaction",tx:n}}function C1(n){return{orphan:"drop-log",log:{transactionHash:n.transactionHash,blockHash:n.blockHash,blockNumber:n.blockNumber,address:n.address,data:n.data,topics:Object.freeze(n.topics.slice()),index:n.index}}}class tc extends Ms{interface;fragment;args;constructor(t,e,r){super(t,t.provider);const i=e.decodeEventLog(r,t.data,t.topics);St(this,{args:i,fragment:r,interface:e})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class ah extends Ms{error;constructor(t,e){super(t,t.provider),St(this,{error:e})}}class N1 extends ih{#t;constructor(t,e,r){super(r,e),this.#t=t}get logs(){return super.logs.map(t=>{const e=t.topics.length?this.#t.getEvent(t.topics[0]):null;if(e)try{return new tc(t,this.#t,e)}catch(r){return new ah(t,r)}return t})}}class ec extends js{#t;constructor(t,e,r){super(r,e),this.#t=t}async wait(t,e){const r=await super.wait(t,e);return r==null?null:new N1(this.#t,this.provider,r)}}class ch extends T_{log;constructor(t,e,r,i){super(t,e,r),St(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class L1 extends ch{constructor(t,e,r,i,o){super(t,e,r,new tc(o,t.interface,i));const a=t.interface.decodeEventLog(i,this.log.data,this.log.topics);St(this,{args:a,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const uh=BigInt(0);function _h(n){return n&&typeof n.call=="function"}function fh(n){return n&&typeof n.estimateGas=="function"}function Lo(n){return n&&typeof n.resolveName=="function"}function lh(n){return n&&typeof n.sendTransaction=="function"}function hh(n){if(n!=null){if(Lo(n))return n;if(n.provider)return n.provider}}class D1{#t;fragment;constructor(t,e,r){if(St(this,{fragment:e}),e.inputs.length<r.length)throw new Error("too many arguments");const i=Ti(t.runner,"resolveName"),o=Lo(i)?i:null;this.#t=async function(){const a=await Promise.all(e.inputs.map((u,_)=>r[_]==null?null:u.walkAsync(r[_],(f,g)=>f==="address"?Array.isArray(g)?Promise.all(g.map(y=>Re(y,o))):Re(g,o):g)));return t.interface.encodeFilterTopics(e,a)}()}getTopicFilter(){return this.#t}}function Ti(n,t){return n==null?null:typeof n[t]=="function"?n:n.provider&&typeof n.provider[t]=="function"?n.provider:null}function Ci(n){return n==null?null:n.provider||null}async function ph(n,t){const e=oe.dereference(n,"overrides");G(typeof e=="object","invalid overrides parameter","overrides",n);const r=No(e);return G(r.to==null||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),G(r.data==null||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function U1(n,t,e){const r=Ti(n,"resolveName"),i=Lo(r)?r:null;return await Promise.all(t.map((o,a)=>o.walkAsync(e[a],(u,_)=>(_=oe.dereference(_,u),u==="address"?Re(_,i):_))))}function M1(n){const t=async function(a){const u=await ph(a,["data"]);u.to=await n.getAddress(),u.from&&(u.from=await Re(u.from,hh(n.runner)));const _=n.interface,l=Et(u.value||uh,"overrides.value")===uh,f=(u.data||"0x")==="0x";_.fallback&&!_.fallback.payable&&_.receive&&!f&&!l&&G(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),G(_.fallback||f,"cannot send data to receive-only contract","overrides.data",u.data);const g=_.receive||_.fallback&&_.fallback.payable;return G(g||l,"cannot send value to non-payable fallback","overrides.value",u.value),G(_.fallback||f,"cannot send data to receive-only contract","overrides.data",u.data),u},e=async function(a){const u=Ti(n.runner,"call");ut(_h(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const _=await t(a);try{return await u.call(_)}catch(l){throw fa(l)&&l.data?n.interface.makeError(l.data,_):l}},r=async function(a){const u=n.runner;ut(lh(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const _=await u.sendTransaction(await t(a)),l=Ci(n.runner);return new ec(n.interface,l,_)},i=async function(a){const u=Ti(n.runner,"estimateGas");return ut(fh(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await t(a))},o=async a=>await r(a);return St(o,{_contract:n,estimateGas:i,populateTransaction:t,send:r,staticCall:e}),o}function j1(n,t){const e=function(...l){const f=n.interface.getFunction(t,l);return ut(f,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:l}}),f},r=async function(...l){const f=e(...l);let g={};if(f.inputs.length+1===l.length&&(g=await ph(l.pop()),g.from&&(g.from=await Re(g.from,hh(n.runner)))),f.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const y=await U1(n.runner,f.inputs,l);return Object.assign({},g,await Ee({to:n.getAddress(),data:n.interface.encodeFunctionData(f,y)}))},i=async function(...l){const f=await u(...l);return f.length===1?f[0]:f},o=async function(...l){const f=n.runner;ut(lh(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const g=await f.sendTransaction(await r(...l)),y=Ci(n.runner);return new ec(n.interface,y,g)},a=async function(...l){const f=Ti(n.runner,"estimateGas");return ut(fh(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await r(...l))},u=async function(...l){const f=Ti(n.runner,"call");ut(_h(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const g=await r(...l);let y="0x";try{y=await f.call(g)}catch(I){throw fa(I)&&I.data?n.interface.makeError(I.data,g):I}const v=e(...l);return n.interface.decodeFunctionResult(v,y)},_=async(...l)=>e(...l).constant?await i(...l):await o(...l);return St(_,{name:n.interface.getFunctionName(t),_contract:n,_key:t,getFragment:e,estimateGas:a,populateTransaction:r,send:o,staticCall:i,staticCallResult:u}),Object.defineProperty(_,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=n.interface.getFunction(t);return ut(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),l}}),_}function G1(n,t){const e=function(...i){const o=n.interface.getEvent(t,i);return ut(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:i}}),o},r=function(...i){return new D1(n,e(...i),i)};return St(r,{name:n.interface.getEventName(t),_contract:n,_key:t,getFragment:e}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=n.interface.getEvent(t);return ut(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),i}}),r}const Do=Symbol.for("_ethersInternal_contract"),dh=new WeakMap;function H1(n,t){dh.set(n[Do],t)}function Le(n){return dh.get(n[Do])}function V1(n){return n&&typeof n=="object"&&"getTopicFilter"in n&&typeof n.getTopicFilter=="function"&&n.fragment}async function rc(n,t){let e,r=null;if(Array.isArray(t)){const o=function(a){if($t(a,32))return a;const u=n.interface.getEvent(a);return G(u,"unknown fragment","name",a),u.topicHash};e=t.map(a=>a==null?null:Array.isArray(a)?a.map(o):o(a))}else t==="*"?e=[null]:typeof t=="string"?$t(t,32)?e=[t]:(r=n.interface.getEvent(t),G(r,"unknown fragment","event",t),e=[r.topicHash]):V1(t)?e=await t.getTopicFilter():"fragment"in t?(r=t.fragment,e=[r.topicHash]):G(!1,"unknown event name","event",t);e=e.map(o=>{if(o==null)return null;if(Array.isArray(o)){const a=Array.from(new Set(o.map(u=>u.toLowerCase())).values());return a.length===1?a[0]:(a.sort(),a)}return o.toLowerCase()});const i=e.map(o=>o==null?"null":Array.isArray(o)?o.join("|"):o).join("&");return{fragment:r,tag:i,topics:e}}async function Gs(n,t){const{subs:e}=Le(n);return e.get((await rc(n,t)).tag)||null}async function wh(n,t,e){const r=Ci(n.runner);ut(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:a}=await rc(n,e),{addr:u,subs:_}=Le(n);let l=_.get(o);if(!l){const g={address:u||n,topics:a},y=T=>{let E=i;if(E==null)try{E=n.interface.getEvent(T.topics[0])}catch{}if(E){const R=E,B=i?n.interface.decodeEventLog(i,T.data,T.topics):[];ic(n,e,B,z=>new L1(n,z,e,R,T))}else ic(n,e,[],R=>new ch(n,R,e,T))};let v=[];l={tag:o,listeners:[],start:()=>{v.length||v.push(r.on(g,y))},stop:async()=>{if(v.length==0)return;let T=v;v=[],await Promise.all(T),r.off(g,y)}},_.set(o,l)}return l}let nc=Promise.resolve();async function q1(n,t,e,r){await nc;const i=await Gs(n,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter(({listener:a,once:u})=>{const _=Array.from(e);r&&_.push(r(u?null:a));try{a.call(n,..._)}catch{}return!u}),i.listeners.length===0&&(i.stop(),Le(n).subs.delete(i.tag)),o>0}async function ic(n,t,e,r){try{await nc}catch{}const i=q1(n,t,e,r);return nc=i,await i}const Uo=["then"];class Hs{target;interface;runner;filters;[Do];fallback;constructor(t,e,r,i){G(typeof t=="string"||qf(t),"invalid value for Contract target","target",t),r==null&&(r=null);const o=Oi.from(e);St(this,{target:t,runner:r,interface:o}),Object.defineProperty(this,Do,{value:{}});let a,u=null,_=null;if(i){const g=Ci(r);_=new ec(this.interface,g,i)}let l=new Map;if(typeof t=="string")if($t(t))u=t,a=Promise.resolve(t);else{const g=Ti(r,"resolveName");if(!Lo(g))throw re("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=g.resolveName(t).then(y=>{if(y==null)throw re("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return Le(this).addr=y,y})}else a=t.getAddress().then(g=>{if(g==null)throw new Error("TODO");return Le(this).addr=g,g});H1(this,{addrPromise:a,addr:u,deployTx:_,subs:l});const f=new Proxy({},{get:(g,y,v)=>{if(typeof y=="symbol"||Uo.indexOf(y)>=0)return Reflect.get(g,y,v);try{return this.getEvent(y)}catch(I){if(!me(I,"INVALID_ARGUMENT")||I.argument!=="key")throw I}},has:(g,y)=>Uo.indexOf(y)>=0?Reflect.has(g,y):Reflect.has(g,y)||this.interface.hasEvent(String(y))});return St(this,{filters:f}),St(this,{fallback:o.receive||o.fallback?M1(this):null}),new Proxy(this,{get:(g,y,v)=>{if(typeof y=="symbol"||y in g||Uo.indexOf(y)>=0)return Reflect.get(g,y,v);try{return g.getFunction(y)}catch(I){if(!me(I,"INVALID_ARGUMENT")||I.argument!=="key")throw I}},has:(g,y)=>typeof y=="symbol"||y in g||Uo.indexOf(y)>=0?Reflect.has(g,y):g.interface.hasFunction(y)})}connect(t){return new Hs(this.target,this.interface,t)}attach(t){return new Hs(t,this.interface,this.runner)}async getAddress(){return await Le(this).addrPromise}async getDeployedCode(){const t=Ci(this.runner);ut(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const e=await t.getCode(await this.getAddress());return e==="0x"?null:e}async waitForDeployment(){const t=this.deploymentTransaction();if(t)return await t.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=Ci(this.runner);return ut(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,o)=>{const a=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",a)}catch(u){o(u)}};a()})}deploymentTransaction(){return Le(this).deployTx}getFunction(t){return typeof t!="string"&&(t=t.format()),j1(this,t)}getEvent(t){return typeof t!="string"&&(t=t.format()),G1(this,t)}async queryTransaction(t){throw new Error("@TODO")}async queryFilter(t,e,r){e==null&&(e=0),r==null&&(r="latest");const{addr:i,addrPromise:o}=Le(this),a=i||await o,{fragment:u,topics:_}=await rc(this,t),l={address:a,topics:_,fromBlock:e,toBlock:r},f=Ci(this.runner);return ut(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(l)).map(g=>{let y=u;if(y==null)try{y=this.interface.getEvent(g.topics[0])}catch{}if(y)try{return new tc(g,this.interface,y)}catch(v){return new ah(g,v)}return new Ms(g,f)})}async on(t,e){const r=await wh(this,"on",t);return r.listeners.push({listener:e,once:!1}),r.start(),this}async once(t,e){const r=await wh(this,"once",t);return r.listeners.push({listener:e,once:!0}),r.start(),this}async emit(t,...e){return await ic(this,t,e,null)}async listenerCount(t){if(t){const i=await Gs(this,t);return i?i.listeners.length:0}const{subs:e}=Le(this);let r=0;for(const{listeners:i}of e.values())r+=i.length;return r}async listeners(t){if(t){const i=await Gs(this,t);return i?i.listeners.map(({listener:o})=>o):[]}const{subs:e}=Le(this);let r=[];for(const{listeners:i}of e.values())r=r.concat(i.map(({listener:o})=>o));return r}async off(t,e){const r=await Gs(this,t);if(!r)return this;if(e){const i=r.listeners.map(({listener:o})=>o).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(e==null||r.listeners.length===0)&&(r.stop(),Le(this).subs.delete(r.tag)),this}async removeAllListeners(t){if(t){const e=await Gs(this,t);if(!e)return this;e.stop(),Le(this).subs.delete(e.tag)}else{const{subs:e}=Le(this);for(const{tag:r,stop:i}of e.values())i(),e.delete(r)}return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return await this.off(t,e)}static buildClass(t){class e extends Hs{constructor(i,o=null){super(i,t,o)}}return e}static from(t,e,r){return r==null&&(r=null),new this(t,e,r)}}function Q1(){return Hs}class ir extends Q1(){}function sc(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):G(!1,"unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}class K1{name;constructor(t){St(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,e){throw new Error("unsupported coin")}async decodeAddress(t,e){throw new Error("unsupported coin")}}const gh=new RegExp("^(ipfs)://(.*)$","i"),yh=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),gh,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class fs{provider;address;name;#t;#e;constructor(t,e,r){St(this,{provider:t,address:e,name:r}),this.#t=null,this.#e=new ir(e,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],t)}async supportsWildcard(){return this.#t==null&&(this.#t=(async()=>{try{return await this.#e.supportsInterface("0x9061b923")}catch(t){if(me(t,"CALL_EXCEPTION"))return!1;throw this.#t=null,t}})()),await this.#t}async#r(t,e){e=(e||[]).slice();const r=this.#e.interface;e.unshift($a(this.name));let i=null;await this.supportsWildcard()&&(i=r.getFunction(t),ut(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[a1(this.name,255),r.encodeFunctionData(i,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const o=await this.#e[t](...e);return i?r.decodeFunctionResult(i,o)[0]:o}catch(o){if(!me(o,"CALL_EXCEPTION"))throw o}return null}async getAddress(t){if(t==null&&(t=60),t===60)try{const o=await this.#r("addr(bytes32)");return o==null||o===Fs?null:o}catch(o){if(me(o,"CALL_EXCEPTION"))return null;throw o}if(t>=0&&t<2147483648){let o=t+2147483648;const a=await this.#r("addr(bytes32,uint)",[o]);if($t(a,20))return Dt(a)}let e=null;for(const o of this.provider.plugins)if(o instanceof K1&&o.supportsCoinType(t)){e=o;break}if(e==null)return null;const r=await this.#r("addr(bytes32,uint)",[t]);if(r==null||r==="0x")return null;const i=await e.decodeAddress(t,r);if(i!=null)return i;ut(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:r}})}async getText(t){const e=await this.#r("text(bytes32,string)",[t]);return e==null||e==="0x"?null:e}async getContentHash(){const t=await this.#r("contenthash(bytes32)");if(t==null||t==="0x")return null;const e=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const i=e[1]==="e3010170"?"ipfs":"ipns",o=parseInt(e[4],16);if(e[5].length===o*2)return`${i}://${uy("0x"+e[2])}`}const r=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;ut(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:"name",value:this.name}];try{const e=await this.getText("avatar");if(e==null)return t.push({type:"!avatar",value:""}),{url:null,linkage:t};t.push({type:"avatar",value:e});for(let r=0;r<yh.length;r++){const i=e.match(yh[r]);if(i==null)continue;const o=i[1].toLowerCase();switch(o){case"https":case"data":return t.push({type:"url",value:e}),{linkage:t,url:e};case"ipfs":{const a=sc(e);return t.push({type:"ipfs",value:e}),t.push({type:"url",value:a}),{linkage:t,url:a}}case"erc721":case"erc1155":{const a=o==="erc721"?"tokenURI(uint256)":"uri(uint256)";t.push({type:o,value:e});const u=await this.getAddress();if(u==null)return t.push({type:"!owner",value:""}),{url:null,linkage:t};const _=(i[2]||"").split("/");if(_.length!==2)return t.push({type:`!${o}caip`,value:i[2]||""}),{url:null,linkage:t};const l=_[1],f=new ir(_[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(o==="erc721"){const k=await f.ownerOf(l);if(u!==k)return t.push({type:"!owner",value:k}),{url:null,linkage:t};t.push({type:"owner",value:k})}else if(o==="erc1155"){const k=await f.balanceOf(u,l);if(!k)return t.push({type:"!balance",value:"0"}),{url:null,linkage:t};t.push({type:"balance",value:k.toString()})}let g=await f[a](l);if(g==null||g==="0x")return t.push({type:"!metadata-url",value:""}),{url:null,linkage:t};t.push({type:"metadata-url-base",value:g}),o==="erc1155"&&(g=g.replace("{id}",ii(l,32).substring(2)),t.push({type:"metadata-url-expanded",value:g})),g.match(/^ipfs:/i)&&(g=sc(g)),t.push({type:"metadata-url",value:g});let y={};const v=await new Ln(g).send();v.assertOk();try{y=v.bodyJson}catch{try{t.push({type:"!metadata",value:v.bodyText})}catch{const E=v.body;return E&&t.push({type:"!metadata",value:gt(E)}),{url:null,linkage:t}}return{url:null,linkage:t}}if(!y)return t.push({type:"!metadata",value:""}),{url:null,linkage:t};t.push({type:"metadata",value:JSON.stringify(y)});let I=y.image;if(typeof I!="string")return t.push({type:"!imageUrl",value:""}),{url:null,linkage:t};if(!I.match(/^(https:\/\/|data:)/i)){if(I.match(gh)==null)return t.push({type:"!imageUrl-ipfs",value:I}),{url:null,linkage:t};t.push({type:"imageUrl-ipfs",value:I}),I=sc(I)}return t.push({type:"url",value:I}),{linkage:t,url:I}}}}}catch{}return{linkage:t,url:null}}static async getEnsAddress(t){const e=await t.getNetwork(),r=e.getPlugin("org.ethers.plugins.network.Ens");return ut(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:e}}),r.address}static async#n(t,e){const r=await fs.getEnsAddress(t);try{const o=await new ir(r,["function resolver(bytes32) view returns (address)"],t).resolver($a(e),{enableCcipRead:!0});return o===Fs?null:o}catch(i){throw i}return null}static async fromName(t,e){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const i=await fs.#n(t,r);if(i!=null){const o=new fs(t,i,e);return r!==e&&!await o.supportsWildcard()?null:o}r=r.split(".").slice(1).join(".")}}}const bh=BigInt(0);function Lt(n,t){return function(e){return e==null?t:n(e)}}function Vs(n,t){return e=>{if(t&&e==null)return null;if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>n(r))}}function qs(n,t){return e=>{const r={};for(const i in n){let o=i;if(t&&i in t&&!(o in e)){for(const a of t[i])if(a in e){o=a;break}}try{const a=n[i](e[o]);a!==void 0&&(r[i]=a)}catch(a){const u=a instanceof Error?a.message:"not-an-error";ut(!1,`invalid value for value.${i} (${u})`,"BAD_DATA",{value:e})}}return r}}function W1(n){switch(n){case!0:case"true":return!0;case!1:case"false":return!1}G(!1,`invalid boolean; ${JSON.stringify(n)}`,"value",n)}function ls(n){return G($t(n,!0),"invalid data","value",n),n}function Ae(n){return G($t(n,32),"invalid hash","value",n),n}const J1=qs({address:Dt,blockHash:Ae,blockNumber:Tt,data:ls,index:Tt,removed:Lt(W1,!1),topics:Vs(Ae),transactionHash:Ae,transactionIndex:Tt},{index:["logIndex"]});function $1(n){return J1(n)}const Y1=qs({hash:Lt(Ae),parentHash:Ae,parentBeaconBlockRoot:Lt(Ae,null),number:Tt,timestamp:Tt,nonce:Lt(ls),difficulty:Et,gasLimit:Et,gasUsed:Et,stateRoot:Lt(Ae,null),receiptsRoot:Lt(Ae,null),blobGasUsed:Lt(Et,null),excessBlobGas:Lt(Et,null),miner:Lt(Dt),prevRandao:Lt(Ae,null),extraData:ls,baseFeePerGas:Lt(Et)},{prevRandao:["mixHash"]});function Z1(n){const t=Y1(n);return t.transactions=n.transactions.map(e=>typeof e=="string"?e:mh(e)),t}const X1=qs({transactionIndex:Tt,blockNumber:Tt,transactionHash:Ae,address:Dt,topics:Vs(Ae),data:ls,index:Tt,blockHash:Ae},{index:["logIndex"]});function tm(n){return X1(n)}const em=qs({to:Lt(Dt,null),from:Lt(Dt,null),contractAddress:Lt(Dt,null),index:Tt,root:Lt(gt),gasUsed:Et,blobGasUsed:Lt(Et,null),logsBloom:Lt(ls),blockHash:Ae,hash:Ae,logs:Vs(tm),blockNumber:Tt,cumulativeGasUsed:Et,effectiveGasPrice:Lt(Et),blobGasPrice:Lt(Et,null),status:Lt(Tt),type:Lt(Tt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function rm(n){return em(n)}function mh(n){n.to&&Et(n.to)===bh&&(n.to="0x0000000000000000000000000000000000000000");const t=qs({hash:Ae,index:Lt(Tt,void 0),type:e=>e==="0x"||e==null?0:Tt(e),accessList:Lt(Ri,null),blobVersionedHashes:Lt(Vs(Ae,!0),null),authorizationList:Lt(Vs(e=>{let r;if(e.signature)r=e.signature;else{let i=e.yParity;i==="0x1b"?i=0:i==="0x1c"&&(i=1),r=Object.assign({},e,{yParity:i})}return{address:Dt(e.address),chainId:Et(e.chainId),nonce:Et(e.nonce),signature:se.from(r)}},!1),null),blockHash:Lt(Ae,null),blockNumber:Lt(Tt,null),transactionIndex:Lt(Tt,null),from:Dt,gasPrice:Lt(Et),maxPriorityFeePerGas:Lt(Et),maxFeePerGas:Lt(Et),maxFeePerBlobGas:Lt(Et,null),gasLimit:Et,to:Lt(Dt,null),value:Et,nonce:Tt,data:ls,creates:Lt(Dt,null),chainId:Lt(Et,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(n);if(t.to==null&&t.creates==null&&(t.creates=V0(t)),(n.type===1||n.type===2)&&n.accessList==null&&(t.accessList=[]),n.signature?t.signature=se.from(n.signature):t.signature=se.from(n),t.chainId==null){const e=t.signature.legacyChainId;e!=null&&(t.chainId=e)}return t.blockHash&&Et(t.blockHash)===bh&&(t.blockHash=null),t}const nm="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Qs{name;constructor(t){St(this,{name:t})}clone(){return new Qs(this.name)}}class Mo extends Qs{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(t,e){t==null&&(t=0),super(`org.ethers.network.plugins.GasCost#${t||0}`);const r={effectiveBlock:t};function i(o,a){let u=(e||{})[o];u==null&&(u=a),G(typeof u=="number",`invalud value for ${o}`,"costs",e),r[o]=u}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),St(this,r)}clone(){return new Mo(this.effectiveBlock,this)}}class jo extends Qs{address;targetNetwork;constructor(t,e){super("org.ethers.plugins.network.Ens"),St(this,{address:t||nm,targetNetwork:e??1})}clone(){return new jo(this.address,this.targetNetwork)}}class im extends Qs{#t;#e;get url(){return this.#t}get processFunc(){return this.#e}constructor(t,e){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#t=t,this.#e=e}clone(){return this}}const oc=new Map;class De{#t;#e;#r;constructor(t,e){this.#t=t,this.#e=Et(e),this.#r=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#t}set name(t){this.#t=t}get chainId(){return this.#e}set chainId(t){this.#e=Et(t,"chainId")}matches(t){if(t==null)return!1;if(typeof t=="string"){try{return this.chainId===Et(t)}catch{}return this.name===t}if(typeof t=="number"||typeof t=="bigint"){try{return this.chainId===Et(t)}catch{}return!1}if(typeof t=="object"){if(t.chainId!=null){try{return this.chainId===Et(t.chainId)}catch{}return!1}return t.name!=null?this.name===t.name:!1}return!1}get plugins(){return Array.from(this.#r.values())}attachPlugin(t){if(this.#r.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#r.set(t.name,t.clone()),this}getPlugin(t){return this.#r.get(t)||null}getPlugins(t){return this.plugins.filter(e=>e.name.split("#")[0]===t)}clone(){const t=new De(this.name,this.chainId);return this.plugins.forEach(e=>{t.attachPlugin(e.clone())}),t}computeIntrinsicGas(t){const e=this.getPlugin("org.ethers.plugins.network.GasCost")||new Mo;let r=e.txBase;if(t.to==null&&(r+=e.txCreate),t.data)for(let i=2;i<t.data.length;i+=2)t.data.substring(i,i+2)==="00"?r+=e.txDataZero:r+=e.txDataNonzero;if(t.accessList){const i=Ri(t.accessList);for(const o in i)r+=e.txAccessListAddress+e.txAccessListStorageKey*i[o].storageKeys.length}return r}static from(t){if(sm(),t==null)return De.from("mainnet");if(typeof t=="number"&&(t=BigInt(t)),typeof t=="string"||typeof t=="bigint"){const e=oc.get(t);if(e)return e();if(typeof t=="bigint")return new De("unknown",t);G(!1,"unknown network","network",t)}if(typeof t.clone=="function")return t.clone();if(typeof t=="object"){G(typeof t.name=="string"&&typeof t.chainId=="number","invalid network object name or chainId","network",t);const e=new De(t.name,t.chainId);return(t.ensAddress||t.ensNetwork!=null)&&e.attachPlugin(new jo(t.ensAddress,t.ensNetwork)),e}G(!1,"invalid network","network",t)}static register(t,e){typeof t=="number"&&(t=BigInt(t));const r=oc.get(t);r&&G(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",t),oc.set(t,e)}}function Ah(n,t){const e=String(n);if(!e.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${n}`);const r=e.split(".");if(r.length===1&&r.push(""),r.length!==2)throw new Error(`invalid gwei value: ${n}`);for(;r[1].length<t;)r[1]+="0";if(r[1].length>9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function Eh(n){return new im(n,async(t,e,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[o,a]=await Promise.all([r.send(),t()]);i=o;const u=i.bodyJson.standard;return{gasPrice:a.gasPrice,maxFeePerGas:Ah(u.maxFee,9),maxPriorityFeePerGas:Ah(u.maxPriorityFee,9)}}catch(o){ut(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:o})}})}let vh=!1;function sm(){if(vh)return;vh=!0;function n(t,e,r){const i=function(){const o=new De(t,e);return r.ensNetwork!=null&&o.attachPlugin(new jo(null,r.ensNetwork)),o.attachPlugin(new Mo),(r.plugins||[]).forEach(a=>{o.attachPlugin(a)}),o};De.register(t,i),De.register(e,i),r.altNames&&r.altNames.forEach(o=>{De.register(o,i)})}n("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),n("ropsten",3,{ensNetwork:3}),n("rinkeby",4,{ensNetwork:4}),n("goerli",5,{ensNetwork:5}),n("kovan",42,{ensNetwork:42}),n("sepolia",11155111,{ensNetwork:11155111}),n("holesky",17e3,{ensNetwork:17e3}),n("classic",61,{}),n("classicKotti",6,{}),n("arbitrum",42161,{ensNetwork:1}),n("arbitrum-goerli",421613,{}),n("arbitrum-sepolia",421614,{}),n("base",8453,{ensNetwork:1}),n("base-goerli",84531,{}),n("base-sepolia",84532,{}),n("bnb",56,{ensNetwork:1}),n("bnbt",97,{}),n("linea",59144,{ensNetwork:1}),n("linea-goerli",59140,{}),n("linea-sepolia",59141,{}),n("matic",137,{ensNetwork:1,plugins:[Eh("https://gasstation.polygon.technology/v2")]}),n("matic-amoy",80002,{}),n("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Eh("https://gasstation-testnet.polygon.technology/v2")]}),n("optimism",10,{ensNetwork:1,plugins:[]}),n("optimism-goerli",420,{}),n("optimism-sepolia",11155420,{}),n("xdai",100,{ensNetwork:1})}function ac(n){return JSON.parse(JSON.stringify(n))}class om{#t;#e;#r;#n;constructor(t){this.#t=t,this.#e=null,this.#r=4e3,this.#n=-2}get pollingInterval(){return this.#r}set pollingInterval(t){this.#r=t}async#i(){try{const t=await this.#t.getBlockNumber();if(this.#n===-2){this.#n=t;return}if(t!==this.#n){for(let e=this.#n+1;e<=t;e++){if(this.#e==null)return;await this.#t.emit("block",e)}this.#n=t}}catch{}this.#e!=null&&(this.#e=this.#t._setTimeout(this.#i.bind(this),this.#r))}start(){this.#e||(this.#e=this.#t._setTimeout(this.#i.bind(this),this.#r),this.#i())}stop(){this.#e&&(this.#t._clearTimeout(this.#e),this.#e=null)}pause(t){this.stop(),t&&(this.#n=-2)}resume(){this.start()}}class cc{#t;#e;#r;constructor(t){this.#t=t,this.#r=!1,this.#e=e=>{this._poll(e,this.#t)}}async _poll(t,e){throw new Error("sub-classes must override this")}start(){this.#r||(this.#r=!0,this.#e(-2),this.#t.on("block",this.#e))}stop(){this.#r&&(this.#r=!1,this.#t.off("block",this.#e))}pause(t){this.stop()}resume(){this.start()}}class am extends cc{#t;#e;constructor(t,e){super(t),this.#t=e,this.#e=-2}pause(t){t&&(this.#e=-2),super.pause(t)}async _poll(t,e){const r=await e.getBlock(this.#t);r!=null&&(this.#e===-2?this.#e=r.number:r.number>this.#e&&(e.emit(this.#t,r.number),this.#e=r.number))}}class cm extends cc{#t;constructor(t,e){super(t),this.#t=ac(e)}async _poll(t,e){throw new Error("@TODO")}}class um extends cc{#t;constructor(t,e){super(t),this.#t=e}async _poll(t,e){const r=await e.getTransactionReceipt(this.#t);r&&e.emit(this.#t,r)}}class uc{#t;#e;#r;#n;#i;constructor(t,e){this.#t=t,this.#e=ac(e),this.#r=this.#o.bind(this),this.#n=!1,this.#i=-2}async#o(t){if(this.#i===-2)return;const e=ac(this.#e);e.fromBlock=this.#i+1,e.toBlock=t;const r=await this.#t.getLogs(e);if(r.length===0){this.#i<t-60&&(this.#i=t-60);return}for(const i of r)this.#t.emit(this.#e,i),this.#i=i.blockNumber}start(){this.#n||(this.#n=!0,this.#i===-2&&this.#t.getBlockNumber().then(t=>{this.#i=t}),this.#t.on("block",this.#r))}stop(){this.#n&&(this.#n=!1,this.#t.off("block",this.#r))}pause(t){this.stop(),t&&(this.#i=-2)}resume(){this.start()}}const _m=BigInt(2),fm=10;function Go(n){return n&&typeof n.then=="function"}function Ho(n,t){return n+":"+JSON.stringify(t,(e,r)=>{if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((o,a)=>(o[a]=r[a],o),{})}return r})}class xh{name;constructor(t){St(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function lm(n){return JSON.parse(JSON.stringify(n))}function _c(n){return n=Array.from(new Set(n).values()),n.sort(),n}async function fc(n,t){if(n==null)throw new Error("invalid event");if(Array.isArray(n)&&(n={topics:n}),typeof n=="string")switch(n){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:n,tag:n}}if($t(n,32)){const e=n.toLowerCase();return{type:"transaction",tag:Ho("tx",{hash:e}),hash:e}}if(n.orphan){const e=n;return{type:"orphan",tag:Ho("orphan",e),filter:lm(e)}}if(n.address||n.topics){const e=n,r={topics:(e.topics||[]).map(i=>i==null?null:Array.isArray(i)?_c(i.map(o=>o.toLowerCase())):i.toLowerCase())};if(e.address){const i=[],o=[],a=u=>{$t(u)?i.push(u):o.push((async()=>{i.push(await Re(u,t))})())};Array.isArray(e.address)?e.address.forEach(a):a(e.address),o.length&&await Promise.all(o),r.address=_c(i.map(u=>u.toLowerCase()))}return{filter:r,tag:Ho("event",r),type:"event"}}G(!1,"unknown ProviderEvent","event",n)}function lc(){return new Date().getTime()}const hm={cacheTimeout:250,pollingInterval:4e3};class pm{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#d;constructor(t,e){if(this.#d=Object.assign({},hm,e||{}),t==="any")this.#o=!0,this.#i=null;else if(t){const r=De.from(t);this.#o=!1,this.#i=Promise.resolve(r),setTimeout(()=>{this.emit("network",r,null)},0)}else this.#o=!1,this.#i=null;this.#a=-1,this.#s=new Map,this.#t=new Map,this.#e=new Map,this.#r=null,this.#n=!1,this.#h=1,this.#u=new Map,this.#p=!1}get pollingInterval(){return this.#d.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#e.values())}attachPlugin(t){if(this.#e.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#e.set(t.name,t.connect(this)),this}getPlugin(t){return this.#e.get(t)||null}get disableCcipRead(){return this.#p}set disableCcipRead(t){this.#p=!!t}async#c(t){const e=this.#d.cacheTimeout;if(e<0)return await this._perform(t);const r=Ho(t.method,t);let i=this.#s.get(r);return i||(i=this._perform(t),this.#s.set(r,i),setTimeout(()=>{this.#s.get(r)===i&&this.#s.delete(r)},e)),await i}async ccipReadFetch(t,e,r){if(this.disableCcipRead||r.length===0||t.to==null)return null;const i=t.to.toLowerCase(),o=e.toLowerCase(),a=[];for(let u=0;u<r.length;u++){const _=r[u],l=_.replace("{sender}",i).replace("{data}",o),f=new Ln(l);_.indexOf("{data}")===-1&&(f.body={data:o,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:f,index:u,urls:r});let g="unknown error",y;try{y=await f.send()}catch(v){a.push(v.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:{error:v}});continue}try{const v=y.bodyJson;if(v.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:f,result:v}),v.data;v.message&&(g=v.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:v})}catch{}ut(y.statusCode<400||y.statusCode>=500,`response not found during CCIP fetch: ${g}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:t,info:{url:_,errorMessage:g}}),a.push(g)}ut(!1,`error encountered during CCIP fetch: ${a.map(u=>JSON.stringify(u)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:t,info:{urls:r,errorMessages:a}})}_wrapBlock(t,e){return new O1(Z1(t),this)}_wrapLog(t,e){return new Ms($1(t),this)}_wrapTransactionReceipt(t,e){return new ih(rm(t),this)}_wrapTransactionResponse(t,e){return new js(mh(t),this)}_detectNetwork(){ut(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(t){ut(!1,`unsupported method: ${t.method}`,"UNSUPPORTED_OPERATION",{operation:t.method,info:t})}async getBlockNumber(){const t=Tt(await this.#c({method:"getBlockNumber"}),"%response");return this.#a>=0&&(this.#a=t),t}_getAddress(t){return Re(t,this)}_getBlockTag(t){if(t==null)return"latest";switch(t){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return t}if($t(t))return $t(t,32)?t:tr(t);if(typeof t=="bigint"&&(t=Tt(t,"blockTag")),typeof t=="number")return t>=0?tr(t):this.#a>=0?tr(this.#a+t):this.getBlockNumber().then(e=>tr(e+t));G(!1,"invalid blockTag","blockTag",t)}_getFilter(t){const e=(t.topics||[]).map(_=>_==null?null:Array.isArray(_)?_c(_.map(l=>l.toLowerCase())):_.toLowerCase()),r="blockHash"in t?t.blockHash:void 0,i=(_,l,f)=>{let g;switch(_.length){case 0:break;case 1:g=_[0];break;default:_.sort(),g=_}if(r&&(l!=null||f!=null))throw new Error("invalid filter");const y={};return g&&(y.address=g),e.length&&(y.topics=e),l&&(y.fromBlock=l),f&&(y.toBlock=f),r&&(y.blockHash=r),y};let o=[];if(t.address)if(Array.isArray(t.address))for(const _ of t.address)o.push(this._getAddress(_));else o.push(this._getAddress(t.address));let a;"fromBlock"in t&&(a=this._getBlockTag(t.fromBlock));let u;return"toBlock"in t&&(u=this._getBlockTag(t.toBlock)),o.filter(_=>typeof _!="string").length||a!=null&&typeof a!="string"||u!=null&&typeof u!="string"?Promise.all([Promise.all(o),a,u]).then(_=>i(_[0],_[1],_[2])):i(o,a,u)}_getTransactionRequest(t){const e=No(t),r=[];if(["to","from"].forEach(i=>{if(e[i]==null)return;const o=Re(e[i],this);Go(o)?r.push(async function(){e[i]=await o}()):e[i]=o}),e.blockTag!=null){const i=this._getBlockTag(e.blockTag);Go(i)?r.push(async function(){e.blockTag=await i}()):e.blockTag=i}return r.length?async function(){return await Promise.all(r),e}():e}async getNetwork(){if(this.#i==null){const i=(async()=>{try{const o=await this._detectNetwork();return this.emit("network",o,null),o}catch(o){throw this.#i===i&&(this.#i=null),o}})();return this.#i=i,(await i).clone()}const t=this.#i,[e,r]=await Promise.all([t,this._detectNetwork()]);return e.chainId!==r.chainId&&(this.#o?(this.emit("network",r,e),this.#i===t&&(this.#i=Promise.resolve(r))):ut(!1,`network changed: ${e.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),e.clone()}async getFeeData(){const t=await this.getNetwork(),e=async()=>{const{_block:i,gasPrice:o,priorityFee:a}=await Ee({_block:this.#g("latest",!1),gasPrice:(async()=>{try{const f=await this.#c({method:"getGasPrice"});return Et(f,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const f=await this.#c({method:"getPriorityFee"});return Et(f,"%response")}catch{}return null})()});let u=null,_=null;const l=this._wrapBlock(i,t);return l&&l.baseFeePerGas&&(_=a??BigInt("1000000000"),u=l.baseFeePerGas*_m+_),new nh(o,u,_)},r=t.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new Ln(r.url),o=await r.processFunc(e,this,i);return new nh(o.gasPrice,o.maxFeePerGas,o.maxPriorityFeePerGas)}return await e()}async estimateGas(t){let e=this._getTransactionRequest(t);return Go(e)&&(e=await e),Et(await this.#c({method:"estimateGas",transaction:e}),"%response")}async#_(t,e,r){ut(r<fm,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const i=No(t);try{return gt(await this._perform({method:"call",transaction:i,blockTag:e}))}catch(o){if(!this.disableCcipRead&&fa(o)&&o.data&&r>=0&&e==="latest"&&i.to!=null&&ie(o.data,0,4)==="0x556f1830"){const a=o.data,u=await Re(i.to,this);let _;try{_=bm(ie(o.data,4))}catch(g){ut(!1,g.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:a}})}ut(_.sender.toLowerCase()===u.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:_.errorArgs}});const l=await this.ccipReadFetch(i,_.calldata,_.urls);ut(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:o.data,errorArgs:_.errorArgs}});const f={to:u,data:te([_.selector,ym([l,_.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const g=await this.#_(f,e,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},f),result:g}),g}catch(g){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},f),error:g}),g}}throw o}}async#f(t){const{value:e}=await Ee({network:this.getNetwork(),value:t});return e}async call(t){const{tx:e,blockTag:r}=await Ee({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await this.#f(this.#_(e,r,t.enableCcipRead?0:-1))}async#l(t,e,r){let i=this._getAddress(e),o=this._getBlockTag(r);return(typeof i!="string"||typeof o!="string")&&([i,o]=await Promise.all([i,o])),await this.#f(this.#c(Object.assign(t,{address:i,blockTag:o})))}async getBalance(t,e){return Et(await this.#l({method:"getBalance"},t,e),"%response")}async getTransactionCount(t,e){return Tt(await this.#l({method:"getTransactionCount"},t,e),"%response")}async getCode(t,e){return gt(await this.#l({method:"getCode"},t,e))}async getStorage(t,e,r){const i=Et(e,"position");return gt(await this.#l({method:"getStorage",position:i},t,r))}async broadcastTransaction(t){const{blockNumber:e,hash:r,network:i}=await Ee({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:t}),network:this.getNetwork()}),o=rr.from(t);if(o.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(o,i).replaceableTransaction(e)}async#g(t,e){if($t(t,32))return await this.#c({method:"getBlock",blockHash:t,includeTransactions:e});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await this.#c({method:"getBlock",blockTag:r,includeTransactions:e})}async getBlock(t,e){const{network:r,params:i}=await Ee({network:this.getNetwork(),params:this.#g(t,!!e)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(t){const{network:e,params:r}=await Ee({network:this.getNetwork(),params:this.#c({method:"getTransaction",hash:t})});return r==null?null:this._wrapTransactionResponse(r,e)}async getTransactionReceipt(t){const{network:e,params:r}=await Ee({network:this.getNetwork(),params:this.#c({method:"getTransactionReceipt",hash:t})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await this.#c({method:"getTransaction",hash:t});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,e)}async getTransactionResult(t){const{result:e}=await Ee({network:this.getNetwork(),result:this.#c({method:"getTransactionResult",hash:t})});return e==null?null:gt(e)}async getLogs(t){let e=this._getFilter(t);Go(e)&&(e=await e);const{network:r,params:i}=await Ee({network:this.getNetwork(),params:this.#c({method:"getLogs",filter:e})});return i.map(o=>this._wrapLog(o,r))}_getProvider(t){ut(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(t){return await fs.fromName(this,t)}async getAvatar(t){const e=await this.getResolver(t);return e?await e.getAvatar():null}async resolveName(t){const e=await this.getResolver(t);return e?await e.getAddress():null}async lookupAddress(t){t=Dt(t);const e=$a(t.substring(2).toLowerCase()+".addr.reverse");try{const r=await fs.getEnsAddress(this),o=await new ir(r,["function resolver(bytes32) view returns (address)"],this).resolver(e);if(o==null||o===Fs)return null;const u=await new ir(o,["function name(bytes32) view returns (string)"],this).name(e);return await this.resolveName(u)!==t?null:u}catch(r){if(me(r,"BAD_DATA")&&r.value==="0x"||me(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(t,e,r){const i=e??1;return i===0?this.getTransactionReceipt(t):new Promise(async(o,a)=>{let u=null;const _=async l=>{try{const f=await this.getTransactionReceipt(t);if(f!=null&&l-f.blockNumber+1>=i){o(f),u&&(clearTimeout(u),u=null);return}}catch(f){console.log("EEE",f)}this.once("block",_)};r!=null&&(u=setTimeout(()=>{u!=null&&(u=null,this.off("block",_),a(re("timeout","TIMEOUT",{reason:"timeout"})))},r)),_(await this.getBlockNumber())})}async waitForBlock(t){ut(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(t){const e=this.#u.get(t);e&&(e.timer&&clearTimeout(e.timer),this.#u.delete(t))}_setTimeout(t,e){e==null&&(e=0);const r=this.#h++,i=()=>{this.#u.delete(r),t()};if(this.paused)this.#u.set(r,{timer:null,func:i,time:e});else{const o=setTimeout(i,e);this.#u.set(r,{timer:o,func:i,time:lc()})}return r}_forEachSubscriber(t){for(const e of this.#t.values())t(e.subscriber)}_getSubscriber(t){switch(t.type){case"debug":case"error":case"network":return new xh(t.type);case"block":{const e=new om(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new am(this,t.type);case"event":return new uc(this,t.filter);case"transaction":return new um(this,t.hash);case"orphan":return new cm(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,e){for(const r of this.#t.values())if(r.subscriber===t){r.started&&r.subscriber.stop(),r.subscriber=e,r.started&&e.start(),this.#r!=null&&e.pause(this.#r);break}}async#w(t,e){let r=await fc(t,this);return r.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(r=await fc({orphan:"drop-log",log:e[0]},this)),this.#t.get(r.tag)||null}async#y(t){const e=await fc(t,this),r=e.tag;let i=this.#t.get(r);return i||(i={subscriber:this._getSubscriber(e),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#t.set(r,i)),i}async on(t,e){const r=await this.#y(t);return r.listeners.push({listener:e,once:!1}),r.started||(r.subscriber.start(),r.started=!0,this.#r!=null&&r.subscriber.pause(this.#r)),this}async once(t,e){const r=await this.#y(t);return r.listeners.push({listener:e,once:!0}),r.started||(r.subscriber.start(),r.started=!0,this.#r!=null&&r.subscriber.pause(this.#r)),this}async emit(t,...e){const r=await this.#w(t,e);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:o,once:a})=>{const u=new T_(this,a?null:o,t);try{o.call(this,...e,u)}catch{}return!a}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),this.#t.delete(r.tag)),i>0}async listenerCount(t){if(t){const r=await this.#w(t);return r?r.listeners.length:0}let e=0;for(const{listeners:r}of this.#t.values())e+=r.length;return e}async listeners(t){if(t){const r=await this.#w(t);return r?r.listeners.map(({listener:i})=>i):[]}let e=[];for(const{listeners:r}of this.#t.values())e=e.concat(r.map(({listener:i})=>i));return e}async off(t,e){const r=await this.#w(t);if(!r)return this;if(e){const i=r.listeners.map(({listener:o})=>o).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(!e||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),this.#t.delete(r.tag)),this}async removeAllListeners(t){if(t){const{tag:e,started:r,subscriber:i}=await this.#y(t);r&&i.stop(),this.#t.delete(e)}else for(const[e,{started:r,subscriber:i}]of this.#t)r&&i.stop(),this.#t.delete(e);return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return this.off(t,e)}get destroyed(){return this.#n}destroy(){this.removeAllListeners();for(const t of this.#u.keys())this._clearTimeout(t);this.#n=!0}get paused(){return this.#r!=null}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(this.#a=-1,this.#r!=null){if(this.#r==!!t)return;ut(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(e=>e.pause(t)),this.#r=!!t;for(const e of this.#u.values())e.timer&&clearTimeout(e.timer),e.time=lc()-e.time}resume(){if(this.#r!=null){this._forEachSubscriber(t=>t.resume()),this.#r=null;for(const t of this.#u.values()){let e=t.time;e<0&&(e=0),t.time=lc(),setTimeout(t.func,e)}}}}function dm(n,t){try{const e=hc(n,t);if(e)return fo(e)}catch{}return null}function hc(n,t){if(n==="0x")return null;try{const e=Tt(ie(n,t,t+32)),r=Tt(ie(n,e,e+32));return ie(n,e+32,e+32+r)}catch{}return null}function Rh(n){const t=fe(n);if(t.length>32)throw new Error("internal; should not happen");const e=new Uint8Array(32);return e.set(t,32-t.length),e}function wm(n){if(n.length%32===0)return n;const t=new Uint8Array(Math.ceil(n.length/32)*32);return t.set(n),t}const gm=new Uint8Array([]);function ym(n){const t=[];let e=0;for(let r=0;r<n.length;r++)t.push(gm),e+=32;for(let r=0;r<n.length;r++){const i=zt(n[r]);t[r]=Rh(e),t.push(Rh(i.length)),t.push(wm(i)),e+=32+Math.ceil(i.length/32)*32}return te(t)}const Sh="0x0000000000000000000000000000000000000000000000000000000000000000";function bm(n){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};ut(mi(n)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const e=ie(n,0,32);ut(ie(e,0,12)===ie(Sh,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=ie(e,12);try{const r=[],i=Tt(ie(n,32,64)),o=Tt(ie(n,i,i+32)),a=ie(n,i+32);for(let u=0;u<o;u++){const _=dm(a,u*32);if(_==null)throw new Error("abort");r.push(_)}t.urls=r}catch{ut(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=hc(n,64);if(r==null)throw new Error("abort");t.calldata=r}catch{ut(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}ut(ie(n,100,128)===ie(Sh,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=ie(n,96,100);try{const r=hc(n,128);if(r==null)throw new Error("abort");t.extraData=r}catch{ut(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(r=>t[r]),t}function Ni(n,t){if(n.provider)return n.provider;ut(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function zh(n,t){let e=No(t);if(e.to!=null&&(e.to=Re(e.to,n)),e.from!=null){const r=e.from;e.from=Promise.all([n.getAddress(),Re(r,n)]).then(([i,o])=>(G(i.toLowerCase()===o.toLowerCase(),"transaction from mismatch","tx.from",o),i))}else e.from=n.getAddress();return await Ee(e)}class mm{provider;constructor(t){St(this,{provider:t||null})}async getNonce(t){return Ni(this,"getTransactionCount").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await zh(this,t)}async populateTransaction(t){const e=Ni(this,"populateTransaction"),r=await zh(this,t);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const a=Et(r.chainId);G(a===i.chainId,"transaction chainId mismatch","tx.chainId",t.chainId)}else r.chainId=i.chainId;const o=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||o)?G(!1,"eip-1559 transaction do not support gasPrice","tx",t):(r.type===0||r.type===1)&&o&&G(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",t),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const a=await e.getFeeData();ut(a.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice)}else{const a=await e.getFeeData();if(r.type==null)if(a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,r.gasPrice!=null){const u=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=u,r.maxPriorityFeePerGas=u}else r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else a.gasPrice!=null?(ut(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice),r.type=0):ut(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(r.type===2||r.type===3||r.type===4)&&(r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}return await Ee(r)}async populateAuthorization(t){const e=Object.assign({},t);return e.chainId==null&&(e.chainId=(await Ni(this,"getNetwork").getNetwork()).chainId),e.nonce==null&&(e.nonce=await this.getNonce()),e}async estimateGas(t){return Ni(this,"estimateGas").estimateGas(await this.populateCall(t))}async call(t){return Ni(this,"call").call(await this.populateCall(t))}async resolveName(t){return await Ni(this,"resolveName").resolveName(t)}async sendTransaction(t){const e=Ni(this,"sendTransaction"),r=await this.populateTransaction(t);delete r.from;const i=rr.from(r);return await e.broadcastTransaction(await this.signTransaction(i))}authorize(t){ut(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}function Am(n){return JSON.parse(JSON.stringify(n))}class Bh{#t;#e;#r;#n;#i;#o;constructor(t){this.#t=t,this.#e=null,this.#r=this.#s.bind(this),this.#n=!1,this.#i=null,this.#o=!1}_subscribe(t){throw new Error("subclasses must override this")}_emitResults(t,e){throw new Error("subclasses must override this")}_recover(t){throw new Error("subclasses must override this")}async#s(t){try{this.#e==null&&(this.#e=this._subscribe(this.#t));let e=null;try{e=await this.#e}catch(o){if(!me(o,"UNSUPPORTED_OPERATION")||o.operation!=="eth_newFilter")throw o}if(e==null){this.#e=null,this.#t._recoverSubscriber(this,this._recover(this.#t));return}const r=await this.#t.getNetwork();if(this.#i||(this.#i=r),this.#i.chainId!==r.chainId)throw new Error("chaid changed");if(this.#o)return;const i=await this.#t.send("eth_getFilterChanges",[e]);await this._emitResults(this.#t,i)}catch(e){console.log("@TODO",e)}this.#t.once("block",this.#r)}#a(){const t=this.#e;t&&(this.#e=null,t.then(e=>{this.#t.destroyed||this.#t.send("eth_uninstallFilter",[e])}))}start(){this.#n||(this.#n=!0,this.#s(-2))}stop(){this.#n&&(this.#n=!1,this.#o=!0,this.#a(),this.#t.off("block",this.#r))}pause(t){t&&this.#a(),this.#t.off("block",this.#r)}resume(){this.start()}}class Em extends Bh{#t;constructor(t,e){super(t),this.#t=Am(e)}_recover(t){return new uc(t,this.#t)}async _subscribe(t){return await t.send("eth_newFilter",[this.#t])}async _emitResults(t,e){for(const r of e)t.emit(this.#t,t._wrapLog(r,t._network))}}class vm extends Bh{async _subscribe(t){return await t.send("eth_newPendingTransactionFilter",[])}async _emitResults(t,e){for(const r of e)t.emit("pending",r)}}const xm="bigint,boolean,function,number,string,symbol".split(/,/g);function Vo(n){if(n==null||xm.indexOf(typeof n)>=0||typeof n.getAddress=="function")return n;if(Array.isArray(n))return n.map(Vo);if(typeof n=="object")return Object.keys(n).reduce((t,e)=>(t[e]=n[e],t),{});throw new Error(`should not happen: ${n} (${typeof n})`)}function Rm(n){return new Promise(t=>{setTimeout(t,n)})}function hs(n){return n&&n.toLowerCase()}function kh(n){return n&&typeof n.pollingInterval=="number"}const Ph={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class pc extends mm{address;constructor(t,e){super(t),e=Dt(e),St(this,{address:e})}connect(t){ut(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const e=Vo(t),r=[];if(e.from){const o=e.from;r.push((async()=>{const a=await Re(o,this.provider);G(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),e.from=a})())}else e.from=this.address;if(e.gasLimit==null&&r.push((async()=>{e.gasLimit=await this.provider.estimateGas({...e,from:this.address})})()),e.to!=null){const o=e.to;r.push((async()=>{e.to=await Re(o,this.provider)})())}r.length&&await Promise.all(r);const i=this.provider.getRpcTransaction(e);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(t){const e=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(t);return await new Promise((i,o)=>{const a=[1e3,100];let u=0;const _=async()=>{try{const l=await this.provider.getTransaction(r);if(l!=null){i(l.replaceableTransaction(e));return}}catch(l){if(me(l,"CANCELLED")||me(l,"BAD_DATA")||me(l,"NETWORK_ERROR")||me(l,"UNSUPPORTED_OPERATION")){l.info==null&&(l.info={}),l.info.sendTransactionHash=r,o(l);return}if(me(l,"INVALID_ARGUMENT")&&(u++,l.info==null&&(l.info={}),l.info.sendTransactionHash=r,u>10)){o(l);return}this.provider.emit("error",re("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:l}))}this.provider._setTimeout(()=>{_()},a.pop()||4e3)};_()})}async signTransaction(t){const e=Vo(t);if(e.from){const i=await Re(e.from,this.provider);G(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),e.from=i}else e.from=this.address;const r=this.provider.getRpcTransaction(e);return await this.provider.send("eth_signTransaction",[r])}async signMessage(t){const e=typeof t=="string"?Nn(t):t;return await this.provider.send("personal_sign",[gt(e),this.address.toLowerCase()])}async signTypedData(t,e,r){const i=Vo(r),o=await ke.resolveNames(t,e,i,async a=>{const u=await Re(a);return G(u!=null,"TypedData does not support null address","value",a),u});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ke.getPayload(o.domain,e,o.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const e=typeof t=="string"?Nn(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),gt(e)])}}class Sm extends pm{#t;#e;#r;#n;#i;#o;#s;#a(){if(this.#n)return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");this.#n=setTimeout(()=>{this.#n=null;const e=this.#r;for(this.#r=[];e.length;){const r=[e.shift()];for(;e.length&&r.length!==this.#t.batchMaxCount;)if(r.push(e.shift()),JSON.stringify(r.map(o=>o.payload)).length>this.#t.batchMaxSize){e.unshift(r.pop());break}(async()=>{const i=r.length===1?r[0].payload:r.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:u,payload:_}of r){if(this.destroyed){u(re("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:_.method}));continue}const l=o.filter(f=>f.id===_.id)[0];if(l==null){const f=re("missing response for request","BAD_DATA",{value:o,info:{payload:_}});this.emit("error",f),u(f);continue}if("error"in l){u(this.getRpcError(_,l));continue}a(l.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of r)a(o)}})()}},t)}constructor(t,e){super(t,e),this.#e=1,this.#t=Object.assign({},Ph,e||{}),this.#r=[],this.#n=null,this.#o=null,this.#s=null;{let i=null;const o=new Promise(a=>{i=a});this.#i={promise:o,resolve:i}}const r=this._getOption("staticNetwork");typeof r=="boolean"?(G(!r||t!=="any","staticNetwork cannot be used on special network 'any'","options",e),r&&t!=null&&(this.#o=De.from(t))):r&&(G(t==null||r.matches(t),"staticNetwork MUST match network object","options",e),this.#o=r)}_getOption(t){return this.#t[t]}get _network(){return ut(this.#o,"network is not available yet","NETWORK_ERROR"),this.#o}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&Et(r.type)&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},r,{type:void 0})}))}}const e=this.getRpcRequest(t);return e!=null?await this.send(e.method,e.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)if(t===!0){if(this.#o)return this.#o}else return t;return this.#s?await this.#s:this.ready?(this.#s=(async()=>{try{const e=De.from(Et(await this.send("eth_chainId",[])));return this.#s=null,e}catch(e){throw this.#s=null,e}})(),await this.#s):(this.#s=(async()=>{const e={id:this.#e++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:e});let r;try{r=(await this._send(e))[0],this.#s=null}catch(i){throw this.#s=null,this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:r}),"result"in r)return De.from(Et(r.result));throw this.getRpcError(e,r)})(),await this.#s)}_start(){this.#i==null||this.#i.resolve==null||(this.#i.resolve(),this.#i=null,(async()=>{for(;this.#o==null&&!this.destroyed;)try{this.#o=await this._detectNetwork()}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",re("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await Rm(1e3)}this.#a()})())}async _waitUntilReady(){if(this.#i!=null)return await this.#i.promise}_getSubscriber(t){return t.type==="pending"?new vm(this):t.type==="event"?this._getOption("polling")?new uc(this,t.filter):new Em(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new xh("orphan"):super._getSubscriber(t)}get ready(){return this.#i==null}getRpcTransaction(t){const e={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(r=>{if(t[r]==null)return;let i=r;r==="gasLimit"&&(i="gas"),e[i]=tr(Et(t[r],`tx.${r}`))}),["from","to","data"].forEach(r=>{t[r]!=null&&(e[r]=gt(t[r]))}),t.accessList&&(e.accessList=Ri(t.accessList)),t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.map(r=>r.toLowerCase())),t.authorizationList&&(e.authorizationList=t.authorizationList.map(r=>{const i=$f(r);return{address:i.address,nonce:tr(i.nonce),chainId:tr(i.chainId),yParity:tr(i.signature.yParity),r:tr(i.signature.r),s:tr(i.signature.s)}})),e}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[hs(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[hs(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[hs(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[hs(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(hs):t.filter.address=hs(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,e){const{method:r}=t,{error:i}=e;if(r==="eth_estimateGas"&&i.message){const u=i.message;if(!u.match(/revert/i)&&u.match(/insufficient funds/i))return re("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:i}});if(u.match(/nonce/i)&&u.match(/too low/i))return re("nonce has already been used","NONCE_EXPIRED",{transaction:t.params[0],info:{payload:t,error:i}})}if(r==="eth_call"||r==="eth_estimateGas"){const u=dc(i),_=hi.getBuiltinCallException(r==="eth_call"?"call":"estimateGas",t.params[0],u?u.data:null);return _.info={error:i,payload:t},_}const o=JSON.stringify(Bm(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return re("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[r]||"unknown",reason:"rejected",info:{payload:t,error:i}});if(r==="eth_sendRawTransaction"||r==="eth_sendTransaction"){const u=t.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return re("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:u,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return re("nonce has already been used","NONCE_EXPIRED",{transaction:u,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return re("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:u,info:{error:i}});if(o.match(/only replay-protected/i))return re("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:u,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?re("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:i,payload:t}}):re("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:t})}send(t,e){if(this.destroyed)return Promise.reject(re("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const r=this.#e++,i=new Promise((o,a)=>{this.#r.push({resolve:o,reject:a,payload:{method:t,params:e,id:r,jsonrpc:"2.0"}})});return this.#a(),i}async getSigner(t){t==null&&(t=0);const e=this.send("eth_accounts",[]);if(typeof t=="number"){const i=await e;if(t>=i.length)throw new Error("no such account");return new pc(this,i[t])}const{accounts:r}=await Ee({network:this.getNetwork(),accounts:e});t=Dt(t);for(const i of r)if(Dt(i)===t)return new pc(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new pc(this,e))}destroy(){this.#n&&(clearTimeout(this.#n),this.#n=null);for(const{payload:t,reject:e}of this.#r)e(re("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));this.#r=[],super.destroy()}}class Ih extends Sm{#t;constructor(t,e){super(t,e);let r=this._getOption("pollingInterval");r==null&&(r=Ph.pollingInterval),this.#t=r}_getSubscriber(t){const e=super._getSubscriber(t);return kh(e)&&(e.pollingInterval=this.#t),e}get pollingInterval(){return this.#t}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");this.#t=t,this._forEachSubscriber(e=>{kh(e)&&(e.pollingInterval=this.#t)})}}class zm extends Ih{#t;constructor(t,e,r){t==null&&(t="http://localhost:8545"),super(e,r),typeof t=="string"?this.#t=new Ln(t):this.#t=t.clone()}_getConnection(){return this.#t.clone()}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){const e=this._getConnection();e.body=JSON.stringify(t),e.setHeader("content-type","application/json");const r=await e.send();r.assertOk();let i=r.bodyJson;return Array.isArray(i)||(i=[i]),i}}function dc(n){if(n==null)return null;if(typeof n.message=="string"&&n.message.match(/revert/i)&&$t(n.data))return{message:n.message,data:n.data};if(typeof n=="object"){for(const t in n){const e=dc(n[t]);if(e)return e}return null}if(typeof n=="string")try{return dc(JSON.parse(n))}catch{}return null}function wc(n,t){if(n!=null){if(typeof n.message=="string"&&t.push(n.message),typeof n=="object")for(const e in n)wc(n[e],t);if(typeof n=="string")try{return wc(JSON.parse(n),t)}catch{}}}function Bm(n){const t=[];return wc(n,t),t}class Li extends Ih{#t;#e;constructor(t,e,r){const i=Object.assign({},r??{},{batchMaxCount:1});G(t&&t.request,"invalid EIP-1193 provider","ethereum",t),super(e,i),this.#e=null,r&&r.providerInfo&&(this.#e=r.providerInfo),this.#t=async(o,a)=>{const u={method:o,params:a};this.emit("debug",{action:"sendEip1193Request",payload:u});try{const _=await t.request(u);return this.emit("debug",{action:"receiveEip1193Result",result:_}),_}catch(_){const l=new Error(_.message);throw l.code=_.code,l.data=_.data,l.payload=u,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}}}get providerInfo(){return this.#e}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){G(!Array.isArray(t),"EIP-1193 does not support batch request","payload",t);try{const e=await this.#t(t.method,t.params||[]);return[{id:t.id,result:e}]}catch(e){return[{id:t.id,error:{code:e.code,data:e.data,message:e.message}}]}}getRpcError(t,e){switch(e=JSON.parse(JSON.stringify(e)),e.error.code||-1){case 4001:e.error.message=`ethers-user-denied: ${e.error.message}`;break;case 4200:e.error.message=`ethers-unsupported: ${e.error.message}`;break}return super.getRpcError(t,e)}async hasSigner(t){t==null&&(t=0);const e=await this.send("eth_accounts",[]);return typeof t=="number"?e.length>t:(t=t.toLowerCase(),e.filter(r=>r.toLowerCase()===t).length!==0)}async getSigner(t){if(t==null&&(t=0),!await this.hasSigner(t))try{await this.#t("eth_requestAccounts",[])}catch(e){const r=e.payload;throw this.getRpcError(r,{id:r.id,error:e})}return await super.getSigner(t)}static async discover(t){if(t==null&&(t={}),t.provider)return new Li(t.provider);const e=t.window?t.window:typeof window<"u"?window:null;if(e==null)return null;const r=t.anyProvider;if(r&&e.ethereum)return new Li(e.ethereum);if(!("addEventListener"in e&&"dispatchEvent"in e&&"removeEventListener"in e))return null;const i=t.timeout?t.timeout:300;return i===0?null:await new Promise((o,a)=>{let u=[];const _=g=>{u.push(g.detail),r&&l()},l=()=>{if(clearTimeout(f),u.length)if(t&&t.filter){const g=t.filter(u.map(y=>Object.assign({},y.info)));if(g==null)o(null);else if(g instanceof Li)o(g);else{let y=null;if(g.uuid&&(y=u.filter(I=>g.uuid===I.info.uuid)[0]),y){const{provider:v,info:I}=y;o(new Li(v,void 0,{providerInfo:I}))}else a(re("filter returned unknown info","UNSUPPORTED_OPERATION",{value:g}))}}else{const{provider:g,info:y}=u[0];o(new Li(g,void 0,{providerInfo:y}))}else o(null);e.removeEventListener("eip6963:announceProvider",_)},f=setTimeout(()=>{l()},i);e.addEventListener("eip6963:announceProvider",_),e.dispatchEvent(new Event("eip6963:requestProvider"))})}}var pi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var qo={exports:{}};function km(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Oh={exports:{}},ue=Oh.exports={},jn,Gn;function gc(){throw new Error("setTimeout has not been defined")}function yc(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?jn=setTimeout:jn=gc}catch{jn=gc}try{typeof clearTimeout=="function"?Gn=clearTimeout:Gn=yc}catch{Gn=yc}})();function Th(n){if(jn===setTimeout)return setTimeout(n,0);if((jn===gc||!jn)&&setTimeout)return jn=setTimeout,setTimeout(n,0);try{return jn(n,0)}catch{try{return jn.call(null,n,0)}catch{return jn.call(this,n,0)}}}function Pm(n){if(Gn===clearTimeout)return clearTimeout(n);if((Gn===yc||!Gn)&&clearTimeout)return Gn=clearTimeout,clearTimeout(n);try{return Gn(n)}catch{try{return Gn.call(null,n)}catch{return Gn.call(this,n)}}}var ri=[],ps=!1,Di,Qo=-1;function Im(){!ps||!Di||(ps=!1,Di.length?ri=Di.concat(ri):Qo=-1,ri.length&&Ch())}function Ch(){if(!ps){var n=Th(Im);ps=!0;for(var t=ri.length;t;){for(Di=ri,ri=[];++Qo<t;)Di&&Di[Qo].run();Qo=-1,t=ri.length}Di=null,ps=!1,Pm(n)}}ue.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ri.push(new Nh(n,t)),ri.length===1&&!ps&&Th(Ch)};function Nh(n,t){this.fun=n,this.array=t}Nh.prototype.run=function(){this.fun.apply(null,this.array)},ue.title="browser",ue.browser=!0,ue.env={},ue.argv=[],ue.version="",ue.versions={};function ni(){}ue.on=ni,ue.addListener=ni,ue.once=ni,ue.off=ni,ue.removeListener=ni,ue.removeAllListeners=ni,ue.emit=ni,ue.prependListener=ni,ue.prependOnceListener=ni,ue.listeners=function(n){return[]},ue.binding=function(n){throw new Error("process.binding is not supported")},ue.cwd=function(){return"/"},ue.chdir=function(n){throw new Error("process.chdir is not supported")},ue.umask=function(){return 0};var Fm=Oh.exports;const Ct=km(Fm);var Ko={exports:{}},Lh;function Dh(){if(Lh)return Ko.exports;Lh=1;var n=typeof Reflect=="object"?Reflect:null,t=n&&typeof n.apply=="function"?n.apply:function(O,C,N){return Function.prototype.apply.call(O,C,N)},e;n&&typeof n.ownKeys=="function"?e=n.ownKeys:Object.getOwnPropertySymbols?e=function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:e=function(O){return Object.getOwnPropertyNames(O)};function r(z){console&&console.warn&&console.warn(z)}var i=Number.isNaN||function(O){return O!==O};function o(){o.init.call(this)}Ko.exports=o,Ko.exports.once=E,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function u(z){if(typeof z!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof z)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(z){if(typeof z!="number"||z<0||i(z))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+z+".");a=z}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||i(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this};function _(z){return z._maxListeners===void 0?o.defaultMaxListeners:z._maxListeners}o.prototype.getMaxListeners=function(){return _(this)},o.prototype.emit=function(O){for(var C=[],N=1;N<arguments.length;N++)C.push(arguments[N]);var D=O==="error",$=this._events;if($!==void 0)D=D&&$.error===void 0;else if(!D)return!1;if(D){var et;if(C.length>0&&(et=C[0]),et instanceof Error)throw et;var ft=new Error("Unhandled error."+(et?" ("+et.message+")":""));throw ft.context=et,ft}var L=$[O];if(L===void 0)return!1;if(typeof L=="function")t(L,this,C);else for(var vt=L.length,wt=I(L,vt),N=0;N<vt;++N)t(wt[N],this,C);return!0};function l(z,O,C,N){var D,$,et;if(u(C),$=z._events,$===void 0?($=z._events=Object.create(null),z._eventsCount=0):($.newListener!==void 0&&(z.emit("newListener",O,C.listener?C.listener:C),$=z._events),et=$[O]),et===void 0)et=$[O]=C,++z._eventsCount;else if(typeof et=="function"?et=$[O]=N?[C,et]:[et,C]:N?et.unshift(C):et.push(C),D=_(z),D>0&&et.length>D&&!et.warned){et.warned=!0;var ft=new Error("Possible EventEmitter memory leak detected. "+et.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");ft.name="MaxListenersExceededWarning",ft.emitter=z,ft.type=O,ft.count=et.length,r(ft)}return z}o.prototype.addListener=function(O,C){return l(this,O,C,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(O,C){return l(this,O,C,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(z,O,C){var N={fired:!1,wrapFn:void 0,target:z,type:O,listener:C},D=f.bind(N);return D.listener=C,N.wrapFn=D,D}o.prototype.once=function(O,C){return u(C),this.on(O,g(this,O,C)),this},o.prototype.prependOnceListener=function(O,C){return u(C),this.prependListener(O,g(this,O,C)),this},o.prototype.removeListener=function(O,C){var N,D,$,et,ft;if(u(C),D=this._events,D===void 0)return this;if(N=D[O],N===void 0)return this;if(N===C||N.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete D[O],D.removeListener&&this.emit("removeListener",O,N.listener||C));else if(typeof N!="function"){for($=-1,et=N.length-1;et>=0;et--)if(N[et]===C||N[et].listener===C){ft=N[et].listener,$=et;break}if($<0)return this;$===0?N.shift():k(N,$),N.length===1&&(D[O]=N[0]),D.removeListener!==void 0&&this.emit("removeListener",O,ft||C)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(O){var C,N,D;if(N=this._events,N===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[O]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete N[O]),this;if(arguments.length===0){var $=Object.keys(N),et;for(D=0;D<$.length;++D)et=$[D],et!=="removeListener"&&this.removeAllListeners(et);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(C=N[O],typeof C=="function")this.removeListener(O,C);else if(C!==void 0)for(D=C.length-1;D>=0;D--)this.removeListener(O,C[D]);return this};function y(z,O,C){var N=z._events;if(N===void 0)return[];var D=N[O];return D===void 0?[]:typeof D=="function"?C?[D.listener||D]:[D]:C?T(D):I(D,D.length)}o.prototype.listeners=function(O){return y(this,O,!0)},o.prototype.rawListeners=function(O){return y(this,O,!1)},o.listenerCount=function(z,O){return typeof z.listenerCount=="function"?z.listenerCount(O):v.call(z,O)},o.prototype.listenerCount=v;function v(z){var O=this._events;if(O!==void 0){var C=O[z];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function I(z,O){for(var C=new Array(O),N=0;N<O;++N)C[N]=z[N];return C}function k(z,O){for(;O+1<z.length;O++)z[O]=z[O+1];z.pop()}function T(z){for(var O=new Array(z.length),C=0;C<O.length;++C)O[C]=z[C].listener||z[C];return O}function E(z,O){return new Promise(function(C,N){function D(et){z.removeListener(O,$),N(et)}function $(){typeof z.removeListener=="function"&&z.removeListener("error",D),C([].slice.call(arguments))}B(z,O,$,{once:!0}),O!=="error"&&R(z,D,{once:!0})})}function R(z,O,C){typeof z.on=="function"&&B(z,"error",O,C)}function B(z,O,C,N){if(typeof z.on=="function")N.once?z.once(O,C):z.on(O,C);else if(typeof z.addEventListener=="function")z.addEventListener(O,function D($){N.once&&z.removeEventListener(O,D),C($)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof z)}return Ko.exports}var bc,Uh;function Mh(){return Uh||(Uh=1,bc=Dh().EventEmitter),bc}var mc={},jh;function Wo(){return jh||(jh=1,function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},e={};e.byteLength=f,e.toByteArray=y,e.fromByteArray=k;for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,_=a.length;u<_;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;i[45]=62,i[95]=63;function l(R){var B=R.length;if(B%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var z=R.indexOf("=");z===-1&&(z=B);var O=z===B?0:4-z%4;return[z,O]}function f(R){var B=l(R),z=B[0],O=B[1];return(z+O)*3/4-O}function g(R,B,z){return(B+z)*3/4-z}function y(R){var B,z=l(R),O=z[0],C=z[1],N=new o(g(R,O,C)),D=0,$=C>0?O-4:O,et;for(et=0;et<$;et+=4)B=i[R.charCodeAt(et)]<<18|i[R.charCodeAt(et+1)]<<12|i[R.charCodeAt(et+2)]<<6|i[R.charCodeAt(et+3)],N[D++]=B>>16&255,N[D++]=B>>8&255,N[D++]=B&255;return C===2&&(B=i[R.charCodeAt(et)]<<2|i[R.charCodeAt(et+1)]>>4,N[D++]=B&255),C===1&&(B=i[R.charCodeAt(et)]<<10|i[R.charCodeAt(et+1)]<<4|i[R.charCodeAt(et+2)]>>2,N[D++]=B>>8&255,N[D++]=B&255),N}function v(R){return r[R>>18&63]+r[R>>12&63]+r[R>>6&63]+r[R&63]}function I(R,B,z){for(var O,C=[],N=B;N<z;N+=3)O=(R[N]<<16&16711680)+(R[N+1]<<8&65280)+(R[N+2]&255),C.push(v(O));return C.join("")}function k(R){for(var B,z=R.length,O=z%3,C=[],N=16383,D=0,$=z-O;D<$;D+=N)C.push(I(R,D,D+N>$?$:D+N));return O===1?(B=R[z-1],C.push(r[B>>2]+r[B<<4&63]+"==")):O===2&&(B=(R[z-2]<<8)+R[z-1],C.push(r[B>>10]+r[B>>4&63]+r[B<<2&63]+"=")),C.join("")}var T={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */T.read=function(R,B,z,O,C){var N,D,$=C*8-O-1,et=(1<<$)-1,ft=et>>1,L=-7,vt=z?C-1:0,wt=z?-1:1,at=R[B+vt];for(vt+=wt,N=at&(1<<-L)-1,at>>=-L,L+=$;L>0;N=N*256+R[B+vt],vt+=wt,L-=8);for(D=N&(1<<-L)-1,N>>=-L,L+=O;L>0;D=D*256+R[B+vt],vt+=wt,L-=8);if(N===0)N=1-ft;else{if(N===et)return D?NaN:(at?-1:1)*(1/0);D=D+Math.pow(2,O),N=N-ft}return(at?-1:1)*D*Math.pow(2,N-O)},T.write=function(R,B,z,O,C,N){var D,$,et,ft=N*8-C-1,L=(1<<ft)-1,vt=L>>1,wt=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,at=O?0:N-1,pt=O?1:-1,mt=B<0||B===0&&1/B<0?1:0;for(B=Math.abs(B),isNaN(B)||B===1/0?($=isNaN(B)?1:0,D=L):(D=Math.floor(Math.log(B)/Math.LN2),B*(et=Math.pow(2,-D))<1&&(D--,et*=2),D+vt>=1?B+=wt/et:B+=wt*Math.pow(2,1-vt),B*et>=2&&(D++,et/=2),D+vt>=L?($=0,D=L):D+vt>=1?($=(B*et-1)*Math.pow(2,C),D=D+vt):($=B*Math.pow(2,vt-1)*Math.pow(2,C),D=0));C>=8;R[z+at]=$&255,at+=pt,$/=256,C-=8);for(D=D<<C|$,ft+=C;ft>0;R[z+at]=D&255,at+=pt,D/=256,ft-=8);R[z+at-pt]|=mt*128};/*!
7
7
  * The buffer module from node.js, for the browser.
8
8
  *
9
9
  * @author Feross Aboukhadijeh <https://feross.org>
10
10
  * @license MIT
11
- */(function(R){const B=e,z=T,O=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=D,R.SlowBuffer=Z,R.INSPECT_MAX_BYTES=50;const C=2147483647;R.kMaxLength=C;const{Uint8Array:N,ArrayBuffer:L,SharedArrayBuffer:J}=globalThis;D.TYPED_ARRAY_SUPPORT=nt(),!D.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function nt(){try{const m=new N(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,N.prototype),Object.setPrototypeOf(m,p),m.foo()===42}catch{return!1}}Object.defineProperty(D.prototype,"parent",{enumerable:!0,get:function(){if(D.isBuffer(this))return this.buffer}}),Object.defineProperty(D.prototype,"offset",{enumerable:!0,get:function(){if(D.isBuffer(this))return this.byteOffset}});function dt(m){if(m>C)throw new RangeError('The value "'+m+'" is invalid for option "size"');const p=new N(m);return Object.setPrototypeOf(p,D.prototype),p}function D(m,p,w){if(typeof m=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ht(m)}return vt(m,p,w)}D.poolSize=8192;function vt(m,p,w){if(typeof m=="string")return mt(m,p);if(L.isView(m))return xt(m);if(m==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m);if(Oe(m,L)||m&&Oe(m.buffer,L)||typeof J<"u"&&(Oe(m,J)||m&&Oe(m.buffer,J)))return kt(m,p,w);if(typeof m=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const I=m.valueOf&&m.valueOf();if(I!=null&&I!==m)return D.from(I,p,w);const H=jt(m);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof m[Symbol.toPrimitive]=="function")return D.from(m[Symbol.toPrimitive]("string"),p,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m)}D.from=function(m,p,w){return vt(m,p,w)},Object.setPrototypeOf(D.prototype,N.prototype),Object.setPrototypeOf(D,N);function wt(m){if(typeof m!="number")throw new TypeError('"size" argument must be of type number');if(m<0)throw new RangeError('The value "'+m+'" is invalid for option "size"')}function at(m,p,w){return wt(m),m<=0?dt(m):p!==void 0?typeof w=="string"?dt(m).fill(p,w):dt(m).fill(p):dt(m)}D.alloc=function(m,p,w){return at(m,p,w)};function ht(m){return wt(m),dt(m<0?0:W(m)|0)}D.allocUnsafe=function(m){return ht(m)},D.allocUnsafeSlow=function(m){return ht(m)};function mt(m,p){if((typeof p!="string"||p==="")&&(p="utf8"),!D.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const w=rt(m,p)|0;let I=dt(w);const H=I.write(m,p);return H!==w&&(I=I.slice(0,H)),I}function Rt(m){const p=m.length<0?0:W(m.length)|0,w=dt(p);for(let I=0;I<p;I+=1)w[I]=m[I]&255;return w}function xt(m){if(Oe(m,N)){const p=new N(m);return kt(p.buffer,p.byteOffset,p.byteLength)}return Rt(m)}function kt(m,p,w){if(p<0||m.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(m.byteLength<p+(w||0))throw new RangeError('"length" is outside of buffer bounds');let I;return p===void 0&&w===void 0?I=new N(m):w===void 0?I=new N(m,p):I=new N(m,p,w),Object.setPrototypeOf(I,D.prototype),I}function jt(m){if(D.isBuffer(m)){const p=W(m.length)|0,w=dt(p);return w.length===0||m.copy(w,0,0,p),w}if(m.length!==void 0)return typeof m.length!="number"||Ki(m.length)?dt(0):Rt(m);if(m.type==="Buffer"&&Array.isArray(m.data))return Rt(m.data)}function W(m){if(m>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return m|0}function Z(m){return+m!=m&&(m=0),D.alloc(+m)}D.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==D.prototype},D.compare=function(p,w){if(Oe(p,N)&&(p=D.from(p,p.offset,p.byteLength)),Oe(w,N)&&(w=D.from(w,w.offset,w.byteLength)),!D.isBuffer(p)||!D.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===w)return 0;let I=p.length,H=w.length;for(let Y=0,ot=Math.min(I,H);Y<ot;++Y)if(p[Y]!==w[Y]){I=p[Y],H=w[Y];break}return I<H?-1:H<I?1:0},D.isEncoding=function(p){switch(String(p).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}},D.concat=function(p,w){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return D.alloc(0);let I;if(w===void 0)for(w=0,I=0;I<p.length;++I)w+=p[I].length;const H=D.allocUnsafe(w);let Y=0;for(I=0;I<p.length;++I){let ot=p[I];if(Oe(ot,N))Y+ot.length>H.length?(D.isBuffer(ot)||(ot=D.from(ot)),ot.copy(H,Y)):N.prototype.set.call(H,ot,Y);else if(D.isBuffer(ot))ot.copy(H,Y);else throw new TypeError('"list" argument must be an Array of Buffers');Y+=ot.length}return H};function rt(m,p){if(D.isBuffer(m))return m.length;if(L.isView(m)||Oe(m,L))return m.byteLength;if(typeof m!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof m);const w=m.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&w===0)return 0;let H=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Vt(m).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Dt(m).length;default:if(H)return I?-1:Vt(m).length;p=(""+p).toLowerCase(),H=!0}}D.byteLength=rt;function gt(m,p,w){let I=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,p>>>=0,w<=p))return"";for(m||(m="utf8");;)switch(m){case"hex":return de(this,p,w);case"utf8":case"utf-8":return zt(this,p,w);case"ascii":return pe(this,p,w);case"latin1":case"binary":return it(this,p,w);case"base64":return ft(this,p,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,p,w);default:if(I)throw new TypeError("Unknown encoding: "+m);m=(m+"").toLowerCase(),I=!0}}D.prototype._isBuffer=!0;function G(m,p,w){const I=m[p];m[p]=m[w],m[w]=I}D.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<p;w+=2)G(this,w,w+1);return this},D.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<p;w+=4)G(this,w,w+3),G(this,w+1,w+2);return this},D.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<p;w+=8)G(this,w,w+7),G(this,w+1,w+6),G(this,w+2,w+5),G(this,w+3,w+4);return this},D.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?zt(this,0,p):gt.apply(this,arguments)},D.prototype.toLocaleString=D.prototype.toString,D.prototype.equals=function(p){if(!D.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:D.compare(this,p)===0},D.prototype.inspect=function(){let p="";const w=R.INSPECT_MAX_BYTES;return p=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(p+=" ... "),"<Buffer "+p+">"},O&&(D.prototype[O]=D.prototype.inspect),D.prototype.compare=function(p,w,I,H,Y){if(Oe(p,N)&&(p=D.from(p,p.offset,p.byteLength)),!D.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(w===void 0&&(w=0),I===void 0&&(I=p?p.length:0),H===void 0&&(H=0),Y===void 0&&(Y=this.length),w<0||I>p.length||H<0||Y>this.length)throw new RangeError("out of range index");if(H>=Y&&w>=I)return 0;if(H>=Y)return-1;if(w>=I)return 1;if(w>>>=0,I>>>=0,H>>>=0,Y>>>=0,this===p)return 0;let ot=Y-H,Ft=I-w;const Zt=Math.min(ot,Ft),Jt=this.slice(H,Y),Xt=p.slice(w,I);for(let Ht=0;Ht<Zt;++Ht)if(Jt[Ht]!==Xt[Ht]){ot=Jt[Ht],Ft=Xt[Ht];break}return ot<Ft?-1:Ft<ot?1:0};function M(m,p,w,I,H){if(m.length===0)return-1;if(typeof w=="string"?(I=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,Ki(w)&&(w=H?0:m.length-1),w<0&&(w=m.length+w),w>=m.length){if(H)return-1;w=m.length-1}else if(w<0)if(H)w=0;else return-1;if(typeof p=="string"&&(p=D.from(p,I)),D.isBuffer(p))return p.length===0?-1:X(m,p,w,I,H);if(typeof p=="number")return p=p&255,typeof N.prototype.indexOf=="function"?H?N.prototype.indexOf.call(m,p,w):N.prototype.lastIndexOf.call(m,p,w):X(m,[p],w,I,H);throw new TypeError("val must be string, number or Buffer")}function X(m,p,w,I,H){let Y=1,ot=m.length,Ft=p.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(m.length<2||p.length<2)return-1;Y=2,ot/=2,Ft/=2,w/=2}function Zt(Xt,Ht){return Y===1?Xt[Ht]:Xt.readUInt16BE(Ht*Y)}let Jt;if(H){let Xt=-1;for(Jt=w;Jt<ot;Jt++)if(Zt(m,Jt)===Zt(p,Xt===-1?0:Jt-Xt)){if(Xt===-1&&(Xt=Jt),Jt-Xt+1===Ft)return Xt*Y}else Xt!==-1&&(Jt-=Jt-Xt),Xt=-1}else for(w+Ft>ot&&(w=ot-Ft),Jt=w;Jt>=0;Jt--){let Xt=!0;for(let Ht=0;Ht<Ft;Ht++)if(Zt(m,Jt+Ht)!==Zt(p,Ht)){Xt=!1;break}if(Xt)return Jt}return-1}D.prototype.includes=function(p,w,I){return this.indexOf(p,w,I)!==-1},D.prototype.indexOf=function(p,w,I){return M(this,p,w,I,!0)},D.prototype.lastIndexOf=function(p,w,I){return M(this,p,w,I,!1)};function ct(m,p,w,I){w=Number(w)||0;const H=m.length-w;I?(I=Number(I),I>H&&(I=H)):I=H;const Y=p.length;I>Y/2&&(I=Y/2);let ot;for(ot=0;ot<I;++ot){const Ft=parseInt(p.substr(ot*2,2),16);if(Ki(Ft))return ot;m[w+ot]=Ft}return ot}function _t(m,p,w,I){return yi(Vt(p,m.length-w),m,w,I)}function x(m,p,w,I){return yi(qt(p),m,w,I)}function S(m,p,w,I){return yi(Dt(p),m,w,I)}function et(m,p,w,I){return yi(Wt(p,m.length-w),m,w,I)}D.prototype.write=function(p,w,I,H){if(w===void 0)H="utf8",I=this.length,w=0;else if(I===void 0&&typeof w=="string")H=w,I=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(I)?(I=I>>>0,H===void 0&&(H="utf8")):(H=I,I=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Y=this.length-w;if((I===void 0||I>Y)&&(I=Y),p.length>0&&(I<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let ot=!1;for(;;)switch(H){case"hex":return ct(this,p,w,I);case"utf8":case"utf-8":return _t(this,p,w,I);case"ascii":case"latin1":case"binary":return x(this,p,w,I);case"base64":return S(this,p,w,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,p,w,I);default:if(ot)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),ot=!0}},D.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ft(m,p,w){return p===0&&w===m.length?B.fromByteArray(m):B.fromByteArray(m.slice(p,w))}function zt(m,p,w){w=Math.min(m.length,w);const I=[];let H=p;for(;H<w;){const Y=m[H];let ot=null,Ft=Y>239?4:Y>223?3:Y>191?2:1;if(H+Ft<=w){let Zt,Jt,Xt,Ht;switch(Ft){case 1:Y<128&&(ot=Y);break;case 2:Zt=m[H+1],(Zt&192)===128&&(Ht=(Y&31)<<6|Zt&63,Ht>127&&(ot=Ht));break;case 3:Zt=m[H+1],Jt=m[H+2],(Zt&192)===128&&(Jt&192)===128&&(Ht=(Y&15)<<12|(Zt&63)<<6|Jt&63,Ht>2047&&(Ht<55296||Ht>57343)&&(ot=Ht));break;case 4:Zt=m[H+1],Jt=m[H+2],Xt=m[H+3],(Zt&192)===128&&(Jt&192)===128&&(Xt&192)===128&&(Ht=(Y&15)<<18|(Zt&63)<<12|(Jt&63)<<6|Xt&63,Ht>65535&&Ht<1114112&&(ot=Ht))}}ot===null?(ot=65533,Ft=1):ot>65535&&(ot-=65536,I.push(ot>>>10&1023|55296),ot=56320|ot&1023),I.push(ot),H+=Ft}return Bt(I)}const bt=4096;function Bt(m){const p=m.length;if(p<=bt)return String.fromCharCode.apply(String,m);let w="",I=0;for(;I<p;)w+=String.fromCharCode.apply(String,m.slice(I,I+=bt));return w}function pe(m,p,w){let I="";w=Math.min(m.length,w);for(let H=p;H<w;++H)I+=String.fromCharCode(m[H]&127);return I}function it(m,p,w){let I="";w=Math.min(m.length,w);for(let H=p;H<w;++H)I+=String.fromCharCode(m[H]);return I}function de(m,p,w){const I=m.length;(!p||p<0)&&(p=0),(!w||w<0||w>I)&&(w=I);let H="";for(let Y=p;Y<w;++Y)H+=so[m[Y]];return H}function we(m,p,w){const I=m.slice(p,w);let H="";for(let Y=0;Y<I.length-1;Y+=2)H+=String.fromCharCode(I[Y]+I[Y+1]*256);return H}D.prototype.slice=function(p,w){const I=this.length;p=~~p,w=w===void 0?I:~~w,p<0?(p+=I,p<0&&(p=0)):p>I&&(p=I),w<0?(w+=I,w<0&&(w=0)):w>I&&(w=I),w<p&&(w=p);const H=this.subarray(p,w);return Object.setPrototypeOf(H,D.prototype),H};function Gt(m,p,w){if(m%1!==0||m<0)throw new RangeError("offset is not uint");if(m+p>w)throw new RangeError("Trying to access beyond buffer length")}D.prototype.readUintLE=D.prototype.readUIntLE=function(p,w,I){p=p>>>0,w=w>>>0,I||Gt(p,w,this.length);let H=this[p],Y=1,ot=0;for(;++ot<w&&(Y*=256);)H+=this[p+ot]*Y;return H},D.prototype.readUintBE=D.prototype.readUIntBE=function(p,w,I){p=p>>>0,w=w>>>0,I||Gt(p,w,this.length);let H=this[p+--w],Y=1;for(;w>0&&(Y*=256);)H+=this[p+--w]*Y;return H},D.prototype.readUint8=D.prototype.readUInt8=function(p,w){return p=p>>>0,w||Gt(p,1,this.length),this[p]},D.prototype.readUint16LE=D.prototype.readUInt16LE=function(p,w){return p=p>>>0,w||Gt(p,2,this.length),this[p]|this[p+1]<<8},D.prototype.readUint16BE=D.prototype.readUInt16BE=function(p,w){return p=p>>>0,w||Gt(p,2,this.length),this[p]<<8|this[p+1]},D.prototype.readUint32LE=D.prototype.readUInt32LE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},D.prototype.readUint32BE=D.prototype.readUInt32BE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},D.prototype.readBigUInt64LE=Ye(function(p){p=p>>>0,U(p,"offset");const w=this[p],I=this[p+7];(w===void 0||I===void 0)&&$(p,this.length-8);const H=w+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,Y=this[++p]+this[++p]*2**8+this[++p]*2**16+I*2**24;return BigInt(H)+(BigInt(Y)<<BigInt(32))}),D.prototype.readBigUInt64BE=Ye(function(p){p=p>>>0,U(p,"offset");const w=this[p],I=this[p+7];(w===void 0||I===void 0)&&$(p,this.length-8);const H=w*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],Y=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+I;return(BigInt(H)<<BigInt(32))+BigInt(Y)}),D.prototype.readIntLE=function(p,w,I){p=p>>>0,w=w>>>0,I||Gt(p,w,this.length);let H=this[p],Y=1,ot=0;for(;++ot<w&&(Y*=256);)H+=this[p+ot]*Y;return Y*=128,H>=Y&&(H-=Math.pow(2,8*w)),H},D.prototype.readIntBE=function(p,w,I){p=p>>>0,w=w>>>0,I||Gt(p,w,this.length);let H=w,Y=1,ot=this[p+--H];for(;H>0&&(Y*=256);)ot+=this[p+--H]*Y;return Y*=128,ot>=Y&&(ot-=Math.pow(2,8*w)),ot},D.prototype.readInt8=function(p,w){return p=p>>>0,w||Gt(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},D.prototype.readInt16LE=function(p,w){p=p>>>0,w||Gt(p,2,this.length);const I=this[p]|this[p+1]<<8;return I&32768?I|4294901760:I},D.prototype.readInt16BE=function(p,w){p=p>>>0,w||Gt(p,2,this.length);const I=this[p+1]|this[p]<<8;return I&32768?I|4294901760:I},D.prototype.readInt32LE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},D.prototype.readInt32BE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},D.prototype.readBigInt64LE=Ye(function(p){p=p>>>0,U(p,"offset");const w=this[p],I=this[p+7];(w===void 0||I===void 0)&&$(p,this.length-8);const H=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(I<<24);return(BigInt(H)<<BigInt(32))+BigInt(w+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),D.prototype.readBigInt64BE=Ye(function(p){p=p>>>0,U(p,"offset");const w=this[p],I=this[p+7];(w===void 0||I===void 0)&&$(p,this.length-8);const H=(w<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(H)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+I)}),D.prototype.readFloatLE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),z.read(this,p,!0,23,4)},D.prototype.readFloatBE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),z.read(this,p,!1,23,4)},D.prototype.readDoubleLE=function(p,w){return p=p>>>0,w||Gt(p,8,this.length),z.read(this,p,!0,52,8)},D.prototype.readDoubleBE=function(p,w){return p=p>>>0,w||Gt(p,8,this.length),z.read(this,p,!1,52,8)};function Qt(m,p,w,I,H,Y){if(!D.isBuffer(m))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>H||p<Y)throw new RangeError('"value" argument is out of bounds');if(w+I>m.length)throw new RangeError("Index out of range")}D.prototype.writeUintLE=D.prototype.writeUIntLE=function(p,w,I,H){if(p=+p,w=w>>>0,I=I>>>0,!H){const Ft=Math.pow(2,8*I)-1;Qt(this,p,w,I,Ft,0)}let Y=1,ot=0;for(this[w]=p&255;++ot<I&&(Y*=256);)this[w+ot]=p/Y&255;return w+I},D.prototype.writeUintBE=D.prototype.writeUIntBE=function(p,w,I,H){if(p=+p,w=w>>>0,I=I>>>0,!H){const Ft=Math.pow(2,8*I)-1;Qt(this,p,w,I,Ft,0)}let Y=I-1,ot=1;for(this[w+Y]=p&255;--Y>=0&&(ot*=256);)this[w+Y]=p/ot&255;return w+I},D.prototype.writeUint8=D.prototype.writeUInt8=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,1,255,0),this[w]=p&255,w+1},D.prototype.writeUint16LE=D.prototype.writeUInt16LE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,2,65535,0),this[w]=p&255,this[w+1]=p>>>8,w+2},D.prototype.writeUint16BE=D.prototype.writeUInt16BE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,2,65535,0),this[w]=p>>>8,this[w+1]=p&255,w+2},D.prototype.writeUint32LE=D.prototype.writeUInt32LE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,4,4294967295,0),this[w+3]=p>>>24,this[w+2]=p>>>16,this[w+1]=p>>>8,this[w]=p&255,w+4},D.prototype.writeUint32BE=D.prototype.writeUInt32BE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,4,4294967295,0),this[w]=p>>>24,this[w+1]=p>>>16,this[w+2]=p>>>8,this[w+3]=p&255,w+4};function ge(m,p,w,I,H){P(p,I,H,m,w,7);let Y=Number(p&BigInt(4294967295));m[w++]=Y,Y=Y>>8,m[w++]=Y,Y=Y>>8,m[w++]=Y,Y=Y>>8,m[w++]=Y;let ot=Number(p>>BigInt(32)&BigInt(4294967295));return m[w++]=ot,ot=ot>>8,m[w++]=ot,ot=ot>>8,m[w++]=ot,ot=ot>>8,m[w++]=ot,w}function le(m,p,w,I,H){P(p,I,H,m,w,7);let Y=Number(p&BigInt(4294967295));m[w+7]=Y,Y=Y>>8,m[w+6]=Y,Y=Y>>8,m[w+5]=Y,Y=Y>>8,m[w+4]=Y;let ot=Number(p>>BigInt(32)&BigInt(4294967295));return m[w+3]=ot,ot=ot>>8,m[w+2]=ot,ot=ot>>8,m[w+1]=ot,ot=ot>>8,m[w]=ot,w+8}D.prototype.writeBigUInt64LE=Ye(function(p,w=0){return ge(this,p,w,BigInt(0),BigInt("0xffffffffffffffff"))}),D.prototype.writeBigUInt64BE=Ye(function(p,w=0){return le(this,p,w,BigInt(0),BigInt("0xffffffffffffffff"))}),D.prototype.writeIntLE=function(p,w,I,H){if(p=+p,w=w>>>0,!H){const Zt=Math.pow(2,8*I-1);Qt(this,p,w,I,Zt-1,-Zt)}let Y=0,ot=1,Ft=0;for(this[w]=p&255;++Y<I&&(ot*=256);)p<0&&Ft===0&&this[w+Y-1]!==0&&(Ft=1),this[w+Y]=(p/ot>>0)-Ft&255;return w+I},D.prototype.writeIntBE=function(p,w,I,H){if(p=+p,w=w>>>0,!H){const Zt=Math.pow(2,8*I-1);Qt(this,p,w,I,Zt-1,-Zt)}let Y=I-1,ot=1,Ft=0;for(this[w+Y]=p&255;--Y>=0&&(ot*=256);)p<0&&Ft===0&&this[w+Y+1]!==0&&(Ft=1),this[w+Y]=(p/ot>>0)-Ft&255;return w+I},D.prototype.writeInt8=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,1,127,-128),p<0&&(p=255+p+1),this[w]=p&255,w+1},D.prototype.writeInt16LE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,2,32767,-32768),this[w]=p&255,this[w+1]=p>>>8,w+2},D.prototype.writeInt16BE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,2,32767,-32768),this[w]=p>>>8,this[w+1]=p&255,w+2},D.prototype.writeInt32LE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,4,2147483647,-2147483648),this[w]=p&255,this[w+1]=p>>>8,this[w+2]=p>>>16,this[w+3]=p>>>24,w+4},D.prototype.writeInt32BE=function(p,w,I){return p=+p,w=w>>>0,I||Qt(this,p,w,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[w]=p>>>24,this[w+1]=p>>>16,this[w+2]=p>>>8,this[w+3]=p&255,w+4},D.prototype.writeBigInt64LE=Ye(function(p,w=0){return ge(this,p,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),D.prototype.writeBigInt64BE=Ye(function(p,w=0){return le(this,p,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ze(m,p,w,I,H,Y){if(w+I>m.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function Ie(m,p,w,I,H){return p=+p,w=w>>>0,H||ze(m,p,w,4),z.write(m,p,w,I,23,4),w+4}D.prototype.writeFloatLE=function(p,w,I){return Ie(this,p,w,!0,I)},D.prototype.writeFloatBE=function(p,w,I){return Ie(this,p,w,!1,I)};function _e(m,p,w,I,H){return p=+p,w=w>>>0,H||ze(m,p,w,8),z.write(m,p,w,I,52,8),w+8}D.prototype.writeDoubleLE=function(p,w,I){return _e(this,p,w,!0,I)},D.prototype.writeDoubleBE=function(p,w,I){return _e(this,p,w,!1,I)},D.prototype.copy=function(p,w,I,H){if(!D.isBuffer(p))throw new TypeError("argument should be a Buffer");if(I||(I=0),!H&&H!==0&&(H=this.length),w>=p.length&&(w=p.length),w||(w=0),H>0&&H<I&&(H=I),H===I||p.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),p.length-w<H-I&&(H=p.length-w+I);const Y=H-I;return this===p&&typeof N.prototype.copyWithin=="function"?this.copyWithin(w,I,H):N.prototype.set.call(p,this.subarray(I,H),w),Y},D.prototype.fill=function(p,w,I,H){if(typeof p=="string"){if(typeof w=="string"?(H=w,w=0,I=this.length):typeof I=="string"&&(H=I,I=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!D.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(p.length===1){const ot=p.charCodeAt(0);(H==="utf8"&&ot<128||H==="latin1")&&(p=ot)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(w<0||this.length<w||this.length<I)throw new RangeError("Out of range index");if(I<=w)return this;w=w>>>0,I=I===void 0?this.length:I>>>0,p||(p=0);let Y;if(typeof p=="number")for(Y=w;Y<I;++Y)this[Y]=p;else{const ot=D.isBuffer(p)?p:D.from(p,H),Ft=ot.length;if(Ft===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(Y=0;Y<I-w;++Y)this[Y+w]=ot[Y%Ft]}return this};const $e={};function b(m,p,w){$e[m]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${m}]`,this.stack,delete this.name}get code(){return m}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${m}]: ${this.message}`}}}b("ERR_BUFFER_OUT_OF_BOUNDS",function(m){return m?`${m} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),b("ERR_INVALID_ARG_TYPE",function(m,p){return`The "${m}" argument must be of type number. Received type ${typeof p}`},TypeError),b("ERR_OUT_OF_RANGE",function(m,p,w){let I=`The value of "${m}" is out of range.`,H=w;return Number.isInteger(w)&&Math.abs(w)>2**32?H=h(String(w)):typeof w=="bigint"&&(H=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(H=h(H)),H+="n"),I+=` It must be ${p}. Received ${H}`,I},RangeError);function h(m){let p="",w=m.length;const I=m[0]==="-"?1:0;for(;w>=I+4;w-=3)p=`_${m.slice(w-3,w)}${p}`;return`${m.slice(0,w)}${p}`}function d(m,p,w){U(p,"offset"),(m[p]===void 0||m[p+w]===void 0)&&$(p,m.length-(w+1))}function P(m,p,w,I,H,Y){if(m>w||m<p){const ot=typeof p=="bigint"?"n":"";let Ft;throw p===0||p===BigInt(0)?Ft=`>= 0${ot} and < 2${ot} ** ${(Y+1)*8}${ot}`:Ft=`>= -(2${ot} ** ${(Y+1)*8-1}${ot}) and < 2 ** ${(Y+1)*8-1}${ot}`,new $e.ERR_OUT_OF_RANGE("value",Ft,m)}d(I,H,Y)}function U(m,p){if(typeof m!="number")throw new $e.ERR_INVALID_ARG_TYPE(p,"number",m)}function $(m,p,w){throw Math.floor(m)!==m?(U(m,w),new $e.ERR_OUT_OF_RANGE("offset","an integer",m)):p<0?new $e.ERR_BUFFER_OUT_OF_BOUNDS:new $e.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${p}`,m)}const st=/[^+/0-9A-Za-z-_]/g;function Pt(m){if(m=m.split("=")[0],m=m.trim().replace(st,""),m.length<2)return"";for(;m.length%4!==0;)m=m+"=";return m}function Vt(m,p){p=p||1/0;let w;const I=m.length;let H=null;const Y=[];for(let ot=0;ot<I;++ot){if(w=m.charCodeAt(ot),w>55295&&w<57344){if(!H){if(w>56319){(p-=3)>-1&&Y.push(239,191,189);continue}else if(ot+1===I){(p-=3)>-1&&Y.push(239,191,189);continue}H=w;continue}if(w<56320){(p-=3)>-1&&Y.push(239,191,189),H=w;continue}w=(H-55296<<10|w-56320)+65536}else H&&(p-=3)>-1&&Y.push(239,191,189);if(H=null,w<128){if((p-=1)<0)break;Y.push(w)}else if(w<2048){if((p-=2)<0)break;Y.push(w>>6|192,w&63|128)}else if(w<65536){if((p-=3)<0)break;Y.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((p-=4)<0)break;Y.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return Y}function qt(m){const p=[];for(let w=0;w<m.length;++w)p.push(m.charCodeAt(w)&255);return p}function Wt(m,p){let w,I,H;const Y=[];for(let ot=0;ot<m.length&&!((p-=2)<0);++ot)w=m.charCodeAt(ot),I=w>>8,H=w%256,Y.push(H),Y.push(I);return Y}function Dt(m){return B.toByteArray(Pt(m))}function yi(m,p,w,I){let H;for(H=0;H<I&&!(H+w>=p.length||H>=m.length);++H)p[H+w]=m[H];return H}function Oe(m,p){return m instanceof p||m!=null&&m.constructor!=null&&m.constructor.name!=null&&m.constructor.name===p.name}function Ki(m){return m!==m}const so=function(){const m="0123456789abcdef",p=new Array(256);for(let w=0;w<16;++w){const I=w*16;for(let H=0;H<16;++H)p[I+H]=m[w]+m[H]}return p}();function Ye(m){return typeof BigInt>"u"?oo:m}function oo(){throw new Error("BigInt not supported")}})(t);const E=t.Buffer;n.Blob=t.Blob,n.BlobOptions=t.BlobOptions,n.Buffer=t.Buffer,n.File=t.File,n.FileOptions=t.FileOptions,n.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,n.SlowBuffer=t.SlowBuffer,n.TranscodeEncoding=t.TranscodeEncoding,n.atob=t.atob,n.btoa=t.btoa,n.constants=t.constants,n.default=E,n.isAscii=t.isAscii,n.isUtf8=t.isUtf8,n.kMaxLength=t.kMaxLength,n.kStringMaxLength=t.kStringMaxLength,n.resolveObjectURL=t.resolveObjectURL,n.transcode=t.transcode}(bc)),bc}var mc={},Ac={},Ec,Dh;function Uh(){return Dh||(Dh=1,Ec=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,e);if(u.value!==i||u.enumerable!==!0)return!1}return!0}),Ec}var vc,Mh;function xc(){if(Mh)return vc;Mh=1;var n=Uh();return vc=function(){return n()&&!!Symbol.toStringTag},vc}var Rc,jh;function Gh(){return jh||(jh=1,Rc=Object),Rc}var Sc,Hh;function zm(){return Hh||(Hh=1,Sc=Error),Sc}var zc,Vh;function Bm(){return Vh||(Vh=1,zc=EvalError),zc}var Bc,qh;function km(){return qh||(qh=1,Bc=RangeError),Bc}var kc,Qh;function Pm(){return Qh||(Qh=1,kc=ReferenceError),kc}var Pc,Kh;function Wh(){return Kh||(Kh=1,Pc=SyntaxError),Pc}var Fc,Jh;function Jo(){return Jh||(Jh=1,Fc=TypeError),Fc}var Ic,$h;function Fm(){return $h||($h=1,Ic=URIError),Ic}var Oc,Yh;function Im(){return Yh||(Yh=1,Oc=Math.abs),Oc}var Tc,Zh;function Om(){return Zh||(Zh=1,Tc=Math.floor),Tc}var Cc,Xh;function Tm(){return Xh||(Xh=1,Cc=Math.max),Cc}var Nc,tp;function Cm(){return tp||(tp=1,Nc=Math.min),Nc}var Lc,ep;function Nm(){return ep||(ep=1,Lc=Math.pow),Lc}var Dc,rp;function Lm(){return rp||(rp=1,Dc=Math.round),Dc}var Uc,np;function Dm(){return np||(np=1,Uc=Number.isNaN||function(t){return t!==t}),Uc}var Mc,ip;function Um(){if(ip)return Mc;ip=1;var n=Dm();return Mc=function(e){return n(e)||e===0?e:e<0?-1:1},Mc}var jc,sp;function Mm(){return sp||(sp=1,jc=Object.getOwnPropertyDescriptor),jc}var Gc,op;function Ks(){if(op)return Gc;op=1;var n=Mm();if(n)try{n([],"length")}catch{n=null}return Gc=n,Gc}var Hc,ap;function $o(){if(ap)return Hc;ap=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Hc=n,Hc}var Vc,cp;function jm(){if(cp)return Vc;cp=1;var n=typeof Symbol<"u"&&Symbol,t=Uh();return Vc=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Vc}var qc,up;function _p(){return up||(up=1,qc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),qc}var Qc,fp;function lp(){if(fp)return Qc;fp=1;var n=Gh();return Qc=n.getPrototypeOf||null,Qc}var Kc,hp;function Gm(){if(hp)return Kc;hp=1;var n="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,r="[object Function]",i=function(_,l){for(var f=[],g=0;g<_.length;g+=1)f[g]=_[g];for(var y=0;y<l.length;y+=1)f[y+_.length]=l[y];return f},o=function(_,l){for(var f=[],g=l,y=0;g<_.length;g+=1,y+=1)f[y]=_[g];return f},a=function(u,_){for(var l="",f=0;f<u.length;f+=1)l+=u[f],f+1<u.length&&(l+=_);return l};return Kc=function(_){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(n+l);for(var f=o(arguments,1),g,y=function(){if(this instanceof g){var E=l.apply(this,i(f,arguments));return Object(E)===E?E:this}return l.apply(_,i(f,arguments))},v=e(0,l.length-f.length),F=[],k=0;k<v;k++)F[k]="$"+k;if(g=Function("binder","return function ("+a(F,",")+"){ return binder.apply(this,arguments); }")(y),l.prototype){var T=function(){};T.prototype=l.prototype,g.prototype=new T,T.prototype=null}return g},Kc}var Wc,pp;function Ws(){if(pp)return Wc;pp=1;var n=Gm();return Wc=Function.prototype.bind||n,Wc}var Jc,dp;function $c(){return dp||(dp=1,Jc=Function.prototype.call),Jc}var Yc,wp;function Zc(){return wp||(wp=1,Yc=Function.prototype.apply),Yc}var Xc,gp;function Hm(){return gp||(gp=1,Xc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Xc}var tu,yp;function bp(){if(yp)return tu;yp=1;var n=Ws(),t=Zc(),e=$c(),r=Hm();return tu=r||n.call(e,t),tu}var eu,mp;function ru(){if(mp)return eu;mp=1;var n=Ws(),t=Jo(),e=$c(),r=bp();return eu=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return r(n,e,o)},eu}var nu,Ap;function Vm(){if(Ap)return nu;Ap=1;var n=ru(),t=Ks(),e;try{e=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!e&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return nu=r&&typeof r.get=="function"?n([r.get]):typeof o=="function"?function(u){return o(u==null?u:i(u))}:!1,nu}var iu,Ep;function vp(){if(Ep)return iu;Ep=1;var n=_p(),t=lp(),e=Vm();return iu=n?function(i){return n(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:e?function(i){return e(i)}:null,iu}var su,xp;function qm(){if(xp)return su;xp=1;var n=Function.prototype.call,t=Object.prototype.hasOwnProperty,e=Ws();return su=e.call(n,t),su}var ou,Rp;function Sp(){if(Rp)return ou;Rp=1;var n,t=Gh(),e=zm(),r=Bm(),i=km(),o=Pm(),a=Wh(),u=Jo(),_=Fm(),l=Im(),f=Om(),g=Tm(),y=Cm(),v=Nm(),F=Lm(),k=Um(),T=Function,E=function(ct){try{return T('"use strict"; return ('+ct+").constructor;")()}catch{}},R=Ks(),B=$o(),z=function(){throw new u},O=R?function(){try{return arguments.callee,z}catch{try{return R(arguments,"callee").get}catch{return z}}}():z,C=jm()(),N=vp(),L=lp(),J=_p(),nt=Zc(),dt=$c(),D={},vt=typeof Uint8Array>"u"||!N?n:N(Uint8Array),wt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":C&&N?N([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&N?N(N([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!C||!N?n:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":R,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!C||!N?n:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&N?N(""[Symbol.iterator]()):n,"%Symbol%":C?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":O,"%TypedArray%":vt,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":_,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":dt,"%Function.prototype.apply%":nt,"%Object.defineProperty%":B,"%Object.getPrototypeOf%":L,"%Math.abs%":l,"%Math.floor%":f,"%Math.max%":g,"%Math.min%":y,"%Math.pow%":v,"%Math.round%":F,"%Math.sign%":k,"%Reflect.getPrototypeOf%":J};if(N)try{null.error}catch(ct){var at=N(N(ct));wt["%Error.prototype%"]=at}var ht=function ct(_t){var x;if(_t==="%AsyncFunction%")x=E("async function () {}");else if(_t==="%GeneratorFunction%")x=E("function* () {}");else if(_t==="%AsyncGeneratorFunction%")x=E("async function* () {}");else if(_t==="%AsyncGenerator%"){var S=ct("%AsyncGeneratorFunction%");S&&(x=S.prototype)}else if(_t==="%AsyncIteratorPrototype%"){var et=ct("%AsyncGenerator%");et&&N&&(x=N(et.prototype))}return wt[_t]=x,x},mt={__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"]},Rt=Ws(),xt=qm(),kt=Rt.call(dt,Array.prototype.concat),jt=Rt.call(nt,Array.prototype.splice),W=Rt.call(dt,String.prototype.replace),Z=Rt.call(dt,String.prototype.slice),rt=Rt.call(dt,RegExp.prototype.exec),gt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,M=function(_t){var x=Z(_t,0,1),S=Z(_t,-1);if(x==="%"&&S!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(S==="%"&&x!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var et=[];return W(_t,gt,function(ft,zt,bt,Bt){et[et.length]=bt?W(Bt,G,"$1"):zt||ft}),et},X=function(_t,x){var S=_t,et;if(xt(mt,S)&&(et=mt[S],S="%"+et[0]+"%"),xt(wt,S)){var ft=wt[S];if(ft===D&&(ft=ht(S)),typeof ft>"u"&&!x)throw new u("intrinsic "+_t+" exists, but is not available. Please file an issue!");return{alias:et,name:S,value:ft}}throw new a("intrinsic "+_t+" does not exist!")};return ou=function(_t,x){if(typeof _t!="string"||_t.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof x!="boolean")throw new u('"allowMissing" argument must be a boolean');if(rt(/^%?[^%]*%?$/,_t)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var S=M(_t),et=S.length>0?S[0]:"",ft=X("%"+et+"%",x),zt=ft.name,bt=ft.value,Bt=!1,pe=ft.alias;pe&&(et=pe[0],jt(S,kt([0,1],pe)));for(var it=1,de=!0;it<S.length;it+=1){var we=S[it],Gt=Z(we,0,1),Qt=Z(we,-1);if((Gt==='"'||Gt==="'"||Gt==="`"||Qt==='"'||Qt==="'"||Qt==="`")&&Gt!==Qt)throw new a("property names with quotes must have matching quotes");if((we==="constructor"||!de)&&(Bt=!0),et+="."+we,zt="%"+et+"%",xt(wt,zt))bt=wt[zt];else if(bt!=null){if(!(we in bt)){if(!x)throw new u("base intrinsic for "+_t+" exists, but the property is not available.");return}if(R&&it+1>=S.length){var ge=R(bt,we);de=!!ge,de&&"get"in ge&&!("originalValue"in ge.get)?bt=ge.get:bt=bt[we]}else de=xt(bt,we),bt=bt[we];de&&!Bt&&(wt[zt]=bt)}}return bt},ou}var au,zp;function Bp(){if(zp)return au;zp=1;var n=Sp(),t=ru(),e=t([n("%String.prototype.indexOf%")]);return au=function(i,o){var a=n(i,!!o);return typeof a=="function"&&e(i,".prototype.")>-1?t([a]):a},au}var cu,kp;function Qm(){if(kp)return cu;kp=1;var n=xc()(),t=Bp(),e=t("Object.prototype.toString"),r=function(u){return n&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:e(u)==="[object Arguments]"},i=function(u){return r(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&e(u)!=="[object Array]"&&"callee"in u&&e(u.callee)==="[object Function]"},o=function(){return r(arguments)}();return r.isLegacyArguments=i,cu=o?r:i,cu}var uu,Pp;function Km(){if(Pp)return uu;Pp=1;var n=Object.prototype.toString,t=Function.prototype.toString,e=/^\s*(?:function)?\*/,r=xc()(),i=Object.getPrototypeOf,o=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},a;return uu=function(_){if(typeof _!="function")return!1;if(e.test(t.call(_)))return!0;if(!r){var l=n.call(_);return l==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var f=o();a=f?i(f):!1}return i(_)===a},uu}var _u,Fp;function Wm(){if(Fp)return _u;Fp=1;var n=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,e,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,e)}catch(R){R!==r&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(B){try{var z=n.call(B);return i.test(z)}catch{return!1}},a=function(B){try{return o(B)?!1:(n.call(B),!0)}catch{return!1}},u=Object.prototype.toString,_="[object Object]",l="[object Function]",f="[object GeneratorFunction]",g="[object HTMLAllCollection]",y="[object HTML document.all class]",v="[object HTMLCollection]",F=typeof Symbol=="function"&&!!Symbol.toStringTag,k=!(0 in[,]),T=function(){return!1};if(typeof document=="object"){var E=document.all;u.call(E)===u.call(document.all)&&(T=function(B){if((k||!B)&&(typeof B>"u"||typeof B=="object"))try{var z=u.call(B);return(z===g||z===y||z===v||z===_)&&B("")==null}catch{}return!1})}return _u=t?function(B){if(T(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;try{t(B,null,e)}catch(z){if(z!==r)return!1}return!o(B)&&a(B)}:function(B){if(T(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;if(F)return a(B);if(o(B))return!1;var z=u.call(B);return z!==l&&z!==f&&!/^\[object HTML/.test(z)?!1:a(B)},_u}var fu,Ip;function Jm(){if(Ip)return fu;Ip=1;var n=Wm(),t=Object.prototype.toString,e=Object.prototype.hasOwnProperty,r=function(_,l,f){for(var g=0,y=_.length;g<y;g++)e.call(_,g)&&(f==null?l(_[g],g,_):l.call(f,_[g],g,_))},i=function(_,l,f){for(var g=0,y=_.length;g<y;g++)f==null?l(_.charAt(g),g,_):l.call(f,_.charAt(g),g,_)},o=function(_,l,f){for(var g in _)e.call(_,g)&&(f==null?l(_[g],g,_):l.call(f,_[g],g,_))};function a(u){return t.call(u)==="[object Array]"}return fu=function(_,l,f){if(!n(l))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=f),a(_)?r(_,l,g):typeof _=="string"?i(_,l,g):o(_,l,g)},fu}var lu,Op;function $m(){return Op||(Op=1,lu=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),lu}var hu,Tp;function Ym(){if(Tp)return hu;Tp=1;var n=$m(),t=typeof globalThis>"u"?hi:globalThis;return hu=function(){for(var r=[],i=0;i<n.length;i++)typeof t[n[i]]=="function"&&(r[r.length]=n[i]);return r},hu}var pu={exports:{}},du,Cp;function Zm(){if(Cp)return du;Cp=1;var n=$o(),t=Wh(),e=Jo(),r=Ks();return du=function(o,a,u){if(!o||typeof o!="object"&&typeof o!="function")throw new e("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new e("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new e("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new e("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new e("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new e("`loose`, if provided, must be a boolean");var _=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,y=!!r&&r(o,a);if(n)n(o,a,{configurable:f===null&&y?y.configurable:!f,enumerable:_===null&&y?y.enumerable:!_,value:u,writable:l===null&&y?y.writable:!l});else if(g||!_&&!l&&!f)o[a]=u;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},du}var wu,Np;function Xm(){if(Np)return wu;Np=1;var n=$o(),t=function(){return!!n};return t.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},wu=t,wu}var gu,Lp;function t2(){if(Lp)return gu;Lp=1;var n=Sp(),t=Zm(),e=Xm()(),r=Ks(),i=Jo(),o=n("%Math.floor%");return gu=function(u,_){if(typeof u!="function")throw new i("`fn` is not a function");if(typeof _!="number"||_<0||_>4294967295||o(_)!==_)throw new i("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],f=!0,g=!0;if("length"in u&&r){var y=r(u,"length");y&&!y.configurable&&(f=!1),y&&!y.writable&&(g=!1)}return(f||g||!l)&&(e?t(u,"length",_,!0,!0):t(u,"length",_)),u},gu}var yu,Dp;function e2(){if(Dp)return yu;Dp=1;var n=Ws(),t=Zc(),e=bp();return yu=function(){return e(n,t,arguments)},yu}var Up;function r2(){return Up||(Up=1,function(n){var t=t2(),e=$o(),r=ru(),i=e2();n.exports=function(a){var u=r(arguments),_=a.length-(arguments.length-1);return t(u,1+(_>0?_:0),!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i}(pu)),pu.exports}var bu,Mp;function jp(){if(Mp)return bu;Mp=1;var n=Jm(),t=Ym(),e=r2(),r=Bp(),i=Ks(),o=vp(),a=r("Object.prototype.toString"),u=xc()(),_=typeof globalThis>"u"?hi:globalThis,l=t(),f=r("String.prototype.slice"),g=r("Array.prototype.indexOf",!0)||function(T,E){for(var R=0;R<T.length;R+=1)if(T[R]===E)return R;return-1},y={__proto__:null};u&&i&&o?n(l,function(k){var T=new _[k];if(Symbol.toStringTag in T&&o){var E=o(T),R=i(E,Symbol.toStringTag);if(!R&&E){var B=o(E);R=i(B,Symbol.toStringTag)}y["$"+k]=e(R.get)}}):n(l,function(k){var T=new _[k],E=T.slice||T.set;E&&(y["$"+k]=e(E))});var v=function(T){var E=!1;return n(y,function(R,B){if(!E)try{"$"+R(T)===B&&(E=f(B,1))}catch{}}),E},F=function(T){var E=!1;return n(y,function(R,B){if(!E)try{R(T),E=f(B,1)}catch{}}),E};return bu=function(T){if(!T||typeof T!="object")return!1;if(!u){var E=f(a(T),8,-1);return g(l,E)>-1?E:E!=="Object"?!1:F(T)}return i?v(T):null},bu}var mu,Gp;function n2(){if(Gp)return mu;Gp=1;var n=jp();return mu=function(e){return!!n(e)},mu}var Hp;function i2(){return Hp||(Hp=1,function(n){var t=Qm(),e=Km(),r=jp(),i=n2();function o(it){return it.call.bind(it)}var a=typeof BigInt<"u",u=typeof Symbol<"u",_=o(Object.prototype.toString),l=o(Number.prototype.valueOf),f=o(String.prototype.valueOf),g=o(Boolean.prototype.valueOf);if(a)var y=o(BigInt.prototype.valueOf);if(u)var v=o(Symbol.prototype.valueOf);function F(it,de){if(typeof it!="object")return!1;try{return de(it),!0}catch{return!1}}n.isArgumentsObject=t,n.isGeneratorFunction=e,n.isTypedArray=i;function k(it){return typeof Promise<"u"&&it instanceof Promise||it!==null&&typeof it=="object"&&typeof it.then=="function"&&typeof it.catch=="function"}n.isPromise=k;function T(it){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(it):i(it)||Z(it)}n.isArrayBufferView=T;function E(it){return r(it)==="Uint8Array"}n.isUint8Array=E;function R(it){return r(it)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function B(it){return r(it)==="Uint16Array"}n.isUint16Array=B;function z(it){return r(it)==="Uint32Array"}n.isUint32Array=z;function O(it){return r(it)==="Int8Array"}n.isInt8Array=O;function C(it){return r(it)==="Int16Array"}n.isInt16Array=C;function N(it){return r(it)==="Int32Array"}n.isInt32Array=N;function L(it){return r(it)==="Float32Array"}n.isFloat32Array=L;function J(it){return r(it)==="Float64Array"}n.isFloat64Array=J;function nt(it){return r(it)==="BigInt64Array"}n.isBigInt64Array=nt;function dt(it){return r(it)==="BigUint64Array"}n.isBigUint64Array=dt;function D(it){return _(it)==="[object Map]"}D.working=typeof Map<"u"&&D(new Map);function vt(it){return typeof Map>"u"?!1:D.working?D(it):it instanceof Map}n.isMap=vt;function wt(it){return _(it)==="[object Set]"}wt.working=typeof Set<"u"&&wt(new Set);function at(it){return typeof Set>"u"?!1:wt.working?wt(it):it instanceof Set}n.isSet=at;function ht(it){return _(it)==="[object WeakMap]"}ht.working=typeof WeakMap<"u"&&ht(new WeakMap);function mt(it){return typeof WeakMap>"u"?!1:ht.working?ht(it):it instanceof WeakMap}n.isWeakMap=mt;function Rt(it){return _(it)==="[object WeakSet]"}Rt.working=typeof WeakSet<"u"&&Rt(new WeakSet);function xt(it){return Rt(it)}n.isWeakSet=xt;function kt(it){return _(it)==="[object ArrayBuffer]"}kt.working=typeof ArrayBuffer<"u"&&kt(new ArrayBuffer);function jt(it){return typeof ArrayBuffer>"u"?!1:kt.working?kt(it):it instanceof ArrayBuffer}n.isArrayBuffer=jt;function W(it){return _(it)==="[object DataView]"}W.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&W(new DataView(new ArrayBuffer(1),0,1));function Z(it){return typeof DataView>"u"?!1:W.working?W(it):it instanceof DataView}n.isDataView=Z;var rt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function gt(it){return _(it)==="[object SharedArrayBuffer]"}function G(it){return typeof rt>"u"?!1:(typeof gt.working>"u"&&(gt.working=gt(new rt)),gt.working?gt(it):it instanceof rt)}n.isSharedArrayBuffer=G;function M(it){return _(it)==="[object AsyncFunction]"}n.isAsyncFunction=M;function X(it){return _(it)==="[object Map Iterator]"}n.isMapIterator=X;function ct(it){return _(it)==="[object Set Iterator]"}n.isSetIterator=ct;function _t(it){return _(it)==="[object Generator]"}n.isGeneratorObject=_t;function x(it){return _(it)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=x;function S(it){return F(it,l)}n.isNumberObject=S;function et(it){return F(it,f)}n.isStringObject=et;function ft(it){return F(it,g)}n.isBooleanObject=ft;function zt(it){return a&&F(it,y)}n.isBigIntObject=zt;function bt(it){return u&&F(it,v)}n.isSymbolObject=bt;function Bt(it){return S(it)||et(it)||ft(it)||zt(it)||bt(it)}n.isBoxedPrimitive=Bt;function pe(it){return typeof Uint8Array<"u"&&(jt(it)||G(it))}n.isAnyArrayBuffer=pe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(it){Object.defineProperty(n,it,{enumerable:!1,value:function(){throw new Error(it+" is not supported in userland")}})})}(Ac)),Ac}var Au,Vp;function s2(){return Vp||(Vp=1,Au=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),Au}var Yo={exports:{}},qp;function ds(){return qp||(qp=1,typeof Object.create=="function"?Yo.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Yo.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}),Yo.exports}var Qp;function Kp(){return Qp||(Qp=1,function(n){var t=Object.getOwnPropertyDescriptors||function(Z){for(var rt=Object.keys(Z),gt={},G=0;G<rt.length;G++)gt[rt[G]]=Object.getOwnPropertyDescriptor(Z,rt[G]);return gt},e=/%[sdj%]/g;n.format=function(W){if(!O(W)){for(var Z=[],rt=0;rt<arguments.length;rt++)Z.push(a(arguments[rt]));return Z.join(" ")}for(var rt=1,gt=arguments,G=gt.length,M=String(W).replace(e,function(ct){if(ct==="%%")return"%";if(rt>=G)return ct;switch(ct){case"%s":return String(gt[rt++]);case"%d":return Number(gt[rt++]);case"%j":try{return JSON.stringify(gt[rt++])}catch{return"[Circular]"}default:return ct}}),X=gt[rt];rt<G;X=gt[++rt])R(X)||!J(X)?M+=" "+X:M+=" "+a(X);return M},n.deprecate=function(W,Z){if(typeof Ct<"u"&&Ct.noDeprecation===!0)return W;if(typeof Ct>"u")return function(){return n.deprecate(W,Z).apply(this,arguments)};var rt=!1;function gt(){if(!rt){if(Ct.throwDeprecation)throw new Error(Z);Ct.traceDeprecation?console.trace(Z):console.error(Z),rt=!0}return W.apply(this,arguments)}return gt};var r={},i=/^$/;if(Ct.env.NODE_DEBUG){var o=Ct.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}n.debuglog=function(W){if(W=W.toUpperCase(),!r[W])if(i.test(W)){var Z=Ct.pid;r[W]=function(){var rt=n.format.apply(n,arguments);console.error("%s %d: %s",W,Z,rt)}}else r[W]=function(){};return r[W]};function a(W,Z){var rt={seen:[],stylize:_};return arguments.length>=3&&(rt.depth=arguments[2]),arguments.length>=4&&(rt.colors=arguments[3]),E(Z)?rt.showHidden=Z:Z&&n._extend(rt,Z),N(rt.showHidden)&&(rt.showHidden=!1),N(rt.depth)&&(rt.depth=2),N(rt.colors)&&(rt.colors=!1),N(rt.customInspect)&&(rt.customInspect=!0),rt.colors&&(rt.stylize=u),f(rt,W,rt.depth)}n.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u(W,Z){var rt=a.styles[Z];return rt?"\x1B["+a.colors[rt][0]+"m"+W+"\x1B["+a.colors[rt][1]+"m":W}function _(W,Z){return W}function l(W){var Z={};return W.forEach(function(rt,gt){Z[rt]=!0}),Z}function f(W,Z,rt){if(W.customInspect&&Z&&D(Z.inspect)&&Z.inspect!==n.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var gt=Z.inspect(rt,W);return O(gt)||(gt=f(W,gt,rt)),gt}var G=g(W,Z);if(G)return G;var M=Object.keys(Z),X=l(M);if(W.showHidden&&(M=Object.getOwnPropertyNames(Z)),dt(Z)&&(M.indexOf("message")>=0||M.indexOf("description")>=0))return y(Z);if(M.length===0){if(D(Z)){var ct=Z.name?": "+Z.name:"";return W.stylize("[Function"+ct+"]","special")}if(L(Z))return W.stylize(RegExp.prototype.toString.call(Z),"regexp");if(nt(Z))return W.stylize(Date.prototype.toString.call(Z),"date");if(dt(Z))return y(Z)}var _t="",x=!1,S=["{","}"];if(T(Z)&&(x=!0,S=["[","]"]),D(Z)){var et=Z.name?": "+Z.name:"";_t=" [Function"+et+"]"}if(L(Z)&&(_t=" "+RegExp.prototype.toString.call(Z)),nt(Z)&&(_t=" "+Date.prototype.toUTCString.call(Z)),dt(Z)&&(_t=" "+y(Z)),M.length===0&&(!x||Z.length==0))return S[0]+_t+S[1];if(rt<0)return L(Z)?W.stylize(RegExp.prototype.toString.call(Z),"regexp"):W.stylize("[Object]","special");W.seen.push(Z);var ft;return x?ft=v(W,Z,rt,X,M):ft=M.map(function(zt){return F(W,Z,rt,X,zt,x)}),W.seen.pop(),k(ft,_t,S)}function g(W,Z){if(N(Z))return W.stylize("undefined","undefined");if(O(Z)){var rt="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(rt,"string")}if(z(Z))return W.stylize(""+Z,"number");if(E(Z))return W.stylize(""+Z,"boolean");if(R(Z))return W.stylize("null","null")}function y(W){return"["+Error.prototype.toString.call(W)+"]"}function v(W,Z,rt,gt,G){for(var M=[],X=0,ct=Z.length;X<ct;++X)Rt(Z,String(X))?M.push(F(W,Z,rt,gt,String(X),!0)):M.push("");return G.forEach(function(_t){_t.match(/^\d+$/)||M.push(F(W,Z,rt,gt,_t,!0))}),M}function F(W,Z,rt,gt,G,M){var X,ct,_t;if(_t=Object.getOwnPropertyDescriptor(Z,G)||{value:Z[G]},_t.get?_t.set?ct=W.stylize("[Getter/Setter]","special"):ct=W.stylize("[Getter]","special"):_t.set&&(ct=W.stylize("[Setter]","special")),Rt(gt,G)||(X="["+G+"]"),ct||(W.seen.indexOf(_t.value)<0?(R(rt)?ct=f(W,_t.value,null):ct=f(W,_t.value,rt-1),ct.indexOf(`
11
+ */(function(R){const B=e,z=T,O=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=L,R.SlowBuffer=Z,R.INSPECT_MAX_BYTES=50;const C=2147483647;R.kMaxLength=C;const{Uint8Array:N,ArrayBuffer:D,SharedArrayBuffer:$}=globalThis;L.TYPED_ARRAY_SUPPORT=et(),!L.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function et(){try{const m=new N(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,N.prototype),Object.setPrototypeOf(m,p),m.foo()===42}catch{return!1}}Object.defineProperty(L.prototype,"parent",{enumerable:!0,get:function(){if(L.isBuffer(this))return this.buffer}}),Object.defineProperty(L.prototype,"offset",{enumerable:!0,get:function(){if(L.isBuffer(this))return this.byteOffset}});function ft(m){if(m>C)throw new RangeError('The value "'+m+'" is invalid for option "size"');const p=new N(m);return Object.setPrototypeOf(p,L.prototype),p}function L(m,p,w){if(typeof m=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return pt(m)}return vt(m,p,w)}L.poolSize=8192;function vt(m,p,w){if(typeof m=="string")return mt(m,p);if(D.isView(m))return xt(m);if(m==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m);if(Oe(m,D)||m&&Oe(m.buffer,D)||typeof $<"u"&&(Oe(m,$)||m&&Oe(m.buffer,$)))return Pt(m,p,w);if(typeof m=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const F=m.valueOf&&m.valueOf();if(F!=null&&F!==m)return L.from(F,p,w);const V=jt(m);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof m[Symbol.toPrimitive]=="function")return L.from(m[Symbol.toPrimitive]("string"),p,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m)}L.from=function(m,p,w){return vt(m,p,w)},Object.setPrototypeOf(L.prototype,N.prototype),Object.setPrototypeOf(L,N);function wt(m){if(typeof m!="number")throw new TypeError('"size" argument must be of type number');if(m<0)throw new RangeError('The value "'+m+'" is invalid for option "size"')}function at(m,p,w){return wt(m),m<=0?ft(m):p!==void 0?typeof w=="string"?ft(m).fill(p,w):ft(m).fill(p):ft(m)}L.alloc=function(m,p,w){return at(m,p,w)};function pt(m){return wt(m),ft(m<0?0:W(m)|0)}L.allocUnsafe=function(m){return pt(m)},L.allocUnsafeSlow=function(m){return pt(m)};function mt(m,p){if((typeof p!="string"||p==="")&&(p="utf8"),!L.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const w=nt(m,p)|0;let F=ft(w);const V=F.write(m,p);return V!==w&&(F=F.slice(0,V)),F}function Rt(m){const p=m.length<0?0:W(m.length)|0,w=ft(p);for(let F=0;F<p;F+=1)w[F]=m[F]&255;return w}function xt(m){if(Oe(m,N)){const p=new N(m);return Pt(p.buffer,p.byteOffset,p.byteLength)}return Rt(m)}function Pt(m,p,w){if(p<0||m.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(m.byteLength<p+(w||0))throw new RangeError('"length" is outside of buffer bounds');let F;return p===void 0&&w===void 0?F=new N(m):w===void 0?F=new N(m,p):F=new N(m,p,w),Object.setPrototypeOf(F,L.prototype),F}function jt(m){if(L.isBuffer(m)){const p=W(m.length)|0,w=ft(p);return w.length===0||m.copy(w,0,0,p),w}if(m.length!==void 0)return typeof m.length!="number"||Wi(m.length)?ft(0):Rt(m);if(m.type==="Buffer"&&Array.isArray(m.data))return Rt(m.data)}function W(m){if(m>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return m|0}function Z(m){return+m!=m&&(m=0),L.alloc(+m)}L.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==L.prototype},L.compare=function(p,w){if(Oe(p,N)&&(p=L.from(p,p.offset,p.byteLength)),Oe(w,N)&&(w=L.from(w,w.offset,w.byteLength)),!L.isBuffer(p)||!L.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===w)return 0;let F=p.length,V=w.length;for(let Y=0,ot=Math.min(F,V);Y<ot;++Y)if(p[Y]!==w[Y]){F=p[Y],V=w[Y];break}return F<V?-1:V<F?1:0},L.isEncoding=function(p){switch(String(p).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},L.concat=function(p,w){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return L.alloc(0);let F;if(w===void 0)for(w=0,F=0;F<p.length;++F)w+=p[F].length;const V=L.allocUnsafe(w);let Y=0;for(F=0;F<p.length;++F){let ot=p[F];if(Oe(ot,N))Y+ot.length>V.length?(L.isBuffer(ot)||(ot=L.from(ot)),ot.copy(V,Y)):N.prototype.set.call(V,ot,Y);else if(L.isBuffer(ot))ot.copy(V,Y);else throw new TypeError('"list" argument must be an Array of Buffers');Y+=ot.length}return V};function nt(m,p){if(L.isBuffer(m))return m.length;if(D.isView(m)||Oe(m,D))return m.byteLength;if(typeof m!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof m);const w=m.length,F=arguments.length>2&&arguments[2]===!0;if(!F&&w===0)return 0;let V=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Vt(m).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Ut(m).length;default:if(V)return F?-1:Vt(m).length;p=(""+p).toLowerCase(),V=!0}}L.byteLength=nt;function yt(m,p,w){let F=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,p>>>=0,w<=p))return"";for(m||(m="utf8");;)switch(m){case"hex":return de(this,p,w);case"utf8":case"utf-8":return Bt(this,p,w);case"ascii":return pe(this,p,w);case"latin1":case"binary":return it(this,p,w);case"base64":return lt(this,p,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,p,w);default:if(F)throw new TypeError("Unknown encoding: "+m);m=(m+"").toLowerCase(),F=!0}}L.prototype._isBuffer=!0;function H(m,p,w){const F=m[p];m[p]=m[w],m[w]=F}L.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<p;w+=2)H(this,w,w+1);return this},L.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<p;w+=4)H(this,w,w+3),H(this,w+1,w+2);return this},L.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<p;w+=8)H(this,w,w+7),H(this,w+1,w+6),H(this,w+2,w+5),H(this,w+3,w+4);return this},L.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?Bt(this,0,p):yt.apply(this,arguments)},L.prototype.toLocaleString=L.prototype.toString,L.prototype.equals=function(p){if(!L.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:L.compare(this,p)===0},L.prototype.inspect=function(){let p="";const w=R.INSPECT_MAX_BYTES;return p=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(p+=" ... "),"<Buffer "+p+">"},O&&(L.prototype[O]=L.prototype.inspect),L.prototype.compare=function(p,w,F,V,Y){if(Oe(p,N)&&(p=L.from(p,p.offset,p.byteLength)),!L.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(w===void 0&&(w=0),F===void 0&&(F=p?p.length:0),V===void 0&&(V=0),Y===void 0&&(Y=this.length),w<0||F>p.length||V<0||Y>this.length)throw new RangeError("out of range index");if(V>=Y&&w>=F)return 0;if(V>=Y)return-1;if(w>=F)return 1;if(w>>>=0,F>>>=0,V>>>=0,Y>>>=0,this===p)return 0;let ot=Y-V,Ft=F-w;const Zt=Math.min(ot,Ft),Jt=this.slice(V,Y),Xt=p.slice(w,F);for(let Ht=0;Ht<Zt;++Ht)if(Jt[Ht]!==Xt[Ht]){ot=Jt[Ht],Ft=Xt[Ht];break}return ot<Ft?-1:Ft<ot?1:0};function M(m,p,w,F,V){if(m.length===0)return-1;if(typeof w=="string"?(F=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,Wi(w)&&(w=V?0:m.length-1),w<0&&(w=m.length+w),w>=m.length){if(V)return-1;w=m.length-1}else if(w<0)if(V)w=0;else return-1;if(typeof p=="string"&&(p=L.from(p,F)),L.isBuffer(p))return p.length===0?-1:X(m,p,w,F,V);if(typeof p=="number")return p=p&255,typeof N.prototype.indexOf=="function"?V?N.prototype.indexOf.call(m,p,w):N.prototype.lastIndexOf.call(m,p,w):X(m,[p],w,F,V);throw new TypeError("val must be string, number or Buffer")}function X(m,p,w,F,V){let Y=1,ot=m.length,Ft=p.length;if(F!==void 0&&(F=String(F).toLowerCase(),F==="ucs2"||F==="ucs-2"||F==="utf16le"||F==="utf-16le")){if(m.length<2||p.length<2)return-1;Y=2,ot/=2,Ft/=2,w/=2}function Zt(Xt,Ht){return Y===1?Xt[Ht]:Xt.readUInt16BE(Ht*Y)}let Jt;if(V){let Xt=-1;for(Jt=w;Jt<ot;Jt++)if(Zt(m,Jt)===Zt(p,Xt===-1?0:Jt-Xt)){if(Xt===-1&&(Xt=Jt),Jt-Xt+1===Ft)return Xt*Y}else Xt!==-1&&(Jt-=Jt-Xt),Xt=-1}else for(w+Ft>ot&&(w=ot-Ft),Jt=w;Jt>=0;Jt--){let Xt=!0;for(let Ht=0;Ht<Ft;Ht++)if(Zt(m,Jt+Ht)!==Zt(p,Ht)){Xt=!1;break}if(Xt)return Jt}return-1}L.prototype.includes=function(p,w,F){return this.indexOf(p,w,F)!==-1},L.prototype.indexOf=function(p,w,F){return M(this,p,w,F,!0)},L.prototype.lastIndexOf=function(p,w,F){return M(this,p,w,F,!1)};function ct(m,p,w,F){w=Number(w)||0;const V=m.length-w;F?(F=Number(F),F>V&&(F=V)):F=V;const Y=p.length;F>Y/2&&(F=Y/2);let ot;for(ot=0;ot<F;++ot){const Ft=parseInt(p.substr(ot*2,2),16);if(Wi(Ft))return ot;m[w+ot]=Ft}return ot}function _t(m,p,w,F){return bi(Vt(p,m.length-w),m,w,F)}function x(m,p,w,F){return bi(qt(p),m,w,F)}function S(m,p,w,F){return bi(Ut(p),m,w,F)}function rt(m,p,w,F){return bi(Wt(p,m.length-w),m,w,F)}L.prototype.write=function(p,w,F,V){if(w===void 0)V="utf8",F=this.length,w=0;else if(F===void 0&&typeof w=="string")V=w,F=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(F)?(F=F>>>0,V===void 0&&(V="utf8")):(V=F,F=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Y=this.length-w;if((F===void 0||F>Y)&&(F=Y),p.length>0&&(F<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");let ot=!1;for(;;)switch(V){case"hex":return ct(this,p,w,F);case"utf8":case"utf-8":return _t(this,p,w,F);case"ascii":case"latin1":case"binary":return x(this,p,w,F);case"base64":return S(this,p,w,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,p,w,F);default:if(ot)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),ot=!0}},L.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(m,p,w){return p===0&&w===m.length?B.fromByteArray(m):B.fromByteArray(m.slice(p,w))}function Bt(m,p,w){w=Math.min(m.length,w);const F=[];let V=p;for(;V<w;){const Y=m[V];let ot=null,Ft=Y>239?4:Y>223?3:Y>191?2:1;if(V+Ft<=w){let Zt,Jt,Xt,Ht;switch(Ft){case 1:Y<128&&(ot=Y);break;case 2:Zt=m[V+1],(Zt&192)===128&&(Ht=(Y&31)<<6|Zt&63,Ht>127&&(ot=Ht));break;case 3:Zt=m[V+1],Jt=m[V+2],(Zt&192)===128&&(Jt&192)===128&&(Ht=(Y&15)<<12|(Zt&63)<<6|Jt&63,Ht>2047&&(Ht<55296||Ht>57343)&&(ot=Ht));break;case 4:Zt=m[V+1],Jt=m[V+2],Xt=m[V+3],(Zt&192)===128&&(Jt&192)===128&&(Xt&192)===128&&(Ht=(Y&15)<<18|(Zt&63)<<12|(Jt&63)<<6|Xt&63,Ht>65535&&Ht<1114112&&(ot=Ht))}}ot===null?(ot=65533,Ft=1):ot>65535&&(ot-=65536,F.push(ot>>>10&1023|55296),ot=56320|ot&1023),F.push(ot),V+=Ft}return kt(F)}const bt=4096;function kt(m){const p=m.length;if(p<=bt)return String.fromCharCode.apply(String,m);let w="",F=0;for(;F<p;)w+=String.fromCharCode.apply(String,m.slice(F,F+=bt));return w}function pe(m,p,w){let F="";w=Math.min(m.length,w);for(let V=p;V<w;++V)F+=String.fromCharCode(m[V]&127);return F}function it(m,p,w){let F="";w=Math.min(m.length,w);for(let V=p;V<w;++V)F+=String.fromCharCode(m[V]);return F}function de(m,p,w){const F=m.length;(!p||p<0)&&(p=0),(!w||w<0||w>F)&&(w=F);let V="";for(let Y=p;Y<w;++Y)V+=so[m[Y]];return V}function we(m,p,w){const F=m.slice(p,w);let V="";for(let Y=0;Y<F.length-1;Y+=2)V+=String.fromCharCode(F[Y]+F[Y+1]*256);return V}L.prototype.slice=function(p,w){const F=this.length;p=~~p,w=w===void 0?F:~~w,p<0?(p+=F,p<0&&(p=0)):p>F&&(p=F),w<0?(w+=F,w<0&&(w=0)):w>F&&(w=F),w<p&&(w=p);const V=this.subarray(p,w);return Object.setPrototypeOf(V,L.prototype),V};function Gt(m,p,w){if(m%1!==0||m<0)throw new RangeError("offset is not uint");if(m+p>w)throw new RangeError("Trying to access beyond buffer length")}L.prototype.readUintLE=L.prototype.readUIntLE=function(p,w,F){p=p>>>0,w=w>>>0,F||Gt(p,w,this.length);let V=this[p],Y=1,ot=0;for(;++ot<w&&(Y*=256);)V+=this[p+ot]*Y;return V},L.prototype.readUintBE=L.prototype.readUIntBE=function(p,w,F){p=p>>>0,w=w>>>0,F||Gt(p,w,this.length);let V=this[p+--w],Y=1;for(;w>0&&(Y*=256);)V+=this[p+--w]*Y;return V},L.prototype.readUint8=L.prototype.readUInt8=function(p,w){return p=p>>>0,w||Gt(p,1,this.length),this[p]},L.prototype.readUint16LE=L.prototype.readUInt16LE=function(p,w){return p=p>>>0,w||Gt(p,2,this.length),this[p]|this[p+1]<<8},L.prototype.readUint16BE=L.prototype.readUInt16BE=function(p,w){return p=p>>>0,w||Gt(p,2,this.length),this[p]<<8|this[p+1]},L.prototype.readUint32LE=L.prototype.readUInt32LE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},L.prototype.readUint32BE=L.prototype.readUInt32BE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},L.prototype.readBigUInt64LE=Ze(function(p){p=p>>>0,U(p,"offset");const w=this[p],F=this[p+7];(w===void 0||F===void 0)&&J(p,this.length-8);const V=w+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,Y=this[++p]+this[++p]*2**8+this[++p]*2**16+F*2**24;return BigInt(V)+(BigInt(Y)<<BigInt(32))}),L.prototype.readBigUInt64BE=Ze(function(p){p=p>>>0,U(p,"offset");const w=this[p],F=this[p+7];(w===void 0||F===void 0)&&J(p,this.length-8);const V=w*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],Y=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+F;return(BigInt(V)<<BigInt(32))+BigInt(Y)}),L.prototype.readIntLE=function(p,w,F){p=p>>>0,w=w>>>0,F||Gt(p,w,this.length);let V=this[p],Y=1,ot=0;for(;++ot<w&&(Y*=256);)V+=this[p+ot]*Y;return Y*=128,V>=Y&&(V-=Math.pow(2,8*w)),V},L.prototype.readIntBE=function(p,w,F){p=p>>>0,w=w>>>0,F||Gt(p,w,this.length);let V=w,Y=1,ot=this[p+--V];for(;V>0&&(Y*=256);)ot+=this[p+--V]*Y;return Y*=128,ot>=Y&&(ot-=Math.pow(2,8*w)),ot},L.prototype.readInt8=function(p,w){return p=p>>>0,w||Gt(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},L.prototype.readInt16LE=function(p,w){p=p>>>0,w||Gt(p,2,this.length);const F=this[p]|this[p+1]<<8;return F&32768?F|4294901760:F},L.prototype.readInt16BE=function(p,w){p=p>>>0,w||Gt(p,2,this.length);const F=this[p+1]|this[p]<<8;return F&32768?F|4294901760:F},L.prototype.readInt32LE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},L.prototype.readInt32BE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},L.prototype.readBigInt64LE=Ze(function(p){p=p>>>0,U(p,"offset");const w=this[p],F=this[p+7];(w===void 0||F===void 0)&&J(p,this.length-8);const V=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(F<<24);return(BigInt(V)<<BigInt(32))+BigInt(w+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),L.prototype.readBigInt64BE=Ze(function(p){p=p>>>0,U(p,"offset");const w=this[p],F=this[p+7];(w===void 0||F===void 0)&&J(p,this.length-8);const V=(w<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(V)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+F)}),L.prototype.readFloatLE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),z.read(this,p,!0,23,4)},L.prototype.readFloatBE=function(p,w){return p=p>>>0,w||Gt(p,4,this.length),z.read(this,p,!1,23,4)},L.prototype.readDoubleLE=function(p,w){return p=p>>>0,w||Gt(p,8,this.length),z.read(this,p,!0,52,8)},L.prototype.readDoubleBE=function(p,w){return p=p>>>0,w||Gt(p,8,this.length),z.read(this,p,!1,52,8)};function Qt(m,p,w,F,V,Y){if(!L.isBuffer(m))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>V||p<Y)throw new RangeError('"value" argument is out of bounds');if(w+F>m.length)throw new RangeError("Index out of range")}L.prototype.writeUintLE=L.prototype.writeUIntLE=function(p,w,F,V){if(p=+p,w=w>>>0,F=F>>>0,!V){const Ft=Math.pow(2,8*F)-1;Qt(this,p,w,F,Ft,0)}let Y=1,ot=0;for(this[w]=p&255;++ot<F&&(Y*=256);)this[w+ot]=p/Y&255;return w+F},L.prototype.writeUintBE=L.prototype.writeUIntBE=function(p,w,F,V){if(p=+p,w=w>>>0,F=F>>>0,!V){const Ft=Math.pow(2,8*F)-1;Qt(this,p,w,F,Ft,0)}let Y=F-1,ot=1;for(this[w+Y]=p&255;--Y>=0&&(ot*=256);)this[w+Y]=p/ot&255;return w+F},L.prototype.writeUint8=L.prototype.writeUInt8=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,1,255,0),this[w]=p&255,w+1},L.prototype.writeUint16LE=L.prototype.writeUInt16LE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,2,65535,0),this[w]=p&255,this[w+1]=p>>>8,w+2},L.prototype.writeUint16BE=L.prototype.writeUInt16BE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,2,65535,0),this[w]=p>>>8,this[w+1]=p&255,w+2},L.prototype.writeUint32LE=L.prototype.writeUInt32LE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,4,4294967295,0),this[w+3]=p>>>24,this[w+2]=p>>>16,this[w+1]=p>>>8,this[w]=p&255,w+4},L.prototype.writeUint32BE=L.prototype.writeUInt32BE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,4,4294967295,0),this[w]=p>>>24,this[w+1]=p>>>16,this[w+2]=p>>>8,this[w+3]=p&255,w+4};function ge(m,p,w,F,V){P(p,F,V,m,w,7);let Y=Number(p&BigInt(4294967295));m[w++]=Y,Y=Y>>8,m[w++]=Y,Y=Y>>8,m[w++]=Y,Y=Y>>8,m[w++]=Y;let ot=Number(p>>BigInt(32)&BigInt(4294967295));return m[w++]=ot,ot=ot>>8,m[w++]=ot,ot=ot>>8,m[w++]=ot,ot=ot>>8,m[w++]=ot,w}function he(m,p,w,F,V){P(p,F,V,m,w,7);let Y=Number(p&BigInt(4294967295));m[w+7]=Y,Y=Y>>8,m[w+6]=Y,Y=Y>>8,m[w+5]=Y,Y=Y>>8,m[w+4]=Y;let ot=Number(p>>BigInt(32)&BigInt(4294967295));return m[w+3]=ot,ot=ot>>8,m[w+2]=ot,ot=ot>>8,m[w+1]=ot,ot=ot>>8,m[w]=ot,w+8}L.prototype.writeBigUInt64LE=Ze(function(p,w=0){return ge(this,p,w,BigInt(0),BigInt("0xffffffffffffffff"))}),L.prototype.writeBigUInt64BE=Ze(function(p,w=0){return he(this,p,w,BigInt(0),BigInt("0xffffffffffffffff"))}),L.prototype.writeIntLE=function(p,w,F,V){if(p=+p,w=w>>>0,!V){const Zt=Math.pow(2,8*F-1);Qt(this,p,w,F,Zt-1,-Zt)}let Y=0,ot=1,Ft=0;for(this[w]=p&255;++Y<F&&(ot*=256);)p<0&&Ft===0&&this[w+Y-1]!==0&&(Ft=1),this[w+Y]=(p/ot>>0)-Ft&255;return w+F},L.prototype.writeIntBE=function(p,w,F,V){if(p=+p,w=w>>>0,!V){const Zt=Math.pow(2,8*F-1);Qt(this,p,w,F,Zt-1,-Zt)}let Y=F-1,ot=1,Ft=0;for(this[w+Y]=p&255;--Y>=0&&(ot*=256);)p<0&&Ft===0&&this[w+Y+1]!==0&&(Ft=1),this[w+Y]=(p/ot>>0)-Ft&255;return w+F},L.prototype.writeInt8=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,1,127,-128),p<0&&(p=255+p+1),this[w]=p&255,w+1},L.prototype.writeInt16LE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,2,32767,-32768),this[w]=p&255,this[w+1]=p>>>8,w+2},L.prototype.writeInt16BE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,2,32767,-32768),this[w]=p>>>8,this[w+1]=p&255,w+2},L.prototype.writeInt32LE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,4,2147483647,-2147483648),this[w]=p&255,this[w+1]=p>>>8,this[w+2]=p>>>16,this[w+3]=p>>>24,w+4},L.prototype.writeInt32BE=function(p,w,F){return p=+p,w=w>>>0,F||Qt(this,p,w,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[w]=p>>>24,this[w+1]=p>>>16,this[w+2]=p>>>8,this[w+3]=p&255,w+4},L.prototype.writeBigInt64LE=Ze(function(p,w=0){return ge(this,p,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),L.prototype.writeBigInt64BE=Ze(function(p,w=0){return he(this,p,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ze(m,p,w,F,V,Y){if(w+F>m.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function Fe(m,p,w,F,V){return p=+p,w=w>>>0,V||ze(m,p,w,4),z.write(m,p,w,F,23,4),w+4}L.prototype.writeFloatLE=function(p,w,F){return Fe(this,p,w,!0,F)},L.prototype.writeFloatBE=function(p,w,F){return Fe(this,p,w,!1,F)};function _e(m,p,w,F,V){return p=+p,w=w>>>0,V||ze(m,p,w,8),z.write(m,p,w,F,52,8),w+8}L.prototype.writeDoubleLE=function(p,w,F){return _e(this,p,w,!0,F)},L.prototype.writeDoubleBE=function(p,w,F){return _e(this,p,w,!1,F)},L.prototype.copy=function(p,w,F,V){if(!L.isBuffer(p))throw new TypeError("argument should be a Buffer");if(F||(F=0),!V&&V!==0&&(V=this.length),w>=p.length&&(w=p.length),w||(w=0),V>0&&V<F&&(V=F),V===F||p.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(F<0||F>=this.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),p.length-w<V-F&&(V=p.length-w+F);const Y=V-F;return this===p&&typeof N.prototype.copyWithin=="function"?this.copyWithin(w,F,V):N.prototype.set.call(p,this.subarray(F,V),w),Y},L.prototype.fill=function(p,w,F,V){if(typeof p=="string"){if(typeof w=="string"?(V=w,w=0,F=this.length):typeof F=="string"&&(V=F,F=this.length),V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!L.isEncoding(V))throw new TypeError("Unknown encoding: "+V);if(p.length===1){const ot=p.charCodeAt(0);(V==="utf8"&&ot<128||V==="latin1")&&(p=ot)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(w<0||this.length<w||this.length<F)throw new RangeError("Out of range index");if(F<=w)return this;w=w>>>0,F=F===void 0?this.length:F>>>0,p||(p=0);let Y;if(typeof p=="number")for(Y=w;Y<F;++Y)this[Y]=p;else{const ot=L.isBuffer(p)?p:L.from(p,V),Ft=ot.length;if(Ft===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(Y=0;Y<F-w;++Y)this[Y+w]=ot[Y%Ft]}return this};const Ye={};function b(m,p,w){Ye[m]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${m}]`,this.stack,delete this.name}get code(){return m}set code(V){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:V,writable:!0})}toString(){return`${this.name} [${m}]: ${this.message}`}}}b("ERR_BUFFER_OUT_OF_BOUNDS",function(m){return m?`${m} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),b("ERR_INVALID_ARG_TYPE",function(m,p){return`The "${m}" argument must be of type number. Received type ${typeof p}`},TypeError),b("ERR_OUT_OF_RANGE",function(m,p,w){let F=`The value of "${m}" is out of range.`,V=w;return Number.isInteger(w)&&Math.abs(w)>2**32?V=h(String(w)):typeof w=="bigint"&&(V=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(V=h(V)),V+="n"),F+=` It must be ${p}. Received ${V}`,F},RangeError);function h(m){let p="",w=m.length;const F=m[0]==="-"?1:0;for(;w>=F+4;w-=3)p=`_${m.slice(w-3,w)}${p}`;return`${m.slice(0,w)}${p}`}function d(m,p,w){U(p,"offset"),(m[p]===void 0||m[p+w]===void 0)&&J(p,m.length-(w+1))}function P(m,p,w,F,V,Y){if(m>w||m<p){const ot=typeof p=="bigint"?"n":"";let Ft;throw p===0||p===BigInt(0)?Ft=`>= 0${ot} and < 2${ot} ** ${(Y+1)*8}${ot}`:Ft=`>= -(2${ot} ** ${(Y+1)*8-1}${ot}) and < 2 ** ${(Y+1)*8-1}${ot}`,new Ye.ERR_OUT_OF_RANGE("value",Ft,m)}d(F,V,Y)}function U(m,p){if(typeof m!="number")throw new Ye.ERR_INVALID_ARG_TYPE(p,"number",m)}function J(m,p,w){throw Math.floor(m)!==m?(U(m,w),new Ye.ERR_OUT_OF_RANGE("offset","an integer",m)):p<0?new Ye.ERR_BUFFER_OUT_OF_BOUNDS:new Ye.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${p}`,m)}const st=/[^+/0-9A-Za-z-_]/g;function It(m){if(m=m.split("=")[0],m=m.trim().replace(st,""),m.length<2)return"";for(;m.length%4!==0;)m=m+"=";return m}function Vt(m,p){p=p||1/0;let w;const F=m.length;let V=null;const Y=[];for(let ot=0;ot<F;++ot){if(w=m.charCodeAt(ot),w>55295&&w<57344){if(!V){if(w>56319){(p-=3)>-1&&Y.push(239,191,189);continue}else if(ot+1===F){(p-=3)>-1&&Y.push(239,191,189);continue}V=w;continue}if(w<56320){(p-=3)>-1&&Y.push(239,191,189),V=w;continue}w=(V-55296<<10|w-56320)+65536}else V&&(p-=3)>-1&&Y.push(239,191,189);if(V=null,w<128){if((p-=1)<0)break;Y.push(w)}else if(w<2048){if((p-=2)<0)break;Y.push(w>>6|192,w&63|128)}else if(w<65536){if((p-=3)<0)break;Y.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((p-=4)<0)break;Y.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return Y}function qt(m){const p=[];for(let w=0;w<m.length;++w)p.push(m.charCodeAt(w)&255);return p}function Wt(m,p){let w,F,V;const Y=[];for(let ot=0;ot<m.length&&!((p-=2)<0);++ot)w=m.charCodeAt(ot),F=w>>8,V=w%256,Y.push(V),Y.push(F);return Y}function Ut(m){return B.toByteArray(It(m))}function bi(m,p,w,F){let V;for(V=0;V<F&&!(V+w>=p.length||V>=m.length);++V)p[V+w]=m[V];return V}function Oe(m,p){return m instanceof p||m!=null&&m.constructor!=null&&m.constructor.name!=null&&m.constructor.name===p.name}function Wi(m){return m!==m}const so=function(){const m="0123456789abcdef",p=new Array(256);for(let w=0;w<16;++w){const F=w*16;for(let V=0;V<16;++V)p[F+V]=m[w]+m[V]}return p}();function Ze(m){return typeof BigInt>"u"?oo:m}function oo(){throw new Error("BigInt not supported")}})(t);const E=t.Buffer;n.Blob=t.Blob,n.BlobOptions=t.BlobOptions,n.Buffer=t.Buffer,n.File=t.File,n.FileOptions=t.FileOptions,n.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,n.SlowBuffer=t.SlowBuffer,n.TranscodeEncoding=t.TranscodeEncoding,n.atob=t.atob,n.btoa=t.btoa,n.constants=t.constants,n.default=E,n.isAscii=t.isAscii,n.isUtf8=t.isUtf8,n.kMaxLength=t.kMaxLength,n.kStringMaxLength=t.kStringMaxLength,n.resolveObjectURL=t.resolveObjectURL,n.transcode=t.transcode}(mc)),mc}var Ac={},Ec={},vc,Gh;function Hh(){return Gh||(Gh=1,vc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,e);if(u.value!==i||u.enumerable!==!0)return!1}return!0}),vc}var xc,Vh;function Rc(){if(Vh)return xc;Vh=1;var n=Hh();return xc=function(){return n()&&!!Symbol.toStringTag},xc}var Sc,qh;function Qh(){return qh||(qh=1,Sc=Object),Sc}var zc,Kh;function Om(){return Kh||(Kh=1,zc=Error),zc}var Bc,Wh;function Tm(){return Wh||(Wh=1,Bc=EvalError),Bc}var kc,Jh;function Cm(){return Jh||(Jh=1,kc=RangeError),kc}var Pc,$h;function Nm(){return $h||($h=1,Pc=ReferenceError),Pc}var Ic,Yh;function Zh(){return Yh||(Yh=1,Ic=SyntaxError),Ic}var Fc,Xh;function Jo(){return Xh||(Xh=1,Fc=TypeError),Fc}var Oc,tp;function Lm(){return tp||(tp=1,Oc=URIError),Oc}var Tc,ep;function Dm(){return ep||(ep=1,Tc=Math.abs),Tc}var Cc,rp;function Um(){return rp||(rp=1,Cc=Math.floor),Cc}var Nc,np;function Mm(){return np||(np=1,Nc=Math.max),Nc}var Lc,ip;function jm(){return ip||(ip=1,Lc=Math.min),Lc}var Dc,sp;function Gm(){return sp||(sp=1,Dc=Math.pow),Dc}var Uc,op;function Hm(){return op||(op=1,Uc=Math.round),Uc}var Mc,ap;function Vm(){return ap||(ap=1,Mc=Number.isNaN||function(t){return t!==t}),Mc}var jc,cp;function qm(){if(cp)return jc;cp=1;var n=Vm();return jc=function(e){return n(e)||e===0?e:e<0?-1:1},jc}var Gc,up;function Qm(){return up||(up=1,Gc=Object.getOwnPropertyDescriptor),Gc}var Hc,_p;function Ks(){if(_p)return Hc;_p=1;var n=Qm();if(n)try{n([],"length")}catch{n=null}return Hc=n,Hc}var Vc,fp;function $o(){if(fp)return Vc;fp=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Vc=n,Vc}var qc,lp;function Km(){if(lp)return qc;lp=1;var n=typeof Symbol<"u"&&Symbol,t=Hh();return qc=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},qc}var Qc,hp;function pp(){return hp||(hp=1,Qc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Qc}var Kc,dp;function wp(){if(dp)return Kc;dp=1;var n=Qh();return Kc=n.getPrototypeOf||null,Kc}var Wc,gp;function Wm(){if(gp)return Wc;gp=1;var n="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,r="[object Function]",i=function(_,l){for(var f=[],g=0;g<_.length;g+=1)f[g]=_[g];for(var y=0;y<l.length;y+=1)f[y+_.length]=l[y];return f},o=function(_,l){for(var f=[],g=l,y=0;g<_.length;g+=1,y+=1)f[y]=_[g];return f},a=function(u,_){for(var l="",f=0;f<u.length;f+=1)l+=u[f],f+1<u.length&&(l+=_);return l};return Wc=function(_){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(n+l);for(var f=o(arguments,1),g,y=function(){if(this instanceof g){var E=l.apply(this,i(f,arguments));return Object(E)===E?E:this}return l.apply(_,i(f,arguments))},v=e(0,l.length-f.length),I=[],k=0;k<v;k++)I[k]="$"+k;if(g=Function("binder","return function ("+a(I,",")+"){ return binder.apply(this,arguments); }")(y),l.prototype){var T=function(){};T.prototype=l.prototype,g.prototype=new T,T.prototype=null}return g},Wc}var Jc,yp;function Ws(){if(yp)return Jc;yp=1;var n=Wm();return Jc=Function.prototype.bind||n,Jc}var $c,bp;function Yc(){return bp||(bp=1,$c=Function.prototype.call),$c}var Zc,mp;function Xc(){return mp||(mp=1,Zc=Function.prototype.apply),Zc}var tu,Ap;function Jm(){return Ap||(Ap=1,tu=typeof Reflect<"u"&&Reflect&&Reflect.apply),tu}var eu,Ep;function vp(){if(Ep)return eu;Ep=1;var n=Ws(),t=Xc(),e=Yc(),r=Jm();return eu=r||n.call(e,t),eu}var ru,xp;function nu(){if(xp)return ru;xp=1;var n=Ws(),t=Jo(),e=Yc(),r=vp();return ru=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return r(n,e,o)},ru}var iu,Rp;function $m(){if(Rp)return iu;Rp=1;var n=nu(),t=Ks(),e;try{e=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!e&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return iu=r&&typeof r.get=="function"?n([r.get]):typeof o=="function"?function(u){return o(u==null?u:i(u))}:!1,iu}var su,Sp;function zp(){if(Sp)return su;Sp=1;var n=pp(),t=wp(),e=$m();return su=n?function(i){return n(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:e?function(i){return e(i)}:null,su}var ou,Bp;function Ym(){if(Bp)return ou;Bp=1;var n=Function.prototype.call,t=Object.prototype.hasOwnProperty,e=Ws();return ou=e.call(n,t),ou}var au,kp;function Pp(){if(kp)return au;kp=1;var n,t=Qh(),e=Om(),r=Tm(),i=Cm(),o=Nm(),a=Zh(),u=Jo(),_=Lm(),l=Dm(),f=Um(),g=Mm(),y=jm(),v=Gm(),I=Hm(),k=qm(),T=Function,E=function(ct){try{return T('"use strict"; return ('+ct+").constructor;")()}catch{}},R=Ks(),B=$o(),z=function(){throw new u},O=R?function(){try{return arguments.callee,z}catch{try{return R(arguments,"callee").get}catch{return z}}}():z,C=Km()(),N=zp(),D=wp(),$=pp(),et=Xc(),ft=Yc(),L={},vt=typeof Uint8Array>"u"||!N?n:N(Uint8Array),wt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":C&&N?N([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&N?N(N([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!C||!N?n:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":R,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!C||!N?n:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&N?N(""[Symbol.iterator]()):n,"%Symbol%":C?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":O,"%TypedArray%":vt,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":_,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":ft,"%Function.prototype.apply%":et,"%Object.defineProperty%":B,"%Object.getPrototypeOf%":D,"%Math.abs%":l,"%Math.floor%":f,"%Math.max%":g,"%Math.min%":y,"%Math.pow%":v,"%Math.round%":I,"%Math.sign%":k,"%Reflect.getPrototypeOf%":$};if(N)try{null.error}catch(ct){var at=N(N(ct));wt["%Error.prototype%"]=at}var pt=function ct(_t){var x;if(_t==="%AsyncFunction%")x=E("async function () {}");else if(_t==="%GeneratorFunction%")x=E("function* () {}");else if(_t==="%AsyncGeneratorFunction%")x=E("async function* () {}");else if(_t==="%AsyncGenerator%"){var S=ct("%AsyncGeneratorFunction%");S&&(x=S.prototype)}else if(_t==="%AsyncIteratorPrototype%"){var rt=ct("%AsyncGenerator%");rt&&N&&(x=N(rt.prototype))}return wt[_t]=x,x},mt={__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"]},Rt=Ws(),xt=Ym(),Pt=Rt.call(ft,Array.prototype.concat),jt=Rt.call(et,Array.prototype.splice),W=Rt.call(ft,String.prototype.replace),Z=Rt.call(ft,String.prototype.slice),nt=Rt.call(ft,RegExp.prototype.exec),yt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,M=function(_t){var x=Z(_t,0,1),S=Z(_t,-1);if(x==="%"&&S!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(S==="%"&&x!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var rt=[];return W(_t,yt,function(lt,Bt,bt,kt){rt[rt.length]=bt?W(kt,H,"$1"):Bt||lt}),rt},X=function(_t,x){var S=_t,rt;if(xt(mt,S)&&(rt=mt[S],S="%"+rt[0]+"%"),xt(wt,S)){var lt=wt[S];if(lt===L&&(lt=pt(S)),typeof lt>"u"&&!x)throw new u("intrinsic "+_t+" exists, but is not available. Please file an issue!");return{alias:rt,name:S,value:lt}}throw new a("intrinsic "+_t+" does not exist!")};return au=function(_t,x){if(typeof _t!="string"||_t.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof x!="boolean")throw new u('"allowMissing" argument must be a boolean');if(nt(/^%?[^%]*%?$/,_t)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var S=M(_t),rt=S.length>0?S[0]:"",lt=X("%"+rt+"%",x),Bt=lt.name,bt=lt.value,kt=!1,pe=lt.alias;pe&&(rt=pe[0],jt(S,Pt([0,1],pe)));for(var it=1,de=!0;it<S.length;it+=1){var we=S[it],Gt=Z(we,0,1),Qt=Z(we,-1);if((Gt==='"'||Gt==="'"||Gt==="`"||Qt==='"'||Qt==="'"||Qt==="`")&&Gt!==Qt)throw new a("property names with quotes must have matching quotes");if((we==="constructor"||!de)&&(kt=!0),rt+="."+we,Bt="%"+rt+"%",xt(wt,Bt))bt=wt[Bt];else if(bt!=null){if(!(we in bt)){if(!x)throw new u("base intrinsic for "+_t+" exists, but the property is not available.");return}if(R&&it+1>=S.length){var ge=R(bt,we);de=!!ge,de&&"get"in ge&&!("originalValue"in ge.get)?bt=ge.get:bt=bt[we]}else de=xt(bt,we),bt=bt[we];de&&!kt&&(wt[Bt]=bt)}}return bt},au}var cu,Ip;function Fp(){if(Ip)return cu;Ip=1;var n=Pp(),t=nu(),e=t([n("%String.prototype.indexOf%")]);return cu=function(i,o){var a=n(i,!!o);return typeof a=="function"&&e(i,".prototype.")>-1?t([a]):a},cu}var uu,Op;function Zm(){if(Op)return uu;Op=1;var n=Rc()(),t=Fp(),e=t("Object.prototype.toString"),r=function(u){return n&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:e(u)==="[object Arguments]"},i=function(u){return r(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&e(u)!=="[object Array]"&&"callee"in u&&e(u.callee)==="[object Function]"},o=function(){return r(arguments)}();return r.isLegacyArguments=i,uu=o?r:i,uu}var _u,Tp;function Xm(){if(Tp)return _u;Tp=1;var n=Object.prototype.toString,t=Function.prototype.toString,e=/^\s*(?:function)?\*/,r=Rc()(),i=Object.getPrototypeOf,o=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},a;return _u=function(_){if(typeof _!="function")return!1;if(e.test(t.call(_)))return!0;if(!r){var l=n.call(_);return l==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var f=o();a=f?i(f):!1}return i(_)===a},_u}var fu,Cp;function t2(){if(Cp)return fu;Cp=1;var n=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,e,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,e)}catch(R){R!==r&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(B){try{var z=n.call(B);return i.test(z)}catch{return!1}},a=function(B){try{return o(B)?!1:(n.call(B),!0)}catch{return!1}},u=Object.prototype.toString,_="[object Object]",l="[object Function]",f="[object GeneratorFunction]",g="[object HTMLAllCollection]",y="[object HTML document.all class]",v="[object HTMLCollection]",I=typeof Symbol=="function"&&!!Symbol.toStringTag,k=!(0 in[,]),T=function(){return!1};if(typeof document=="object"){var E=document.all;u.call(E)===u.call(document.all)&&(T=function(B){if((k||!B)&&(typeof B>"u"||typeof B=="object"))try{var z=u.call(B);return(z===g||z===y||z===v||z===_)&&B("")==null}catch{}return!1})}return fu=t?function(B){if(T(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;try{t(B,null,e)}catch(z){if(z!==r)return!1}return!o(B)&&a(B)}:function(B){if(T(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;if(I)return a(B);if(o(B))return!1;var z=u.call(B);return z!==l&&z!==f&&!/^\[object HTML/.test(z)?!1:a(B)},fu}var lu,Np;function e2(){if(Np)return lu;Np=1;var n=t2(),t=Object.prototype.toString,e=Object.prototype.hasOwnProperty,r=function(_,l,f){for(var g=0,y=_.length;g<y;g++)e.call(_,g)&&(f==null?l(_[g],g,_):l.call(f,_[g],g,_))},i=function(_,l,f){for(var g=0,y=_.length;g<y;g++)f==null?l(_.charAt(g),g,_):l.call(f,_.charAt(g),g,_)},o=function(_,l,f){for(var g in _)e.call(_,g)&&(f==null?l(_[g],g,_):l.call(f,_[g],g,_))};function a(u){return t.call(u)==="[object Array]"}return lu=function(_,l,f){if(!n(l))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=f),a(_)?r(_,l,g):typeof _=="string"?i(_,l,g):o(_,l,g)},lu}var hu,Lp;function r2(){return Lp||(Lp=1,hu=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),hu}var pu,Dp;function n2(){if(Dp)return pu;Dp=1;var n=r2(),t=typeof globalThis>"u"?pi:globalThis;return pu=function(){for(var r=[],i=0;i<n.length;i++)typeof t[n[i]]=="function"&&(r[r.length]=n[i]);return r},pu}var du={exports:{}},wu,Up;function i2(){if(Up)return wu;Up=1;var n=$o(),t=Zh(),e=Jo(),r=Ks();return wu=function(o,a,u){if(!o||typeof o!="object"&&typeof o!="function")throw new e("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new e("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new e("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new e("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new e("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new e("`loose`, if provided, must be a boolean");var _=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,y=!!r&&r(o,a);if(n)n(o,a,{configurable:f===null&&y?y.configurable:!f,enumerable:_===null&&y?y.enumerable:!_,value:u,writable:l===null&&y?y.writable:!l});else if(g||!_&&!l&&!f)o[a]=u;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},wu}var gu,Mp;function s2(){if(Mp)return gu;Mp=1;var n=$o(),t=function(){return!!n};return t.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},gu=t,gu}var yu,jp;function o2(){if(jp)return yu;jp=1;var n=Pp(),t=i2(),e=s2()(),r=Ks(),i=Jo(),o=n("%Math.floor%");return yu=function(u,_){if(typeof u!="function")throw new i("`fn` is not a function");if(typeof _!="number"||_<0||_>4294967295||o(_)!==_)throw new i("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],f=!0,g=!0;if("length"in u&&r){var y=r(u,"length");y&&!y.configurable&&(f=!1),y&&!y.writable&&(g=!1)}return(f||g||!l)&&(e?t(u,"length",_,!0,!0):t(u,"length",_)),u},yu}var bu,Gp;function a2(){if(Gp)return bu;Gp=1;var n=Ws(),t=Xc(),e=vp();return bu=function(){return e(n,t,arguments)},bu}var Hp;function c2(){return Hp||(Hp=1,function(n){var t=o2(),e=$o(),r=nu(),i=a2();n.exports=function(a){var u=r(arguments),_=a.length-(arguments.length-1);return t(u,1+(_>0?_:0),!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i}(du)),du.exports}var mu,Vp;function qp(){if(Vp)return mu;Vp=1;var n=e2(),t=n2(),e=c2(),r=Fp(),i=Ks(),o=zp(),a=r("Object.prototype.toString"),u=Rc()(),_=typeof globalThis>"u"?pi:globalThis,l=t(),f=r("String.prototype.slice"),g=r("Array.prototype.indexOf",!0)||function(T,E){for(var R=0;R<T.length;R+=1)if(T[R]===E)return R;return-1},y={__proto__:null};u&&i&&o?n(l,function(k){var T=new _[k];if(Symbol.toStringTag in T&&o){var E=o(T),R=i(E,Symbol.toStringTag);if(!R&&E){var B=o(E);R=i(B,Symbol.toStringTag)}y["$"+k]=e(R.get)}}):n(l,function(k){var T=new _[k],E=T.slice||T.set;E&&(y["$"+k]=e(E))});var v=function(T){var E=!1;return n(y,function(R,B){if(!E)try{"$"+R(T)===B&&(E=f(B,1))}catch{}}),E},I=function(T){var E=!1;return n(y,function(R,B){if(!E)try{R(T),E=f(B,1)}catch{}}),E};return mu=function(T){if(!T||typeof T!="object")return!1;if(!u){var E=f(a(T),8,-1);return g(l,E)>-1?E:E!=="Object"?!1:I(T)}return i?v(T):null},mu}var Au,Qp;function u2(){if(Qp)return Au;Qp=1;var n=qp();return Au=function(e){return!!n(e)},Au}var Kp;function _2(){return Kp||(Kp=1,function(n){var t=Zm(),e=Xm(),r=qp(),i=u2();function o(it){return it.call.bind(it)}var a=typeof BigInt<"u",u=typeof Symbol<"u",_=o(Object.prototype.toString),l=o(Number.prototype.valueOf),f=o(String.prototype.valueOf),g=o(Boolean.prototype.valueOf);if(a)var y=o(BigInt.prototype.valueOf);if(u)var v=o(Symbol.prototype.valueOf);function I(it,de){if(typeof it!="object")return!1;try{return de(it),!0}catch{return!1}}n.isArgumentsObject=t,n.isGeneratorFunction=e,n.isTypedArray=i;function k(it){return typeof Promise<"u"&&it instanceof Promise||it!==null&&typeof it=="object"&&typeof it.then=="function"&&typeof it.catch=="function"}n.isPromise=k;function T(it){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(it):i(it)||Z(it)}n.isArrayBufferView=T;function E(it){return r(it)==="Uint8Array"}n.isUint8Array=E;function R(it){return r(it)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function B(it){return r(it)==="Uint16Array"}n.isUint16Array=B;function z(it){return r(it)==="Uint32Array"}n.isUint32Array=z;function O(it){return r(it)==="Int8Array"}n.isInt8Array=O;function C(it){return r(it)==="Int16Array"}n.isInt16Array=C;function N(it){return r(it)==="Int32Array"}n.isInt32Array=N;function D(it){return r(it)==="Float32Array"}n.isFloat32Array=D;function $(it){return r(it)==="Float64Array"}n.isFloat64Array=$;function et(it){return r(it)==="BigInt64Array"}n.isBigInt64Array=et;function ft(it){return r(it)==="BigUint64Array"}n.isBigUint64Array=ft;function L(it){return _(it)==="[object Map]"}L.working=typeof Map<"u"&&L(new Map);function vt(it){return typeof Map>"u"?!1:L.working?L(it):it instanceof Map}n.isMap=vt;function wt(it){return _(it)==="[object Set]"}wt.working=typeof Set<"u"&&wt(new Set);function at(it){return typeof Set>"u"?!1:wt.working?wt(it):it instanceof Set}n.isSet=at;function pt(it){return _(it)==="[object WeakMap]"}pt.working=typeof WeakMap<"u"&&pt(new WeakMap);function mt(it){return typeof WeakMap>"u"?!1:pt.working?pt(it):it instanceof WeakMap}n.isWeakMap=mt;function Rt(it){return _(it)==="[object WeakSet]"}Rt.working=typeof WeakSet<"u"&&Rt(new WeakSet);function xt(it){return Rt(it)}n.isWeakSet=xt;function Pt(it){return _(it)==="[object ArrayBuffer]"}Pt.working=typeof ArrayBuffer<"u"&&Pt(new ArrayBuffer);function jt(it){return typeof ArrayBuffer>"u"?!1:Pt.working?Pt(it):it instanceof ArrayBuffer}n.isArrayBuffer=jt;function W(it){return _(it)==="[object DataView]"}W.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&W(new DataView(new ArrayBuffer(1),0,1));function Z(it){return typeof DataView>"u"?!1:W.working?W(it):it instanceof DataView}n.isDataView=Z;var nt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function yt(it){return _(it)==="[object SharedArrayBuffer]"}function H(it){return typeof nt>"u"?!1:(typeof yt.working>"u"&&(yt.working=yt(new nt)),yt.working?yt(it):it instanceof nt)}n.isSharedArrayBuffer=H;function M(it){return _(it)==="[object AsyncFunction]"}n.isAsyncFunction=M;function X(it){return _(it)==="[object Map Iterator]"}n.isMapIterator=X;function ct(it){return _(it)==="[object Set Iterator]"}n.isSetIterator=ct;function _t(it){return _(it)==="[object Generator]"}n.isGeneratorObject=_t;function x(it){return _(it)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=x;function S(it){return I(it,l)}n.isNumberObject=S;function rt(it){return I(it,f)}n.isStringObject=rt;function lt(it){return I(it,g)}n.isBooleanObject=lt;function Bt(it){return a&&I(it,y)}n.isBigIntObject=Bt;function bt(it){return u&&I(it,v)}n.isSymbolObject=bt;function kt(it){return S(it)||rt(it)||lt(it)||Bt(it)||bt(it)}n.isBoxedPrimitive=kt;function pe(it){return typeof Uint8Array<"u"&&(jt(it)||H(it))}n.isAnyArrayBuffer=pe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(it){Object.defineProperty(n,it,{enumerable:!1,value:function(){throw new Error(it+" is not supported in userland")}})})}(Ec)),Ec}var Eu,Wp;function f2(){return Wp||(Wp=1,Eu=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),Eu}var Yo={exports:{}},Jp;function ds(){return Jp||(Jp=1,typeof Object.create=="function"?Yo.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Yo.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}),Yo.exports}var $p;function Yp(){return $p||($p=1,function(n){var t=Object.getOwnPropertyDescriptors||function(Z){for(var nt=Object.keys(Z),yt={},H=0;H<nt.length;H++)yt[nt[H]]=Object.getOwnPropertyDescriptor(Z,nt[H]);return yt},e=/%[sdj%]/g;n.format=function(W){if(!O(W)){for(var Z=[],nt=0;nt<arguments.length;nt++)Z.push(a(arguments[nt]));return Z.join(" ")}for(var nt=1,yt=arguments,H=yt.length,M=String(W).replace(e,function(ct){if(ct==="%%")return"%";if(nt>=H)return ct;switch(ct){case"%s":return String(yt[nt++]);case"%d":return Number(yt[nt++]);case"%j":try{return JSON.stringify(yt[nt++])}catch{return"[Circular]"}default:return ct}}),X=yt[nt];nt<H;X=yt[++nt])R(X)||!$(X)?M+=" "+X:M+=" "+a(X);return M},n.deprecate=function(W,Z){if(typeof Ct<"u"&&Ct.noDeprecation===!0)return W;if(typeof Ct>"u")return function(){return n.deprecate(W,Z).apply(this,arguments)};var nt=!1;function yt(){if(!nt){if(Ct.throwDeprecation)throw new Error(Z);Ct.traceDeprecation?console.trace(Z):console.error(Z),nt=!0}return W.apply(this,arguments)}return yt};var r={},i=/^$/;if(Ct.env.NODE_DEBUG){var o=Ct.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}n.debuglog=function(W){if(W=W.toUpperCase(),!r[W])if(i.test(W)){var Z=Ct.pid;r[W]=function(){var nt=n.format.apply(n,arguments);console.error("%s %d: %s",W,Z,nt)}}else r[W]=function(){};return r[W]};function a(W,Z){var nt={seen:[],stylize:_};return arguments.length>=3&&(nt.depth=arguments[2]),arguments.length>=4&&(nt.colors=arguments[3]),E(Z)?nt.showHidden=Z:Z&&n._extend(nt,Z),N(nt.showHidden)&&(nt.showHidden=!1),N(nt.depth)&&(nt.depth=2),N(nt.colors)&&(nt.colors=!1),N(nt.customInspect)&&(nt.customInspect=!0),nt.colors&&(nt.stylize=u),f(nt,W,nt.depth)}n.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u(W,Z){var nt=a.styles[Z];return nt?"\x1B["+a.colors[nt][0]+"m"+W+"\x1B["+a.colors[nt][1]+"m":W}function _(W,Z){return W}function l(W){var Z={};return W.forEach(function(nt,yt){Z[nt]=!0}),Z}function f(W,Z,nt){if(W.customInspect&&Z&&L(Z.inspect)&&Z.inspect!==n.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var yt=Z.inspect(nt,W);return O(yt)||(yt=f(W,yt,nt)),yt}var H=g(W,Z);if(H)return H;var M=Object.keys(Z),X=l(M);if(W.showHidden&&(M=Object.getOwnPropertyNames(Z)),ft(Z)&&(M.indexOf("message")>=0||M.indexOf("description")>=0))return y(Z);if(M.length===0){if(L(Z)){var ct=Z.name?": "+Z.name:"";return W.stylize("[Function"+ct+"]","special")}if(D(Z))return W.stylize(RegExp.prototype.toString.call(Z),"regexp");if(et(Z))return W.stylize(Date.prototype.toString.call(Z),"date");if(ft(Z))return y(Z)}var _t="",x=!1,S=["{","}"];if(T(Z)&&(x=!0,S=["[","]"]),L(Z)){var rt=Z.name?": "+Z.name:"";_t=" [Function"+rt+"]"}if(D(Z)&&(_t=" "+RegExp.prototype.toString.call(Z)),et(Z)&&(_t=" "+Date.prototype.toUTCString.call(Z)),ft(Z)&&(_t=" "+y(Z)),M.length===0&&(!x||Z.length==0))return S[0]+_t+S[1];if(nt<0)return D(Z)?W.stylize(RegExp.prototype.toString.call(Z),"regexp"):W.stylize("[Object]","special");W.seen.push(Z);var lt;return x?lt=v(W,Z,nt,X,M):lt=M.map(function(Bt){return I(W,Z,nt,X,Bt,x)}),W.seen.pop(),k(lt,_t,S)}function g(W,Z){if(N(Z))return W.stylize("undefined","undefined");if(O(Z)){var nt="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(nt,"string")}if(z(Z))return W.stylize(""+Z,"number");if(E(Z))return W.stylize(""+Z,"boolean");if(R(Z))return W.stylize("null","null")}function y(W){return"["+Error.prototype.toString.call(W)+"]"}function v(W,Z,nt,yt,H){for(var M=[],X=0,ct=Z.length;X<ct;++X)Rt(Z,String(X))?M.push(I(W,Z,nt,yt,String(X),!0)):M.push("");return H.forEach(function(_t){_t.match(/^\d+$/)||M.push(I(W,Z,nt,yt,_t,!0))}),M}function I(W,Z,nt,yt,H,M){var X,ct,_t;if(_t=Object.getOwnPropertyDescriptor(Z,H)||{value:Z[H]},_t.get?_t.set?ct=W.stylize("[Getter/Setter]","special"):ct=W.stylize("[Getter]","special"):_t.set&&(ct=W.stylize("[Setter]","special")),Rt(yt,H)||(X="["+H+"]"),ct||(W.seen.indexOf(_t.value)<0?(R(nt)?ct=f(W,_t.value,null):ct=f(W,_t.value,nt-1),ct.indexOf(`
12
12
  `)>-1&&(M?ct=ct.split(`
13
13
  `).map(function(x){return" "+x}).join(`
14
14
  `).slice(2):ct=`
15
15
  `+ct.split(`
16
16
  `).map(function(x){return" "+x}).join(`
17
- `))):ct=W.stylize("[Circular]","special")),N(X)){if(M&&G.match(/^\d+$/))return ct;X=JSON.stringify(""+G),X.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(X=X.slice(1,-1),X=W.stylize(X,"name")):(X=X.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),X=W.stylize(X,"string"))}return X+": "+ct}function k(W,Z,rt){var gt=W.reduce(function(G,M){return M.indexOf(`
18
- `)>=0,G+M.replace(/\u001b\[\d\d?m/g,"").length+1},0);return gt>60?rt[0]+(Z===""?"":Z+`
17
+ `))):ct=W.stylize("[Circular]","special")),N(X)){if(M&&H.match(/^\d+$/))return ct;X=JSON.stringify(""+H),X.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(X=X.slice(1,-1),X=W.stylize(X,"name")):(X=X.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),X=W.stylize(X,"string"))}return X+": "+ct}function k(W,Z,nt){var yt=W.reduce(function(H,M){return M.indexOf(`
18
+ `)>=0,H+M.replace(/\u001b\[\d\d?m/g,"").length+1},0);return yt>60?nt[0]+(Z===""?"":Z+`
19
19
  `)+" "+W.join(`,
20
- `)+" "+rt[1]:rt[0]+Z+" "+W.join(", ")+" "+rt[1]}n.types=i2();function T(W){return Array.isArray(W)}n.isArray=T;function E(W){return typeof W=="boolean"}n.isBoolean=E;function R(W){return W===null}n.isNull=R;function B(W){return W==null}n.isNullOrUndefined=B;function z(W){return typeof W=="number"}n.isNumber=z;function O(W){return typeof W=="string"}n.isString=O;function C(W){return typeof W=="symbol"}n.isSymbol=C;function N(W){return W===void 0}n.isUndefined=N;function L(W){return J(W)&&wt(W)==="[object RegExp]"}n.isRegExp=L,n.types.isRegExp=L;function J(W){return typeof W=="object"&&W!==null}n.isObject=J;function nt(W){return J(W)&&wt(W)==="[object Date]"}n.isDate=nt,n.types.isDate=nt;function dt(W){return J(W)&&(wt(W)==="[object Error]"||W instanceof Error)}n.isError=dt,n.types.isNativeError=dt;function D(W){return typeof W=="function"}n.isFunction=D;function vt(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W>"u"}n.isPrimitive=vt,n.isBuffer=s2();function wt(W){return Object.prototype.toString.call(W)}function at(W){return W<10?"0"+W.toString(10):W.toString(10)}var ht=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mt(){var W=new Date,Z=[at(W.getHours()),at(W.getMinutes()),at(W.getSeconds())].join(":");return[W.getDate(),ht[W.getMonth()],Z].join(" ")}n.log=function(){console.log("%s - %s",mt(),n.format.apply(n,arguments))},n.inherits=ds(),n._extend=function(W,Z){if(!Z||!J(Z))return W;for(var rt=Object.keys(Z),gt=rt.length;gt--;)W[rt[gt]]=Z[rt[gt]];return W};function Rt(W,Z){return Object.prototype.hasOwnProperty.call(W,Z)}var xt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(xt&&Z[xt]){var rt=Z[xt];if(typeof rt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(rt,xt,{value:rt,enumerable:!1,writable:!1,configurable:!0}),rt}function rt(){for(var gt,G,M=new Promise(function(_t,x){gt=_t,G=x}),X=[],ct=0;ct<arguments.length;ct++)X.push(arguments[ct]);X.push(function(_t,x){_t?G(_t):gt(x)});try{Z.apply(this,X)}catch(_t){G(_t)}return M}return Object.setPrototypeOf(rt,Object.getPrototypeOf(Z)),xt&&Object.defineProperty(rt,xt,{value:rt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(rt,t(Z))},n.promisify.custom=xt;function kt(W,Z){if(!W){var rt=new Error("Promise was rejected with a falsy value");rt.reason=W,W=rt}return Z(W)}function jt(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');function Z(){for(var rt=[],gt=0;gt<arguments.length;gt++)rt.push(arguments[gt]);var G=rt.pop();if(typeof G!="function")throw new TypeError("The last argument must be of type Function");var M=this,X=function(){return G.apply(M,arguments)};W.apply(this,rt).then(function(ct){Ct.nextTick(X.bind(null,null,ct))},function(ct){Ct.nextTick(kt.bind(null,ct,X))})}return Object.setPrototypeOf(Z,Object.getPrototypeOf(W)),Object.defineProperties(Z,t(W)),Z}n.callbackify=jt}(mc)),mc}var Eu,Wp;function o2(){if(Wp)return Eu;Wp=1;function n(F,k){var T=Object.keys(F);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(F);k&&(E=E.filter(function(R){return Object.getOwnPropertyDescriptor(F,R).enumerable})),T.push.apply(T,E)}return T}function t(F){for(var k=1;k<arguments.length;k++){var T=arguments[k]!=null?arguments[k]:{};k%2?n(Object(T),!0).forEach(function(E){e(F,E,T[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(T)):n(Object(T)).forEach(function(E){Object.defineProperty(F,E,Object.getOwnPropertyDescriptor(T,E))})}return F}function e(F,k,T){return k=a(k),k in F?Object.defineProperty(F,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):F[k]=T,F}function r(F,k){if(!(F instanceof k))throw new TypeError("Cannot call a class as a function")}function i(F,k){for(var T=0;T<k.length;T++){var E=k[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(F,a(E.key),E)}}function o(F,k,T){return k&&i(F.prototype,k),Object.defineProperty(F,"prototype",{writable:!1}),F}function a(F){var k=u(F,"string");return typeof k=="symbol"?k:String(k)}function u(F,k){if(typeof F!="object"||F===null)return F;var T=F[Symbol.toPrimitive];if(T!==void 0){var E=T.call(F,k);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(F)}var _=Wo(),l=_.Buffer,f=Kp(),g=f.inspect,y=g&&g.custom||"inspect";function v(F,k,T){l.prototype.copy.call(F,k,T)}return Eu=function(){function F(){r(this,F),this.head=null,this.tail=null,this.length=0}return o(F,[{key:"push",value:function(T){var E={data:T,next:null};this.length>0?this.tail.next=E:this.head=E,this.tail=E,++this.length}},{key:"unshift",value:function(T){var E={data:T,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var E=this.head,R=""+E.data;E=E.next;)R+=T+E.data;return R}},{key:"concat",value:function(T){if(this.length===0)return l.alloc(0);for(var E=l.allocUnsafe(T>>>0),R=this.head,B=0;R;)v(R.data,E,B),B+=R.data.length,R=R.next;return E}},{key:"consume",value:function(T,E){var R;return T<this.head.data.length?(R=this.head.data.slice(0,T),this.head.data=this.head.data.slice(T)):T===this.head.data.length?R=this.shift():R=E?this._getString(T):this._getBuffer(T),R}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(T){var E=this.head,R=1,B=E.data;for(T-=B.length;E=E.next;){var z=E.data,O=T>z.length?z.length:T;if(O===z.length?B+=z:B+=z.slice(0,T),T-=O,T===0){O===z.length?(++R,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=z.slice(O));break}++R}return this.length-=R,B}},{key:"_getBuffer",value:function(T){var E=l.allocUnsafe(T),R=this.head,B=1;for(R.data.copy(E),T-=R.data.length;R=R.next;){var z=R.data,O=T>z.length?z.length:T;if(z.copy(E,E.length-T,0,O),T-=O,T===0){O===z.length?(++B,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=z.slice(O));break}++B}return this.length-=B,E}},{key:y,value:function(T,E){return g(this,t(t({},E),{},{depth:0,customInspect:!1}))}}]),F}(),Eu}var vu,Jp;function $p(){if(Jp)return vu;Jp=1;function n(a,u){var _=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(u?u(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ct.nextTick(i,this,a)):Ct.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(g){!u&&g?_._writableState?_._writableState.errorEmitted?Ct.nextTick(e,_):(_._writableState.errorEmitted=!0,Ct.nextTick(t,_,g)):Ct.nextTick(t,_,g):u?(Ct.nextTick(e,_),u(g)):Ct.nextTick(e,_)}),this)}function t(a,u){i(a,u),e(a)}function e(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,u){a.emit("error",u)}function o(a,u){var _=a._readableState,l=a._writableState;_&&_.autoDestroy||l&&l.autoDestroy?a.destroy(u):a.emit("error",u)}return vu={destroy:n,undestroy:r,errorOrDestroy:o},vu}var xu={},Yp;function ws(){if(Yp)return xu;Yp=1;function n(u,_){u.prototype=Object.create(_.prototype),u.prototype.constructor=u,u.__proto__=_}var t={};function e(u,_,l){l||(l=Error);function f(y,v,F){return typeof _=="string"?_:_(y,v,F)}var g=function(y){n(v,y);function v(F,k,T){return y.call(this,f(F,k,T))||this}return v}(l);g.prototype.name=l.name,g.prototype.code=u,t[u]=g}function r(u,_){if(Array.isArray(u)){var l=u.length;return u=u.map(function(f){return String(f)}),l>2?"one of ".concat(_," ").concat(u.slice(0,l-1).join(", "),", or ")+u[l-1]:l===2?"one of ".concat(_," ").concat(u[0]," or ").concat(u[1]):"of ".concat(_," ").concat(u[0])}else return"of ".concat(_," ").concat(String(u))}function i(u,_,l){return u.substr(0,_.length)===_}function o(u,_,l){return(l===void 0||l>u.length)&&(l=u.length),u.substring(l-_.length,l)===_}function a(u,_,l){return typeof l!="number"&&(l=0),l+_.length>u.length?!1:u.indexOf(_,l)!==-1}return e("ERR_INVALID_OPT_VALUE",function(u,_){return'The value "'+_+'" is invalid for option "'+u+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(u,_,l){var f;typeof _=="string"&&i(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var g;if(o(u," argument"))g="The ".concat(u," ").concat(f," ").concat(r(_,"type"));else{var y=a(u,".")?"property":"argument";g='The "'.concat(u,'" ').concat(y," ").concat(f," ").concat(r(_,"type"))}return g+=". Received type ".concat(typeof l),g},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),xu.codes=t,xu}var Ru,Zp;function Xp(){if(Zp)return Ru;Zp=1;var n=ws().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function e(r,i,o,a){var u=t(i,a,o);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var _=a?o:"highWaterMark";throw new n(_,u)}return Math.floor(u)}return r.objectMode?16:16*1024}return Ru={getHighWaterMark:e},Ru}var Su,td;function a2(){if(td)return Su;td=1,Su=n;function n(e,r){if(t("noDeprecation"))return e;var i=!1;function o(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return e.apply(this,arguments)}return o}function t(e){try{if(!hi.localStorage)return!1}catch{return!1}var r=hi.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}return Su}var zu,ed;function rd(){if(ed)return zu;ed=1,zu=L;function n(G){var M=this;this.next=null,this.entry=null,this.finish=function(){gt(M,G)}}var t;L.WritableState=C;var e={deprecate:a2()},r=Nh(),i=Wo().Buffer,o=(typeof hi<"u"?hi:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(G){return i.from(G)}function u(G){return i.isBuffer(G)||G instanceof o}var _=$p(),l=Xp(),f=l.getHighWaterMark,g=ws().codes,y=g.ERR_INVALID_ARG_TYPE,v=g.ERR_METHOD_NOT_IMPLEMENTED,F=g.ERR_MULTIPLE_CALLBACK,k=g.ERR_STREAM_CANNOT_PIPE,T=g.ERR_STREAM_DESTROYED,E=g.ERR_STREAM_NULL_VALUES,R=g.ERR_STREAM_WRITE_AFTER_END,B=g.ERR_UNKNOWN_ENCODING,z=_.errorOrDestroy;ds()(L,r);function O(){}function C(G,M,X){t=t||gs(),G=G||{},typeof X!="boolean"&&(X=M instanceof t),this.objectMode=!!G.objectMode,X&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=f(this,G,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ct=G.decodeStrings===!1;this.decodeStrings=!ct,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(_t){ht(M,_t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var M=this.bufferedRequest,X=[];M;)X.push(M),M=M.next;return X},function(){try{Object.defineProperty(C.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var N;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(N=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(M){return N.call(this,M)?!0:this!==L?!1:M&&M._writableState instanceof C}})):N=function(M){return M instanceof this};function L(G){t=t||gs();var M=this instanceof t;if(!M&&!N.call(L,this))return new L(G);this._writableState=new C(G,this,M),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),r.call(this)}L.prototype.pipe=function(){z(this,new k)};function J(G,M){var X=new R;z(G,X),Ct.nextTick(M,X)}function nt(G,M,X,ct){var _t;return X===null?_t=new E:typeof X!="string"&&!M.objectMode&&(_t=new y("chunk",["string","Buffer"],X)),_t?(z(G,_t),Ct.nextTick(ct,_t),!1):!0}L.prototype.write=function(G,M,X){var ct=this._writableState,_t=!1,x=!ct.objectMode&&u(G);return x&&!i.isBuffer(G)&&(G=a(G)),typeof M=="function"&&(X=M,M=null),x?M="buffer":M||(M=ct.defaultEncoding),typeof X!="function"&&(X=O),ct.ending?J(this,X):(x||nt(this,ct,G,X))&&(ct.pendingcb++,_t=D(this,ct,x,G,M,X)),_t},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&xt(this,G))},L.prototype.setDefaultEncoding=function(M){if(typeof M=="string"&&(M=M.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((M+"").toLowerCase())>-1))throw new B(M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function dt(G,M,X){return!G.objectMode&&G.decodeStrings!==!1&&typeof M=="string"&&(M=i.from(M,X)),M}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function D(G,M,X,ct,_t,x){if(!X){var S=dt(M,ct,_t);ct!==S&&(X=!0,_t="buffer",ct=S)}var et=M.objectMode?1:ct.length;M.length+=et;var ft=M.length<M.highWaterMark;if(ft||(M.needDrain=!0),M.writing||M.corked){var zt=M.lastBufferedRequest;M.lastBufferedRequest={chunk:ct,encoding:_t,isBuf:X,callback:x,next:null},zt?zt.next=M.lastBufferedRequest:M.bufferedRequest=M.lastBufferedRequest,M.bufferedRequestCount+=1}else vt(G,M,!1,et,ct,_t,x);return ft}function vt(G,M,X,ct,_t,x,S){M.writelen=ct,M.writecb=S,M.writing=!0,M.sync=!0,M.destroyed?M.onwrite(new T("write")):X?G._writev(_t,M.onwrite):G._write(_t,x,M.onwrite),M.sync=!1}function wt(G,M,X,ct,_t){--M.pendingcb,X?(Ct.nextTick(_t,ct),Ct.nextTick(Z,G,M),G._writableState.errorEmitted=!0,z(G,ct)):(_t(ct),G._writableState.errorEmitted=!0,z(G,ct),Z(G,M))}function at(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}function ht(G,M){var X=G._writableState,ct=X.sync,_t=X.writecb;if(typeof _t!="function")throw new F;if(at(X),M)wt(G,X,ct,M,_t);else{var x=kt(X)||G.destroyed;!x&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest&&xt(G,X),ct?Ct.nextTick(mt,G,X,x,_t):mt(G,X,x,_t)}}function mt(G,M,X,ct){X||Rt(G,M),M.pendingcb--,ct(),Z(G,M)}function Rt(G,M){M.length===0&&M.needDrain&&(M.needDrain=!1,G.emit("drain"))}function xt(G,M){M.bufferProcessing=!0;var X=M.bufferedRequest;if(G._writev&&X&&X.next){var ct=M.bufferedRequestCount,_t=new Array(ct),x=M.corkedRequestsFree;x.entry=X;for(var S=0,et=!0;X;)_t[S]=X,X.isBuf||(et=!1),X=X.next,S+=1;_t.allBuffers=et,vt(G,M,!0,M.length,_t,"",x.finish),M.pendingcb++,M.lastBufferedRequest=null,x.next?(M.corkedRequestsFree=x.next,x.next=null):M.corkedRequestsFree=new n(M),M.bufferedRequestCount=0}else{for(;X;){var ft=X.chunk,zt=X.encoding,bt=X.callback,Bt=M.objectMode?1:ft.length;if(vt(G,M,!1,Bt,ft,zt,bt),X=X.next,M.bufferedRequestCount--,M.writing)break}X===null&&(M.lastBufferedRequest=null)}M.bufferedRequest=X,M.bufferProcessing=!1}L.prototype._write=function(G,M,X){X(new v("_write()"))},L.prototype._writev=null,L.prototype.end=function(G,M,X){var ct=this._writableState;return typeof G=="function"?(X=G,G=null,M=null):typeof M=="function"&&(X=M,M=null),G!=null&&this.write(G,M),ct.corked&&(ct.corked=1,this.uncork()),ct.ending||rt(this,ct,X),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function kt(G){return G.ending&&G.length===0&&G.bufferedRequest===null&&!G.finished&&!G.writing}function jt(G,M){G._final(function(X){M.pendingcb--,X&&z(G,X),M.prefinished=!0,G.emit("prefinish"),Z(G,M)})}function W(G,M){!M.prefinished&&!M.finalCalled&&(typeof G._final=="function"&&!M.destroyed?(M.pendingcb++,M.finalCalled=!0,Ct.nextTick(jt,G,M)):(M.prefinished=!0,G.emit("prefinish")))}function Z(G,M){var X=kt(M);if(X&&(W(G,M),M.pendingcb===0&&(M.finished=!0,G.emit("finish"),M.autoDestroy))){var ct=G._readableState;(!ct||ct.autoDestroy&&ct.endEmitted)&&G.destroy()}return X}function rt(G,M,X){M.ending=!0,Z(G,M),X&&(M.finished?Ct.nextTick(X):G.once("finish",X)),M.ended=!0,G.writable=!1}function gt(G,M,X){var ct=G.entry;for(G.entry=null;ct;){var _t=ct.callback;M.pendingcb--,_t(X),ct=ct.next}M.corkedRequestsFree.next=G}return Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),L.prototype.destroy=_.destroy,L.prototype._undestroy=_.undestroy,L.prototype._destroy=function(G,M){M(G)},zu}var Bu,nd;function gs(){if(nd)return Bu;nd=1;var n=Object.keys||function(l){var f=[];for(var g in l)f.push(g);return f};Bu=a;var t=fd(),e=rd();ds()(a,t);for(var r=n(e.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=e.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),e.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function u(){this._writableState.ended||Ct.nextTick(_,this)}function _(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Bu}var ku={},Zo={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var id;function c2(){return id||(id=1,function(n,t){var e=Wo(),r=e.Buffer;function i(a,u){for(var _ in a)u[_]=a[_]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=e:(i(e,t),t.Buffer=o);function o(a,u,_){return r(a,u,_)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(a,u,_){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,u,_)},o.alloc=function(a,u,_){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return u!==void 0?typeof _=="string"?l.fill(u,_):l.fill(u):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(a)}}(Zo,Zo.exports)),Zo.exports}var sd;function od(){if(sd)return ku;sd=1;var n=c2().Buffer,t=n.isEncoding||function(E){switch(E=""+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 e(E){if(!E)return"utf8";for(var R;;)switch(E){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return E;default:if(R)return;E=(""+E).toLowerCase(),R=!0}}function r(E){var R=e(E);if(typeof R!="string"&&(n.isEncoding===t||!t(E)))throw new Error("Unknown encoding: "+E);return R||E}ku.StringDecoder=i;function i(E){this.encoding=r(E);var R;switch(this.encoding){case"utf16le":this.text=g,this.end=y,R=4;break;case"utf8":this.fillLast=_,R=4;break;case"base64":this.text=v,this.end=F,R=3;break;default:this.write=k,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(R)}i.prototype.write=function(E){if(E.length===0)return"";var R,B;if(this.lastNeed){if(R=this.fillLast(E),R===void 0)return"";B=this.lastNeed,this.lastNeed=0}else B=0;return B<E.length?R?R+this.text(E,B):this.text(E,B):R||""},i.prototype.end=f,i.prototype.text=l,i.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length};function o(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function a(E,R,B){var z=R.length-1;if(z<B)return 0;var O=o(R[z]);return O>=0?(O>0&&(E.lastNeed=O-1),O):--z<B||O===-2?0:(O=o(R[z]),O>=0?(O>0&&(E.lastNeed=O-2),O):--z<B||O===-2?0:(O=o(R[z]),O>=0?(O>0&&(O===2?O=0:E.lastNeed=O-3),O):0))}function u(E,R,B){if((R[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&R.length>1){if((R[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&R.length>2&&(R[2]&192)!==128)return E.lastNeed=2,"�"}}function _(E){var R=this.lastTotal-this.lastNeed,B=u(this,E);if(B!==void 0)return B;if(this.lastNeed<=E.length)return E.copy(this.lastChar,R,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,R,0,E.length),this.lastNeed-=E.length}function l(E,R){var B=a(this,E,R);if(!this.lastNeed)return E.toString("utf8",R);this.lastTotal=B;var z=E.length-(B-this.lastNeed);return E.copy(this.lastChar,0,z),E.toString("utf8",R,z)}function f(E){var R=E&&E.length?this.write(E):"";return this.lastNeed?R+"�":R}function g(E,R){if((E.length-R)%2===0){var B=E.toString("utf16le",R);if(B){var z=B.charCodeAt(B.length-1);if(z>=55296&&z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],B.slice(0,-1)}return B}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",R,E.length-1)}function y(E){var R=E&&E.length?this.write(E):"";if(this.lastNeed){var B=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,B)}return R}function v(E,R){var B=(E.length-R)%3;return B===0?E.toString("base64",R):(this.lastNeed=3-B,this.lastTotal=3,B===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",R,E.length-B))}function F(E){var R=E&&E.length?this.write(E):"";return this.lastNeed?R+this.lastChar.toString("base64",0,3-this.lastNeed):R}function k(E){return E.toString(this.encoding)}function T(E){return E&&E.length?this.write(E):""}return ku}var Pu,ad;function Fu(){if(ad)return Pu;ad=1;var n=ws().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var u=arguments.length,_=new Array(u),l=0;l<u;l++)_[l]=arguments[l];o.apply(this,_)}}}function e(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,u){if(typeof a=="function")return i(o,null,a);a||(a={}),u=t(u||e);var _=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,f=function(){o.writable||y()},g=o._writableState&&o._writableState.finished,y=function(){l=!1,g=!0,_||u.call(o)},v=o._readableState&&o._readableState.endEmitted,F=function(){_=!1,v=!0,l||u.call(o)},k=function(B){u.call(o,B)},T=function(){var B;if(_&&!v)return(!o._readableState||!o._readableState.ended)&&(B=new n),u.call(o,B);if(l&&!g)return(!o._writableState||!o._writableState.ended)&&(B=new n),u.call(o,B)},E=function(){o.req.on("finish",y)};return r(o)?(o.on("complete",y),o.on("abort",T),o.req?E():o.on("request",E)):l&&!o._writableState&&(o.on("end",f),o.on("close",f)),o.on("end",F),o.on("finish",y),a.error!==!1&&o.on("error",k),o.on("close",T),function(){o.removeListener("complete",y),o.removeListener("abort",T),o.removeListener("request",E),o.req&&o.req.removeListener("finish",y),o.removeListener("end",f),o.removeListener("close",f),o.removeListener("finish",y),o.removeListener("end",F),o.removeListener("error",k),o.removeListener("close",T)}}return Pu=i,Pu}var Iu,cd;function u2(){if(cd)return Iu;cd=1;var n;function t(B,z,O){return z=e(z),z in B?Object.defineProperty(B,z,{value:O,enumerable:!0,configurable:!0,writable:!0}):B[z]=O,B}function e(B){var z=r(B,"string");return typeof z=="symbol"?z:String(z)}function r(B,z){if(typeof B!="object"||B===null)return B;var O=B[Symbol.toPrimitive];if(O!==void 0){var C=O.call(B,z);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(z==="string"?String:Number)(B)}var i=Fu(),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),_=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),g=Symbol("stream");function y(B,z){return{value:B,done:z}}function v(B){var z=B[o];if(z!==null){var O=B[g].read();O!==null&&(B[l]=null,B[o]=null,B[a]=null,z(y(O,!1)))}}function F(B){Ct.nextTick(v,B)}function k(B,z){return function(O,C){B.then(function(){if(z[_]){O(y(void 0,!0));return}z[f](O,C)},C)}}var T=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((n={get stream(){return this[g]},next:function(){var z=this,O=this[u];if(O!==null)return Promise.reject(O);if(this[_])return Promise.resolve(y(void 0,!0));if(this[g].destroyed)return new Promise(function(J,nt){Ct.nextTick(function(){z[u]?nt(z[u]):J(y(void 0,!0))})});var C=this[l],N;if(C)N=new Promise(k(C,this));else{var L=this[g].read();if(L!==null)return Promise.resolve(y(L,!1));N=new Promise(this[f])}return this[l]=N,N}},t(n,Symbol.asyncIterator,function(){return this}),t(n,"return",function(){var z=this;return new Promise(function(O,C){z[g].destroy(null,function(N){if(N){C(N);return}O(y(void 0,!0))})})}),n),T),R=function(z){var O,C=Object.create(E,(O={},t(O,g,{value:z,writable:!0}),t(O,o,{value:null,writable:!0}),t(O,a,{value:null,writable:!0}),t(O,u,{value:null,writable:!0}),t(O,_,{value:z._readableState.endEmitted,writable:!0}),t(O,f,{value:function(L,J){var nt=C[g].read();nt?(C[l]=null,C[o]=null,C[a]=null,L(y(nt,!1))):(C[o]=L,C[a]=J)},writable:!0}),O));return C[l]=null,i(z,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var L=C[a];L!==null&&(C[l]=null,C[o]=null,C[a]=null,L(N)),C[u]=N;return}var J=C[o];J!==null&&(C[l]=null,C[o]=null,C[a]=null,J(y(void 0,!0))),C[_]=!0}),z.on("readable",F.bind(null,C)),C};return Iu=R,Iu}var Ou,ud;function _2(){return ud||(ud=1,Ou=function(){throw new Error("Readable.from is not available in the browser")}),Ou}var Tu,_d;function fd(){if(_d)return Tu;_d=1,Tu=J;var n;J.ReadableState=L,Th().EventEmitter;var t=function(S,et){return S.listeners(et).length},e=Nh(),r=Wo().Buffer,i=(typeof hi<"u"?hi:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(x){return r.from(x)}function a(x){return r.isBuffer(x)||x instanceof i}var u=Kp(),_;u&&u.debuglog?_=u.debuglog("stream"):_=function(){};var l=o2(),f=$p(),g=Xp(),y=g.getHighWaterMark,v=ws().codes,F=v.ERR_INVALID_ARG_TYPE,k=v.ERR_STREAM_PUSH_AFTER_EOF,T=v.ERR_METHOD_NOT_IMPLEMENTED,E=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,R,B,z;ds()(J,e);var O=f.errorOrDestroy,C=["error","close","destroy","pause","resume"];function N(x,S,et){if(typeof x.prependListener=="function")return x.prependListener(S,et);!x._events||!x._events[S]?x.on(S,et):Array.isArray(x._events[S])?x._events[S].unshift(et):x._events[S]=[et,x._events[S]]}function L(x,S,et){n=n||gs(),x=x||{},typeof et!="boolean"&&(et=S instanceof n),this.objectMode=!!x.objectMode,et&&(this.objectMode=this.objectMode||!!x.readableObjectMode),this.highWaterMark=y(this,x,"readableHighWaterMark",et),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(R||(R=od().StringDecoder),this.decoder=new R(x.encoding),this.encoding=x.encoding)}function J(x){if(n=n||gs(),!(this instanceof J))return new J(x);var S=this instanceof n;this._readableState=new L(x,this,S),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),e.call(this)}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(S){this._readableState&&(this._readableState.destroyed=S)}}),J.prototype.destroy=f.destroy,J.prototype._undestroy=f.undestroy,J.prototype._destroy=function(x,S){S(x)},J.prototype.push=function(x,S){var et=this._readableState,ft;return et.objectMode?ft=!0:typeof x=="string"&&(S=S||et.defaultEncoding,S!==et.encoding&&(x=r.from(x,S),S=""),ft=!0),nt(this,x,S,!1,ft)},J.prototype.unshift=function(x){return nt(this,x,null,!0,!1)};function nt(x,S,et,ft,zt){_("readableAddChunk",S);var bt=x._readableState;if(S===null)bt.reading=!1,ht(x,bt);else{var Bt;if(zt||(Bt=D(bt,S)),Bt)O(x,Bt);else if(bt.objectMode||S&&S.length>0)if(typeof S!="string"&&!bt.objectMode&&Object.getPrototypeOf(S)!==r.prototype&&(S=o(S)),ft)bt.endEmitted?O(x,new E):dt(x,bt,S,!0);else if(bt.ended)O(x,new k);else{if(bt.destroyed)return!1;bt.reading=!1,bt.decoder&&!et?(S=bt.decoder.write(S),bt.objectMode||S.length!==0?dt(x,bt,S,!1):xt(x,bt)):dt(x,bt,S,!1)}else ft||(bt.reading=!1,xt(x,bt))}return!bt.ended&&(bt.length<bt.highWaterMark||bt.length===0)}function dt(x,S,et,ft){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,x.emit("data",et)):(S.length+=S.objectMode?1:et.length,ft?S.buffer.unshift(et):S.buffer.push(et),S.needReadable&&mt(x)),xt(x,S)}function D(x,S){var et;return!a(S)&&typeof S!="string"&&S!==void 0&&!x.objectMode&&(et=new F("chunk",["string","Buffer","Uint8Array"],S)),et}J.prototype.isPaused=function(){return this._readableState.flowing===!1},J.prototype.setEncoding=function(x){R||(R=od().StringDecoder);var S=new R(x);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var et=this._readableState.buffer.head,ft="";et!==null;)ft+=S.write(et.data),et=et.next;return this._readableState.buffer.clear(),ft!==""&&this._readableState.buffer.push(ft),this._readableState.length=ft.length,this};var vt=1073741824;function wt(x){return x>=vt?x=vt:(x--,x|=x>>>1,x|=x>>>2,x|=x>>>4,x|=x>>>8,x|=x>>>16,x++),x}function at(x,S){return x<=0||S.length===0&&S.ended?0:S.objectMode?1:x!==x?S.flowing&&S.length?S.buffer.head.data.length:S.length:(x>S.highWaterMark&&(S.highWaterMark=wt(x)),x<=S.length?x:S.ended?S.length:(S.needReadable=!0,0))}J.prototype.read=function(x){_("read",x),x=parseInt(x,10);var S=this._readableState,et=x;if(x!==0&&(S.emittedReadable=!1),x===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return _("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?X(this):mt(this),null;if(x=at(x,S),x===0&&S.ended)return S.length===0&&X(this),null;var ft=S.needReadable;_("need readable",ft),(S.length===0||S.length-x<S.highWaterMark)&&(ft=!0,_("length less than watermark",ft)),S.ended||S.reading?(ft=!1,_("reading or ended",ft)):ft&&(_("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||(x=at(et,S)));var zt;return x>0?zt=M(x,S):zt=null,zt===null?(S.needReadable=S.length<=S.highWaterMark,x=0):(S.length-=x,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),et!==x&&S.ended&&X(this)),zt!==null&&this.emit("data",zt),zt};function ht(x,S){if(_("onEofChunk"),!S.ended){if(S.decoder){var et=S.decoder.end();et&&et.length&&(S.buffer.push(et),S.length+=S.objectMode?1:et.length)}S.ended=!0,S.sync?mt(x):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,Rt(x)))}}function mt(x){var S=x._readableState;_("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(_("emitReadable",S.flowing),S.emittedReadable=!0,Ct.nextTick(Rt,x))}function Rt(x){var S=x._readableState;_("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(x.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,G(x)}function xt(x,S){S.readingMore||(S.readingMore=!0,Ct.nextTick(kt,x,S))}function kt(x,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var et=S.length;if(_("maybeReadMore read 0"),x.read(0),et===S.length)break}S.readingMore=!1}J.prototype._read=function(x){O(this,new T("_read()"))},J.prototype.pipe=function(x,S){var et=this,ft=this._readableState;switch(ft.pipesCount){case 0:ft.pipes=x;break;case 1:ft.pipes=[ft.pipes,x];break;default:ft.pipes.push(x);break}ft.pipesCount+=1,_("pipe count=%d opts=%j",ft.pipesCount,S);var zt=(!S||S.end!==!1)&&x!==Ct.stdout&&x!==Ct.stderr,bt=zt?pe:ze;ft.endEmitted?Ct.nextTick(bt):et.once("end",bt),x.on("unpipe",Bt);function Bt(Ie,_e){_("onunpipe"),Ie===et&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,we())}function pe(){_("onend"),x.end()}var it=jt(et);x.on("drain",it);var de=!1;function we(){_("cleanup"),x.removeListener("close",ge),x.removeListener("finish",le),x.removeListener("drain",it),x.removeListener("error",Qt),x.removeListener("unpipe",Bt),et.removeListener("end",pe),et.removeListener("end",ze),et.removeListener("data",Gt),de=!0,ft.awaitDrain&&(!x._writableState||x._writableState.needDrain)&&it()}et.on("data",Gt);function Gt(Ie){_("ondata");var _e=x.write(Ie);_("dest.write",_e),_e===!1&&((ft.pipesCount===1&&ft.pipes===x||ft.pipesCount>1&&_t(ft.pipes,x)!==-1)&&!de&&(_("false write response, pause",ft.awaitDrain),ft.awaitDrain++),et.pause())}function Qt(Ie){_("onerror",Ie),ze(),x.removeListener("error",Qt),t(x,"error")===0&&O(x,Ie)}N(x,"error",Qt);function ge(){x.removeListener("finish",le),ze()}x.once("close",ge);function le(){_("onfinish"),x.removeListener("close",ge),ze()}x.once("finish",le);function ze(){_("unpipe"),et.unpipe(x)}return x.emit("pipe",et),ft.flowing||(_("pipe resume"),et.resume()),x};function jt(x){return function(){var et=x._readableState;_("pipeOnDrain",et.awaitDrain),et.awaitDrain&&et.awaitDrain--,et.awaitDrain===0&&t(x,"data")&&(et.flowing=!0,G(x))}}J.prototype.unpipe=function(x){var S=this._readableState,et={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return x&&x!==S.pipes?this:(x||(x=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,x&&x.emit("unpipe",this,et),this);if(!x){var ft=S.pipes,zt=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var bt=0;bt<zt;bt++)ft[bt].emit("unpipe",this,{hasUnpiped:!1});return this}var Bt=_t(S.pipes,x);return Bt===-1?this:(S.pipes.splice(Bt,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),x.emit("unpipe",this,et),this)},J.prototype.on=function(x,S){var et=e.prototype.on.call(this,x,S),ft=this._readableState;return x==="data"?(ft.readableListening=this.listenerCount("readable")>0,ft.flowing!==!1&&this.resume()):x==="readable"&&!ft.endEmitted&&!ft.readableListening&&(ft.readableListening=ft.needReadable=!0,ft.flowing=!1,ft.emittedReadable=!1,_("on readable",ft.length,ft.reading),ft.length?mt(this):ft.reading||Ct.nextTick(Z,this)),et},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(x,S){var et=e.prototype.removeListener.call(this,x,S);return x==="readable"&&Ct.nextTick(W,this),et},J.prototype.removeAllListeners=function(x){var S=e.prototype.removeAllListeners.apply(this,arguments);return(x==="readable"||x===void 0)&&Ct.nextTick(W,this),S};function W(x){var S=x._readableState;S.readableListening=x.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:x.listenerCount("data")>0&&x.resume()}function Z(x){_("readable nexttick read 0"),x.read(0)}J.prototype.resume=function(){var x=this._readableState;return x.flowing||(_("resume"),x.flowing=!x.readableListening,rt(this,x)),x.paused=!1,this};function rt(x,S){S.resumeScheduled||(S.resumeScheduled=!0,Ct.nextTick(gt,x,S))}function gt(x,S){_("resume",S.reading),S.reading||x.read(0),S.resumeScheduled=!1,x.emit("resume"),G(x),S.flowing&&!S.reading&&x.read(0)}J.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function G(x){var S=x._readableState;for(_("flow",S.flowing);S.flowing&&x.read()!==null;);}J.prototype.wrap=function(x){var S=this,et=this._readableState,ft=!1;x.on("end",function(){if(_("wrapped end"),et.decoder&&!et.ended){var Bt=et.decoder.end();Bt&&Bt.length&&S.push(Bt)}S.push(null)}),x.on("data",function(Bt){if(_("wrapped data"),et.decoder&&(Bt=et.decoder.write(Bt)),!(et.objectMode&&Bt==null)&&!(!et.objectMode&&(!Bt||!Bt.length))){var pe=S.push(Bt);pe||(ft=!0,x.pause())}});for(var zt in x)this[zt]===void 0&&typeof x[zt]=="function"&&(this[zt]=function(pe){return function(){return x[pe].apply(x,arguments)}}(zt));for(var bt=0;bt<C.length;bt++)x.on(C[bt],this.emit.bind(this,C[bt]));return this._read=function(Bt){_("wrapped _read",Bt),ft&&(ft=!1,x.resume())},this},typeof Symbol=="function"&&(J.prototype[Symbol.asyncIterator]=function(){return B===void 0&&(B=u2()),B(this)}),Object.defineProperty(J.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(J.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(J.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}}),J._fromList=M,Object.defineProperty(J.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function M(x,S){if(S.length===0)return null;var et;return S.objectMode?et=S.buffer.shift():!x||x>=S.length?(S.decoder?et=S.buffer.join(""):S.buffer.length===1?et=S.buffer.first():et=S.buffer.concat(S.length),S.buffer.clear()):et=S.buffer.consume(x,S.decoder),et}function X(x){var S=x._readableState;_("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,Ct.nextTick(ct,S,x))}function ct(x,S){if(_("endReadableNT",x.endEmitted,x.length),!x.endEmitted&&x.length===0&&(x.endEmitted=!0,S.readable=!1,S.emit("end"),x.autoDestroy)){var et=S._writableState;(!et||et.autoDestroy&&et.finished)&&S.destroy()}}typeof Symbol=="function"&&(J.from=function(x,S){return z===void 0&&(z=_2()),z(J,x,S)});function _t(x,S){for(var et=0,ft=x.length;et<ft;et++)if(x[et]===S)return et;return-1}return Tu}var Cu,ld;function hd(){if(ld)return Cu;ld=1,Cu=u;var n=ws().codes,t=n.ERR_METHOD_NOT_IMPLEMENTED,e=n.ERR_MULTIPLE_CALLBACK,r=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,o=gs();ds()(u,o);function a(f,g){var y=this._transformState;y.transforming=!1;var v=y.writecb;if(v===null)return this.emit("error",new e);y.writechunk=null,y.writecb=null,g!=null&&this.push(g),v(f);var F=this._readableState;F.reading=!1,(F.needReadable||F.length<F.highWaterMark)&&this._read(F.highWaterMark)}function u(f){if(!(this instanceof u))return new u(f);o.call(this,f),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",_)}function _(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,y){l(f,g,y)}):l(this,null,null)}u.prototype.push=function(f,g){return this._transformState.needTransform=!1,o.prototype.push.call(this,f,g)},u.prototype._transform=function(f,g,y){y(new t("_transform()"))},u.prototype._write=function(f,g,y){var v=this._transformState;if(v.writecb=y,v.writechunk=f,v.writeencoding=g,!v.transforming){var F=this._readableState;(v.needTransform||F.needReadable||F.length<F.highWaterMark)&&this._read(F.highWaterMark)}},u.prototype._read=function(f){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},u.prototype._destroy=function(f,g){o.prototype._destroy.call(this,f,function(y){g(y)})};function l(f,g,y){if(g)return f.emit("error",g);if(y!=null&&f.push(y),f._writableState.length)throw new i;if(f._transformState.transforming)throw new r;return f.push(null)}return Cu}var Nu,pd;function f2(){if(pd)return Nu;pd=1,Nu=t;var n=hd();ds()(t,n);function t(e){if(!(this instanceof t))return new t(e);n.call(this,e)}return t.prototype._transform=function(e,r,i){i(null,e)},Nu}var Lu,dd;function l2(){if(dd)return Lu;dd=1;var n;function t(y){var v=!1;return function(){v||(v=!0,y.apply(void 0,arguments))}}var e=ws().codes,r=e.ERR_MISSING_ARGS,i=e.ERR_STREAM_DESTROYED;function o(y){if(y)throw y}function a(y){return y.setHeader&&typeof y.abort=="function"}function u(y,v,F,k){k=t(k);var T=!1;y.on("close",function(){T=!0}),n===void 0&&(n=Fu()),n(y,{readable:v,writable:F},function(R){if(R)return k(R);T=!0,k()});var E=!1;return function(R){if(!T&&!E){if(E=!0,a(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();k(R||new i("pipe"))}}}function _(y){y()}function l(y,v){return y.pipe(v)}function f(y){return!y.length||typeof y[y.length-1]!="function"?o:y.pop()}function g(){for(var y=arguments.length,v=new Array(y),F=0;F<y;F++)v[F]=arguments[F];var k=f(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new r("streams");var T,E=v.map(function(R,B){var z=B<v.length-1,O=B>0;return u(R,z,O,function(C){T||(T=C),C&&E.forEach(_),!z&&(E.forEach(_),k(T))})});return v.reduce(l)}return Lu=g,Lu}var wd;function gd(){return wd||(wd=1,function(n,t){t=n.exports=fd(),t.Stream=t,t.Readable=t,t.Writable=rd(),t.Duplex=gs(),t.Transform=hd(),t.PassThrough=f2(),t.finished=Fu(),t.pipeline=l2()}(qo,qo.exports)),qo.exports}var Du,yd;function h2(){if(yd)return Du;yd=1;const{Transform:n}=gd();return Du=t=>class qg extends n{constructor(r,i,o,a,u){super(u),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._hashBitLength=a,this._options=u,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(r){let i=null;try{this.push(this.digest())}catch(o){i=o}r(i)}update(r,i){if(!Ne.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Ne.isBuffer(r)||(r=Ne.from(r,i)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let i=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(i=i.toString(r)),this._resetState(),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new qg(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Du}var Uu,bd;function p2(){if(bd)return Uu;bd=1;const{Transform:n}=gd();return Uu=t=>class Qg extends n{constructor(r,i,o,a){super(a),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._options=a,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,i){if(!Ne.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Ne.isBuffer(r)||(r=Ne.from(r,i)),this._state.absorb(r),this}squeeze(r,i){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(r);return i!==void 0&&(o=o.toString(i)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Qg(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Uu}var Mu,md;function d2(){if(md)return Mu;md=1;const n=h2(),t=p2();return Mu=function(e){const r=n(e),i=t(e);return function(o,a){switch(typeof o=="string"?o.toLowerCase():o){case"keccak224":return new r(1152,448,null,224,a);case"keccak256":return new r(1088,512,null,256,a);case"keccak384":return new r(832,768,null,384,a);case"keccak512":return new r(576,1024,null,512,a);case"sha3-224":return new r(1152,448,6,224,a);case"sha3-256":return new r(1088,512,6,256,a);case"sha3-384":return new r(832,768,6,384,a);case"sha3-512":return new r(576,1024,6,512,a);case"shake128":return new i(1344,256,31,a);case"shake256":return new i(1088,512,31,a);default:throw new Error("Invald algorithm: "+o)}}},Mu}var ju={},Ad;function w2(){if(Ad)return ju;Ad=1;const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return ju.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],_=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],g=t[8]^t[18]^t[28]^t[38]^t[48],y=t[9]^t[19]^t[29]^t[39]^t[49];let v=g^(o<<1|a>>>31),F=y^(a<<1|o>>>31);const k=t[0]^v,T=t[1]^F,E=t[10]^v,R=t[11]^F,B=t[20]^v,z=t[21]^F,O=t[30]^v,C=t[31]^F,N=t[40]^v,L=t[41]^F;v=r^(u<<1|_>>>31),F=i^(_<<1|u>>>31);const J=t[2]^v,nt=t[3]^F,dt=t[12]^v,D=t[13]^F,vt=t[22]^v,wt=t[23]^F,at=t[32]^v,ht=t[33]^F,mt=t[42]^v,Rt=t[43]^F;v=o^(l<<1|f>>>31),F=a^(f<<1|l>>>31);const xt=t[4]^v,kt=t[5]^F,jt=t[14]^v,W=t[15]^F,Z=t[24]^v,rt=t[25]^F,gt=t[34]^v,G=t[35]^F,M=t[44]^v,X=t[45]^F;v=u^(g<<1|y>>>31),F=_^(y<<1|g>>>31);const ct=t[6]^v,_t=t[7]^F,x=t[16]^v,S=t[17]^F,et=t[26]^v,ft=t[27]^F,zt=t[36]^v,bt=t[37]^F,Bt=t[46]^v,pe=t[47]^F;v=l^(r<<1|i>>>31),F=f^(i<<1|r>>>31);const it=t[8]^v,de=t[9]^F,we=t[18]^v,Gt=t[19]^F,Qt=t[28]^v,ge=t[29]^F,le=t[38]^v,ze=t[39]^F,Ie=t[48]^v,_e=t[49]^F,$e=k,b=T,h=R<<4|E>>>28,d=E<<4|R>>>28,P=B<<3|z>>>29,U=z<<3|B>>>29,$=C<<9|O>>>23,st=O<<9|C>>>23,Pt=N<<18|L>>>14,Vt=L<<18|N>>>14,qt=J<<1|nt>>>31,Wt=nt<<1|J>>>31,Dt=D<<12|dt>>>20,yi=dt<<12|D>>>20,Oe=vt<<10|wt>>>22,Ki=wt<<10|vt>>>22,so=ht<<13|at>>>19,Ye=at<<13|ht>>>19,oo=mt<<2|Rt>>>30,m=Rt<<2|mt>>>30,p=kt<<30|xt>>>2,w=xt<<30|kt>>>2,I=jt<<6|W>>>26,H=W<<6|jt>>>26,Y=rt<<11|Z>>>21,ot=Z<<11|rt>>>21,Ft=gt<<15|G>>>17,Zt=G<<15|gt>>>17,Jt=X<<29|M>>>3,Xt=M<<29|X>>>3,Ht=ct<<28|_t>>>4,n_=_t<<28|ct>>>4,i_=S<<23|x>>>9,s_=x<<23|S>>>9,o_=et<<25|ft>>>7,a_=ft<<25|et>>>7,c_=zt<<21|bt>>>11,u_=bt<<21|zt>>>11,__=pe<<24|Bt>>>8,f_=Bt<<24|pe>>>8,l_=it<<27|de>>>5,h_=de<<27|it>>>5,p_=we<<20|Gt>>>12,d_=Gt<<20|we>>>12,w_=ge<<7|Qt>>>25,g_=Qt<<7|ge>>>25,y_=le<<8|ze>>>24,b_=ze<<8|le>>>24,m_=Ie<<14|_e>>>18,A_=_e<<14|Ie>>>18;t[0]=$e^~Dt&Y,t[1]=b^~yi&ot,t[10]=Ht^~p_&P,t[11]=n_^~d_&U,t[20]=qt^~I&o_,t[21]=Wt^~H&a_,t[30]=l_^~h&Oe,t[31]=h_^~d&Ki,t[40]=p^~i_&w_,t[41]=w^~s_&g_,t[2]=Dt^~Y&c_,t[3]=yi^~ot&u_,t[12]=p_^~P&so,t[13]=d_^~U&Ye,t[22]=I^~o_&y_,t[23]=H^~a_&b_,t[32]=h^~Oe&Ft,t[33]=d^~Ki&Zt,t[42]=i_^~w_&$,t[43]=s_^~g_&st,t[4]=Y^~c_&m_,t[5]=ot^~u_&A_,t[14]=P^~so&Jt,t[15]=U^~Ye&Xt,t[24]=o_^~y_&Pt,t[25]=a_^~b_&Vt,t[34]=Oe^~Ft&__,t[35]=Ki^~Zt&f_,t[44]=w_^~$&oo,t[45]=g_^~st&m,t[6]=c_^~m_&$e,t[7]=u_^~A_&b,t[16]=so^~Jt&Ht,t[17]=Ye^~Xt&n_,t[26]=y_^~Pt&qt,t[27]=b_^~Vt&Wt,t[36]=Ft^~__&l_,t[37]=Zt^~f_&h_,t[46]=$^~oo&p,t[47]=st^~m&w,t[8]=m_^~$e&Dt,t[9]=A_^~b&yi,t[18]=Jt^~Ht&p_,t[19]=Xt^~n_&d_,t[28]=Pt^~qt&I,t[29]=Vt^~Wt&H,t[38]=__^~l_&h,t[39]=f_^~h_&d,t[48]=oo^~p&i_,t[49]=m^~w&s_,t[0]^=n[e*2],t[1]^=n[e*2+1]}},ju}var Gu,Ed;function g2(){if(Ed)return Gu;Ed=1;const n=w2();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,r){for(let i=0;i<50;++i)this.state[i]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(e){for(let r=0;r<e.length;++r)this.state[~~(this.count/4)]^=e[r]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),(e&128)!==0&&this.count===this.blockSize-1&&n.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),n.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const r=Ne.alloc(e);for(let i=0;i<e;++i)r[i]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},t.prototype.copy=function(e){for(let r=0;r<50;++r)e.state[r]=this.state[r];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},Gu=t,Gu}var Hu,vd;function y2(){return vd||(vd=1,Hu=d2()(g2())),Hu}var b2=y2();const xd=Bh(b2);var Xo={exports:{}},m2=Xo.exports,Rd;function A2(){return Rd||(Rd=1,function(n,t){(function(e,r){n.exports=r()})(m2,function(){var e=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var u={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(u,a),function(l,f){var g=a.retries,y=a.retryDelay,v=a.retryOn;if(f&&f.retries!==void 0)if(r(f.retries))g=f.retries;else throw new i("retries must be a positive integer");if(f&&f.retryDelay!==void 0)if(r(f.retryDelay)||typeof f.retryDelay=="function")y=f.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(f&&f.retryOn)if(Array.isArray(f.retryOn)||typeof f.retryOn=="function")v=f.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(F,k){var T=function(R){var B=typeof Request<"u"&&l instanceof Request?l.clone():l;o(B,f).then(function(z){if(Array.isArray(v)&&v.indexOf(z.status)===-1)F(z);else if(typeof v=="function")try{return Promise.resolve(v(R,null,z)).then(function(O){O?E(R,null,z):F(z)}).catch(k)}catch(O){k(O)}else R<g?E(R,null,z):F(z)}).catch(function(z){if(typeof v=="function")try{Promise.resolve(v(R,z,null)).then(function(O){O?E(R,z,null):k(z)}).catch(function(O){k(O)})}catch(O){k(O)}else R<g?E(R,z,null):k(z)})};function E(R,B,z){var O=typeof y=="function"?y(R,B,z):y;setTimeout(function(){T(++R)},O)}T(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return e})}(Xo)),Xo.exports}var E2=A2();const v2=Bh(E2),x2=()=>(async n=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(n)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var ta=typeof Wi<"u"?Wi:typeof self<"u"?self:typeof window<"u"?window:{};function Sd(n,t){return new Promise(e=>{n.addEventListener("message",function r({data:i}){i?.type===t&&(n.removeEventListener("message",r),e(i))})})}Sd(self,"wasm_bindgen_worker_init").then(async({init:n,receiver:t})=>{const e=await Promise.resolve().then(function(){return T2});await e.default(n),postMessage({type:"wasm_bindgen_worker_ready"}),e.wbg_rayon_start_worker(t)});async function R2(n,t,e){if(e.numThreads()===0)throw new Error("num_threads must be > 0.");const r={type:"wasm_bindgen_worker_init",init:{module_or_path:n,memory:t},receiver:e.receiver()};await Promise.all(Array.from({length:e.numThreads()},async()=>{let i;try{i=new Worker(new URL("/workerHelpers.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href),{type:"module"})}catch{const u=await(await fetch("/workerHelpers.js")).blob(),_=URL.createObjectURL(u);i=new Worker(_)}return i.postMessage(r),await Sd(i,"wasm_bindgen_worker_ready"),i})),e.build()}let s;function Js(n){const t=s.__externref_table_alloc();return s.__wbindgen_export_2.set(t,n),t}function ys(n,t){try{return n.apply(this,t)}catch(e){const r=Js(e);s.__wbindgen_exn_store(r)}}let $s=null;function bs(){return($s===null||$s.buffer!==s.memory.buffer)&&($s=new Uint8Array(s.memory.buffer)),$s}let ea=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});ea.decode();const S2=2146435072;let Vu=0;function z2(n,t){return Vu+=t,Vu>=S2&&(ea=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),ea.decode(),Vu=t),ea.decode(bs().slice(n,n+t))}function Ys(n,t){return n=n>>>0,z2(n,t)}function Q(n,t){return n=n>>>0,bs().subarray(n/1,n/1+t)}let j=0;const ra=new TextEncoder;ra.encodeInto=function(n,t){const e=ra.encode(n);return t.set(e),{read:n.length,written:e.length}};function na(n,t,e){if(e===void 0){const u=ra.encode(n),_=t(u.length,1)>>>0;return bs().subarray(_,_+u.length).set(u),j=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=bs();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=bs().subarray(i+a,i+r),_=ra.encodeInto(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return j=a,i}let Zs=null;function jn(){return(Zs===null||Zs.buffer!==s.memory.buffer)&&(Zs=new DataView(s.memory.buffer)),Zs}function Di(n){return n==null}function qu(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=qu(n[0]));for(let a=1;a<i;a++)o+=", "+qu(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
21
- ${n.stack}`:r}function q(n,t){const e=t(n.length*1,1)>>>0;return bs().set(n,e/1),j=n.length,e}function c(n){const t=s.__wbindgen_export_2.get(n);return s.__externref_table_dealloc(n),t}function A(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function Qu(){s.init_panic_hook()}function B2(n){s.wbg_rayon_start_worker(n)}function Ku(n){return s.initThreadPool(n)}const zd=Object.freeze({Proof:0,0:"Proof",Verify:1,1:"Verify"});typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_boolean_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanclientkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleannoisedistribution_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanpublickey_free(n>>>0,1));const Bd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlist_free(n>>>0,1));class Gn{static __wrap(t){t=t>>>0;const e=Object.create(Gn.prototype);return e.__wbg_ptr=t,Bd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlist_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return Gn.__wrap(i[0])}get_kind_of(t){const e=s.compactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}safe_serialize(t){const e=s.compactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Gn.__wrap(o[0])}len(){return s.compactciphertextlist_len(this.__wbg_ptr)>>>0}expand(){const t=s.compactciphertextlist_expand(this.__wbg_ptr);if(t[2])throw c(t[1]);return pi.__wrap(t[0])}static builder(t){A(t,Me);const e=s.compactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Ui.__wrap(e[0])}is_empty(){return s.compactciphertextlist_is_empty(this.__wbg_ptr)!==0}serialize(){const t=s.compactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Gn.prototype[Symbol.dispose]=Gn.prototype.free);const kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistbuilder_free(n>>>0,1));class Ui{static __wrap(t){t=t>>>0;const e=Object.create(Ui.prototype);return e.__wbg_ptr=t,kd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistbuilder_free(t,0)}push_i1024(t){const e=s.compactciphertextlistbuilder_push_i1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i2048(t){const e=s.compactciphertextlistbuilder_push_i2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u1024(t){const e=s.compactciphertextlistbuilder_push_u1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2048(t){const e=s.compactciphertextlistbuilder_push_u2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build_packed(){const t=s.compactciphertextlistbuilder_build_packed(this.__wbg_ptr);if(t[2])throw c(t[1]);return Gn.__wrap(t[0])}push_boolean(t){const e=s.compactciphertextlistbuilder_push_boolean(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build_with_proof_packed(t,e,r){A(t,Ue);const i=q(e,s.__wbindgen_malloc),o=j,a=s.compactciphertextlistbuilder_build_with_proof_packed(this.__wbg_ptr,t.__wbg_ptr,i,o,r);if(a[2])throw c(a[1]);return di.__wrap(a[0])}build(){const t=s.compactciphertextlistbuilder_build(this.__wbg_ptr);if(t[2])throw c(t[1]);return Gn.__wrap(t[0])}push_i2(t){const e=s.compactciphertextlistbuilder_push_i2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i4(t){const e=s.compactciphertextlistbuilder_push_i4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i6(t){const e=s.compactciphertextlistbuilder_push_i6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i8(t){const e=s.compactciphertextlistbuilder_push_i8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2(t){const e=s.compactciphertextlistbuilder_push_u2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u4(t){const e=s.compactciphertextlistbuilder_push_u4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u6(t){const e=s.compactciphertextlistbuilder_push_u6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u8(t){const e=s.compactciphertextlistbuilder_push_u8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i10(t){const e=s.compactciphertextlistbuilder_push_i10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i12(t){const e=s.compactciphertextlistbuilder_push_i12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i14(t){const e=s.compactciphertextlistbuilder_push_i14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i16(t){const e=s.compactciphertextlistbuilder_push_i16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i24(t){const e=s.compactciphertextlistbuilder_push_i24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i32(t){const e=s.compactciphertextlistbuilder_push_i32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i40(t){const e=s.compactciphertextlistbuilder_push_i40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i48(t){const e=s.compactciphertextlistbuilder_push_i48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i56(t){const e=s.compactciphertextlistbuilder_push_i56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i64(t){const e=s.compactciphertextlistbuilder_push_i64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i72(t){const e=s.compactciphertextlistbuilder_push_i72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i80(t){const e=s.compactciphertextlistbuilder_push_i80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i88(t){const e=s.compactciphertextlistbuilder_push_i88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i96(t){const e=s.compactciphertextlistbuilder_push_i96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u10(t){const e=s.compactciphertextlistbuilder_push_u10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u12(t){const e=s.compactciphertextlistbuilder_push_u12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u14(t){const e=s.compactciphertextlistbuilder_push_u14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u16(t){const e=s.compactciphertextlistbuilder_push_u16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u24(t){const e=s.compactciphertextlistbuilder_push_u24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u32(t){const e=s.compactciphertextlistbuilder_push_u32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u40(t){const e=s.compactciphertextlistbuilder_push_u40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u48(t){const e=s.compactciphertextlistbuilder_push_u48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u56(t){const e=s.compactciphertextlistbuilder_push_u56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u64(t){const e=s.compactciphertextlistbuilder_push_u64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u72(t){const e=s.compactciphertextlistbuilder_push_u72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u80(t){const e=s.compactciphertextlistbuilder_push_u80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u88(t){const e=s.compactciphertextlistbuilder_push_u88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u96(t){const e=s.compactciphertextlistbuilder_push_u96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i104(t){const e=s.compactciphertextlistbuilder_push_i104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i112(t){const e=s.compactciphertextlistbuilder_push_i112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i120(t){const e=s.compactciphertextlistbuilder_push_i120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i128(t){const e=s.compactciphertextlistbuilder_push_i128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i136(t){const e=s.compactciphertextlistbuilder_push_i136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i144(t){const e=s.compactciphertextlistbuilder_push_i144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i152(t){const e=s.compactciphertextlistbuilder_push_i152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i160(t){const e=s.compactciphertextlistbuilder_push_i160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i168(t){const e=s.compactciphertextlistbuilder_push_i168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i176(t){const e=s.compactciphertextlistbuilder_push_i176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i184(t){const e=s.compactciphertextlistbuilder_push_i184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i192(t){const e=s.compactciphertextlistbuilder_push_i192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i200(t){const e=s.compactciphertextlistbuilder_push_i200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i208(t){const e=s.compactciphertextlistbuilder_push_i208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i216(t){const e=s.compactciphertextlistbuilder_push_i216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i224(t){const e=s.compactciphertextlistbuilder_push_i224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i232(t){const e=s.compactciphertextlistbuilder_push_i232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i240(t){const e=s.compactciphertextlistbuilder_push_i240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i248(t){const e=s.compactciphertextlistbuilder_push_i248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i256(t){const e=s.compactciphertextlistbuilder_push_i256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i512(t){const e=s.compactciphertextlistbuilder_push_i512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u104(t){const e=s.compactciphertextlistbuilder_push_u104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u112(t){const e=s.compactciphertextlistbuilder_push_u112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u120(t){const e=s.compactciphertextlistbuilder_push_u120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u128(t){const e=s.compactciphertextlistbuilder_push_u128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u136(t){const e=s.compactciphertextlistbuilder_push_u136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u144(t){const e=s.compactciphertextlistbuilder_push_u144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u152(t){const e=s.compactciphertextlistbuilder_push_u152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u160(t){const e=s.compactciphertextlistbuilder_push_u160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u168(t){const e=s.compactciphertextlistbuilder_push_u168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u176(t){const e=s.compactciphertextlistbuilder_push_u176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u184(t){const e=s.compactciphertextlistbuilder_push_u184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u192(t){const e=s.compactciphertextlistbuilder_push_u192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u200(t){const e=s.compactciphertextlistbuilder_push_u200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u208(t){const e=s.compactciphertextlistbuilder_push_u208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u216(t){const e=s.compactciphertextlistbuilder_push_u216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u224(t){const e=s.compactciphertextlistbuilder_push_u224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u232(t){const e=s.compactciphertextlistbuilder_push_u232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u240(t){const e=s.compactciphertextlistbuilder_push_u240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u248(t){const e=s.compactciphertextlistbuilder_push_u248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u256(t){const e=s.compactciphertextlistbuilder_push_u256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u512(t){const e=s.compactciphertextlistbuilder_push_u512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}}Symbol.dispose&&(Ui.prototype[Symbol.dispose]=Ui.prototype.free);const Pd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistexpander_free(n>>>0,1));class pi{static __wrap(t){t=t>>>0;const e=Object.create(pi.prototype);return e.__wbg_ptr=t,Pd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistexpander_free(t,0)}get_int104(t){const e=s.compactciphertextlistexpander_get_int104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ar.__wrap(e[0])}get_int112(t){const e=s.compactciphertextlistexpander_get_int112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cr.__wrap(e[0])}get_int120(t){const e=s.compactciphertextlistexpander_get_int120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _r.__wrap(e[0])}get_int128(t){const e=s.compactciphertextlistexpander_get_int128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fr.__wrap(e[0])}get_int136(t){const e=s.compactciphertextlistexpander_get_int136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return lr.__wrap(e[0])}get_int144(t){const e=s.compactciphertextlistexpander_get_int144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pr.__wrap(e[0])}get_int152(t){const e=s.compactciphertextlistexpander_get_int152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dr.__wrap(e[0])}get_int160(t){const e=s.compactciphertextlistexpander_get_int160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gr.__wrap(e[0])}get_int168(t){const e=s.compactciphertextlistexpander_get_int168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yr.__wrap(e[0])}get_int176(t){const e=s.compactciphertextlistexpander_get_int176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return br.__wrap(e[0])}get_int184(t){const e=s.compactciphertextlistexpander_get_int184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mr.__wrap(e[0])}get_int192(t){const e=s.compactciphertextlistexpander_get_int192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ar.__wrap(e[0])}get_int200(t){const e=s.compactciphertextlistexpander_get_int200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vr.__wrap(e[0])}get_int208(t){const e=s.compactciphertextlistexpander_get_int208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Rr.__wrap(e[0])}get_int216(t){const e=s.compactciphertextlistexpander_get_int216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sr.__wrap(e[0])}get_int224(t){const e=s.compactciphertextlistexpander_get_int224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return zr.__wrap(e[0])}get_int232(t){const e=s.compactciphertextlistexpander_get_int232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Br.__wrap(e[0])}get_int240(t){const e=s.compactciphertextlistexpander_get_int240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pr.__wrap(e[0])}get_int248(t){const e=s.compactciphertextlistexpander_get_int248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fr.__wrap(e[0])}get_int256(t){const e=s.compactciphertextlistexpander_get_int256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ir.__wrap(e[0])}get_int512(t){const e=s.compactciphertextlistexpander_get_int512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Lr.__wrap(e[0])}get_uint10(t){const e=s.compactciphertextlistexpander_get_uint10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Qr.__wrap(e[0])}get_uint12(t){const e=s.compactciphertextlistexpander_get_uint12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return $r.__wrap(e[0])}get_uint14(t){const e=s.compactciphertextlistexpander_get_uint14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return tn.__wrap(e[0])}get_uint16(t){const e=s.compactciphertextlistexpander_get_uint16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return nn.__wrap(e[0])}get_uint24(t){const e=s.compactciphertextlistexpander_get_uint24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gn.__wrap(e[0])}get_uint32(t){const e=s.compactciphertextlistexpander_get_uint32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return An.__wrap(e[0])}get_uint40(t){const e=s.compactciphertextlistexpander_get_uint40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vn.__wrap(e[0])}get_uint48(t){const e=s.compactciphertextlistexpander_get_uint48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xn.__wrap(e[0])}get_uint56(t){const e=s.compactciphertextlistexpander_get_uint56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sn.__wrap(e[0])}get_uint64(t){const e=s.compactciphertextlistexpander_get_uint64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Bn.__wrap(e[0])}get_uint72(t){const e=s.compactciphertextlistexpander_get_uint72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kn.__wrap(e[0])}get_uint80(t){const e=s.compactciphertextlistexpander_get_uint80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fn.__wrap(e[0])}get_uint88(t){const e=s.compactciphertextlistexpander_get_uint88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return In.__wrap(e[0])}get_uint96(t){const e=s.compactciphertextlistexpander_get_uint96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return On.__wrap(e[0])}get_int1024(t){const e=s.compactciphertextlistexpander_get_int1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return or.__wrap(e[0])}get_int2048(t){const e=s.compactciphertextlistexpander_get_int2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xr.__wrap(e[0])}get_kind_of(t){const e=s.compactciphertextlistexpander_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}get_uint104(t){const e=s.compactciphertextlistexpander_get_uint104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Wr.__wrap(e[0])}get_uint112(t){const e=s.compactciphertextlistexpander_get_uint112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Jr.__wrap(e[0])}get_uint120(t){const e=s.compactciphertextlistexpander_get_uint120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Yr.__wrap(e[0])}get_uint128(t){const e=s.compactciphertextlistexpander_get_uint128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Zr.__wrap(e[0])}get_uint136(t){const e=s.compactciphertextlistexpander_get_uint136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Xr.__wrap(e[0])}get_uint144(t){const e=s.compactciphertextlistexpander_get_uint144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return en.__wrap(e[0])}get_uint152(t){const e=s.compactciphertextlistexpander_get_uint152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return rn.__wrap(e[0])}get_uint160(t){const e=s.compactciphertextlistexpander_get_uint160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sn.__wrap(e[0])}get_uint168(t){const e=s.compactciphertextlistexpander_get_uint168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return on.__wrap(e[0])}get_uint176(t){const e=s.compactciphertextlistexpander_get_uint176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return an.__wrap(e[0])}get_uint184(t){const e=s.compactciphertextlistexpander_get_uint184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cn.__wrap(e[0])}get_uint192(t){const e=s.compactciphertextlistexpander_get_uint192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return un.__wrap(e[0])}get_uint200(t){const e=s.compactciphertextlistexpander_get_uint200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fn.__wrap(e[0])}get_uint208(t){const e=s.compactciphertextlistexpander_get_uint208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hn.__wrap(e[0])}get_uint216(t){const e=s.compactciphertextlistexpander_get_uint216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pn.__wrap(e[0])}get_uint224(t){const e=s.compactciphertextlistexpander_get_uint224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dn.__wrap(e[0])}get_uint232(t){const e=s.compactciphertextlistexpander_get_uint232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wn.__wrap(e[0])}get_uint240(t){const e=s.compactciphertextlistexpander_get_uint240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yn.__wrap(e[0])}get_uint248(t){const e=s.compactciphertextlistexpander_get_uint248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return bn.__wrap(e[0])}get_uint256(t){const e=s.compactciphertextlistexpander_get_uint256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mn.__wrap(e[0])}get_uint512(t){const e=s.compactciphertextlistexpander_get_uint512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Rn.__wrap(e[0])}get_uint1024(t){const e=s.compactciphertextlistexpander_get_uint1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Kr.__wrap(e[0])}get_uint2048(t){const e=s.compactciphertextlistexpander_get_uint2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ln.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}get_bool(t){const e=s.compactciphertextlistexpander_get_bool(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ir.__wrap(e[0])}get_int2(t){const e=s.compactciphertextlistexpander_get_int2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Er.__wrap(e[0])}get_int4(t){const e=s.compactciphertextlistexpander_get_int4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tr.__wrap(e[0])}get_int6(t){const e=s.compactciphertextlistexpander_get_int6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ur.__wrap(e[0])}get_int8(t){const e=s.compactciphertextlistexpander_get_int8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Gr.__wrap(e[0])}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_int10(t){const e=s.compactciphertextlistexpander_get_int10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sr.__wrap(e[0])}get_int12(t){const e=s.compactciphertextlistexpander_get_int12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ur.__wrap(e[0])}get_int14(t){const e=s.compactciphertextlistexpander_get_int14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hr.__wrap(e[0])}get_int16(t){const e=s.compactciphertextlistexpander_get_int16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wr.__wrap(e[0])}get_int24(t){const e=s.compactciphertextlistexpander_get_int24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kr.__wrap(e[0])}get_int32(t){const e=s.compactciphertextlistexpander_get_int32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Or.__wrap(e[0])}get_int40(t){const e=s.compactciphertextlistexpander_get_int40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Cr.__wrap(e[0])}get_int48(t){const e=s.compactciphertextlistexpander_get_int48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Nr.__wrap(e[0])}get_int56(t){const e=s.compactciphertextlistexpander_get_int56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Dr.__wrap(e[0])}get_int64(t){const e=s.compactciphertextlistexpander_get_int64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Mr.__wrap(e[0])}get_int72(t){const e=s.compactciphertextlistexpander_get_int72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return jr.__wrap(e[0])}get_int80(t){const e=s.compactciphertextlistexpander_get_int80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Hr.__wrap(e[0])}get_int88(t){const e=s.compactciphertextlistexpander_get_int88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Vr.__wrap(e[0])}get_int96(t){const e=s.compactciphertextlistexpander_get_int96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return qr.__wrap(e[0])}get_uint2(t){const e=s.compactciphertextlistexpander_get_uint2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _n.__wrap(e[0])}get_uint4(t){const e=s.compactciphertextlistexpander_get_uint4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return En.__wrap(e[0])}get_uint6(t){const e=s.compactciphertextlistexpander_get_uint6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return zn.__wrap(e[0])}get_uint8(t){const e=s.compactciphertextlistexpander_get_uint8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pn.__wrap(e[0])}}Symbol.dispose&&(pi.prototype[Symbol.dispose]=pi.prototype.free);const Fd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactpkecrs_free(n>>>0,1));class Ue{static __wrap(t){t=t>>>0;const e=Object.create(Ue.prototype);return e.__wbg_ptr=t,Fd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactpkecrs_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize(e,r);if(i[2])throw c(i[1]);return Ue.__wrap(i[0])}static from_config(t,e){A(t,wi);const r=s.compactpkecrs_from_config(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return Ue.__wrap(r[0])}safe_serialize(t){const e=s.compactpkecrs_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ue.__wrap(o[0])}static deserialize_from_public_params(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize_from_public_params(e,r);if(i[2])throw c(i[1]);return Ue.__wrap(i[0])}static safe_deserialize_from_public_params(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize_from_public_params(r,i,e);if(o[2])throw c(o[1]);return Ue.__wrap(o[0])}serialize(t){const e=s.compactpkecrs_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}}Symbol.dispose&&(Ue.prototype[Symbol.dispose]=Ue.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfhebool_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint96_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint96_free(n>>>0,1));const Id=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fhebool_free(n>>>0,1));class ir{static __wrap(t){t=t>>>0;const e=Object.create(ir.prototype);return e.__wbg_ptr=t,Id.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Id.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fhebool_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fhebool_deserialize(e,r);if(i[2])throw c(i[1]);return ir.__wrap(i[0])}safe_serialize(t){const e=s.fhebool_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fhebool_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ir.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fhebool_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ir.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fhebool_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ir.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fhebool_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ir.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fhebool_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]!==0}serialize(){const t=s.fhebool_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ir.prototype[Symbol.dispose]=ir.prototype.free);const Od=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint10_free(n>>>0,1));class sr{static __wrap(t){t=t>>>0;const e=Object.create(sr.prototype);return e.__wbg_ptr=t,Od.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Od.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint10_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint10_deserialize(e,r);if(i[2])throw c(i[1]);return sr.__wrap(i[0])}safe_serialize(t){const e=s.fheint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return sr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(sr.prototype[Symbol.dispose]=sr.prototype.free);const Td=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint1024_free(n>>>0,1));class or{static __wrap(t){t=t>>>0;const e=Object.create(or.prototype);return e.__wbg_ptr=t,Td.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Td.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint1024_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint1024_deserialize(e,r);if(i[2])throw c(i[1]);return or.__wrap(i[0])}safe_serialize(t){const e=s.fheint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return or.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(or.prototype[Symbol.dispose]=or.prototype.free);const Cd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint104_free(n>>>0,1));class ar{static __wrap(t){t=t>>>0;const e=Object.create(ar.prototype);return e.__wbg_ptr=t,Cd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint104_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint104_deserialize(e,r);if(i[2])throw c(i[1]);return ar.__wrap(i[0])}safe_serialize(t){const e=s.fheint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ar.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ar.prototype[Symbol.dispose]=ar.prototype.free);const Nd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint112_free(n>>>0,1));class cr{static __wrap(t){t=t>>>0;const e=Object.create(cr.prototype);return e.__wbg_ptr=t,Nd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint112_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint112_deserialize(e,r);if(i[2])throw c(i[1]);return cr.__wrap(i[0])}safe_serialize(t){const e=s.fheint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return cr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(cr.prototype[Symbol.dispose]=cr.prototype.free);const Ld=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint12_free(n>>>0,1));class ur{static __wrap(t){t=t>>>0;const e=Object.create(ur.prototype);return e.__wbg_ptr=t,Ld.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ld.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint12_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint12_deserialize(e,r);if(i[2])throw c(i[1]);return ur.__wrap(i[0])}safe_serialize(t){const e=s.fheint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ur.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ur.prototype[Symbol.dispose]=ur.prototype.free);const Dd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint120_free(n>>>0,1));class _r{static __wrap(t){t=t>>>0;const e=Object.create(_r.prototype);return e.__wbg_ptr=t,Dd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint120_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint120_deserialize(e,r);if(i[2])throw c(i[1]);return _r.__wrap(i[0])}safe_serialize(t){const e=s.fheint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return _r.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(_r.prototype[Symbol.dispose]=_r.prototype.free);const Ud=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint128_free(n>>>0,1));class fr{static __wrap(t){t=t>>>0;const e=Object.create(fr.prototype);return e.__wbg_ptr=t,Ud.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ud.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint128_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint128_deserialize(e,r);if(i[2])throw c(i[1]);return fr.__wrap(i[0])}safe_serialize(t){const e=s.fheint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return fr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(fr.prototype[Symbol.dispose]=fr.prototype.free);const Md=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint136_free(n>>>0,1));class lr{static __wrap(t){t=t>>>0;const e=Object.create(lr.prototype);return e.__wbg_ptr=t,Md.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Md.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint136_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint136_deserialize(e,r);if(i[2])throw c(i[1]);return lr.__wrap(i[0])}safe_serialize(t){const e=s.fheint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return lr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(lr.prototype[Symbol.dispose]=lr.prototype.free);const jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint14_free(n>>>0,1));class hr{static __wrap(t){t=t>>>0;const e=Object.create(hr.prototype);return e.__wbg_ptr=t,jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint14_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint14_deserialize(e,r);if(i[2])throw c(i[1]);return hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(hr.prototype[Symbol.dispose]=hr.prototype.free);const Gd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint144_free(n>>>0,1));class pr{static __wrap(t){t=t>>>0;const e=Object.create(pr.prototype);return e.__wbg_ptr=t,Gd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint144_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint144_deserialize(e,r);if(i[2])throw c(i[1]);return pr.__wrap(i[0])}safe_serialize(t){const e=s.fheint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(pr.prototype[Symbol.dispose]=pr.prototype.free);const Hd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint152_free(n>>>0,1));class dr{static __wrap(t){t=t>>>0;const e=Object.create(dr.prototype);return e.__wbg_ptr=t,Hd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint152_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint152_deserialize(e,r);if(i[2])throw c(i[1]);return dr.__wrap(i[0])}safe_serialize(t){const e=s.fheint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dr.prototype[Symbol.dispose]=dr.prototype.free);const Vd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint16_free(n>>>0,1));class wr{static __wrap(t){t=t>>>0;const e=Object.create(wr.prototype);return e.__wbg_ptr=t,Vd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint16_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint16_deserialize(e,r);if(i[2])throw c(i[1]);return wr.__wrap(i[0])}safe_serialize(t){const e=s.fheint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(wr.prototype[Symbol.dispose]=wr.prototype.free);const qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint160_free(n>>>0,1));class gr{static __wrap(t){t=t>>>0;const e=Object.create(gr.prototype);return e.__wbg_ptr=t,qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint160_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint160_deserialize(e,r);if(i[2])throw c(i[1]);return gr.__wrap(i[0])}safe_serialize(t){const e=s.fheint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return gr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(gr.prototype[Symbol.dispose]=gr.prototype.free);const Qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint168_free(n>>>0,1));class yr{static __wrap(t){t=t>>>0;const e=Object.create(yr.prototype);return e.__wbg_ptr=t,Qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint168_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint168_deserialize(e,r);if(i[2])throw c(i[1]);return yr.__wrap(i[0])}safe_serialize(t){const e=s.fheint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return yr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(yr.prototype[Symbol.dispose]=yr.prototype.free);const Kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint176_free(n>>>0,1));class br{static __wrap(t){t=t>>>0;const e=Object.create(br.prototype);return e.__wbg_ptr=t,Kd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint176_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint176_deserialize(e,r);if(i[2])throw c(i[1]);return br.__wrap(i[0])}safe_serialize(t){const e=s.fheint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return br.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(br.prototype[Symbol.dispose]=br.prototype.free);const Wd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint184_free(n>>>0,1));class mr{static __wrap(t){t=t>>>0;const e=Object.create(mr.prototype);return e.__wbg_ptr=t,Wd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint184_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint184_deserialize(e,r);if(i[2])throw c(i[1]);return mr.__wrap(i[0])}safe_serialize(t){const e=s.fheint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return mr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(mr.prototype[Symbol.dispose]=mr.prototype.free);const Jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint192_free(n>>>0,1));class Ar{static __wrap(t){t=t>>>0;const e=Object.create(Ar.prototype);return e.__wbg_ptr=t,Jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint192_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint192_deserialize(e,r);if(i[2])throw c(i[1]);return Ar.__wrap(i[0])}safe_serialize(t){const e=s.fheint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ar.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ar.prototype[Symbol.dispose]=Ar.prototype.free);const $d=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2_free(n>>>0,1));class Er{static __wrap(t){t=t>>>0;const e=Object.create(Er.prototype);return e.__wbg_ptr=t,$d.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$d.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2_deserialize(e,r);if(i[2])throw c(i[1]);return Er.__wrap(i[0])}safe_serialize(t){const e=s.fheint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Er.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Er.prototype[Symbol.dispose]=Er.prototype.free);const Yd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint200_free(n>>>0,1));class vr{static __wrap(t){t=t>>>0;const e=Object.create(vr.prototype);return e.__wbg_ptr=t,Yd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint200_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint200_deserialize(e,r);if(i[2])throw c(i[1]);return vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return vr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(vr.prototype[Symbol.dispose]=vr.prototype.free);const Zd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2048_free(n>>>0,1));class xr{static __wrap(t){t=t>>>0;const e=Object.create(xr.prototype);return e.__wbg_ptr=t,Zd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2048_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2048_deserialize(e,r);if(i[2])throw c(i[1]);return xr.__wrap(i[0])}safe_serialize(t){const e=s.fheint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return xr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(xr.prototype[Symbol.dispose]=xr.prototype.free);const Xd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint208_free(n>>>0,1));class Rr{static __wrap(t){t=t>>>0;const e=Object.create(Rr.prototype);return e.__wbg_ptr=t,Xd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint208_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint208_deserialize(e,r);if(i[2])throw c(i[1]);return Rr.__wrap(i[0])}safe_serialize(t){const e=s.fheint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Rr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Rr.prototype[Symbol.dispose]=Rr.prototype.free);const tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint216_free(n>>>0,1));class Sr{static __wrap(t){t=t>>>0;const e=Object.create(Sr.prototype);return e.__wbg_ptr=t,tw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint216_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint216_deserialize(e,r);if(i[2])throw c(i[1]);return Sr.__wrap(i[0])}safe_serialize(t){const e=s.fheint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Sr.prototype[Symbol.dispose]=Sr.prototype.free);const ew=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint224_free(n>>>0,1));class zr{static __wrap(t){t=t>>>0;const e=Object.create(zr.prototype);return e.__wbg_ptr=t,ew.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ew.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint224_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint224_deserialize(e,r);if(i[2])throw c(i[1]);return zr.__wrap(i[0])}safe_serialize(t){const e=s.fheint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return zr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(zr.prototype[Symbol.dispose]=zr.prototype.free);const rw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint232_free(n>>>0,1));class Br{static __wrap(t){t=t>>>0;const e=Object.create(Br.prototype);return e.__wbg_ptr=t,rw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint232_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint232_deserialize(e,r);if(i[2])throw c(i[1]);return Br.__wrap(i[0])}safe_serialize(t){const e=s.fheint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Br.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Br.prototype[Symbol.dispose]=Br.prototype.free);const nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint24_free(n>>>0,1));class kr{static __wrap(t){t=t>>>0;const e=Object.create(kr.prototype);return e.__wbg_ptr=t,nw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,nw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint24_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint24_deserialize(e,r);if(i[2])throw c(i[1]);return kr.__wrap(i[0])}safe_serialize(t){const e=s.fheint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(kr.prototype[Symbol.dispose]=kr.prototype.free);const iw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint240_free(n>>>0,1));class Pr{static __wrap(t){t=t>>>0;const e=Object.create(Pr.prototype);return e.__wbg_ptr=t,iw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,iw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint240_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint240_deserialize(e,r);if(i[2])throw c(i[1]);return Pr.__wrap(i[0])}safe_serialize(t){const e=s.fheint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Pr.prototype[Symbol.dispose]=Pr.prototype.free);const sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint248_free(n>>>0,1));class Fr{static __wrap(t){t=t>>>0;const e=Object.create(Fr.prototype);return e.__wbg_ptr=t,sw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint248_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint248_deserialize(e,r);if(i[2])throw c(i[1]);return Fr.__wrap(i[0])}safe_serialize(t){const e=s.fheint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Fr.prototype[Symbol.dispose]=Fr.prototype.free);const ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint256_free(n>>>0,1));class Ir{static __wrap(t){t=t>>>0;const e=Object.create(Ir.prototype);return e.__wbg_ptr=t,ow.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ow.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint256_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint256_deserialize(e,r);if(i[2])throw c(i[1]);return Ir.__wrap(i[0])}safe_serialize(t){const e=s.fheint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ir.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ir.prototype[Symbol.dispose]=Ir.prototype.free);const aw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint32_free(n>>>0,1));class Or{static __wrap(t){t=t>>>0;const e=Object.create(Or.prototype);return e.__wbg_ptr=t,aw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,aw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint32_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint32_deserialize(e,r);if(i[2])throw c(i[1]);return Or.__wrap(i[0])}safe_serialize(t){const e=s.fheint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Or.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Or.prototype[Symbol.dispose]=Or.prototype.free);const cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint4_free(n>>>0,1));class Tr{static __wrap(t){t=t>>>0;const e=Object.create(Tr.prototype);return e.__wbg_ptr=t,cw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint4_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint4_deserialize(e,r);if(i[2])throw c(i[1]);return Tr.__wrap(i[0])}safe_serialize(t){const e=s.fheint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Tr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Tr.prototype[Symbol.dispose]=Tr.prototype.free);const uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint40_free(n>>>0,1));class Cr{static __wrap(t){t=t>>>0;const e=Object.create(Cr.prototype);return e.__wbg_ptr=t,uw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,uw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint40_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint40_deserialize(e,r);if(i[2])throw c(i[1]);return Cr.__wrap(i[0])}safe_serialize(t){const e=s.fheint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Cr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Cr.prototype[Symbol.dispose]=Cr.prototype.free);const _w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint48_free(n>>>0,1));class Nr{static __wrap(t){t=t>>>0;const e=Object.create(Nr.prototype);return e.__wbg_ptr=t,_w.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_w.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint48_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint48_deserialize(e,r);if(i[2])throw c(i[1]);return Nr.__wrap(i[0])}safe_serialize(t){const e=s.fheint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Nr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Nr.prototype[Symbol.dispose]=Nr.prototype.free);const fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint512_free(n>>>0,1));class Lr{static __wrap(t){t=t>>>0;const e=Object.create(Lr.prototype);return e.__wbg_ptr=t,fw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint512_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint512_deserialize(e,r);if(i[2])throw c(i[1]);return Lr.__wrap(i[0])}safe_serialize(t){const e=s.fheint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Lr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Lr.prototype[Symbol.dispose]=Lr.prototype.free);const lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint56_free(n>>>0,1));class Dr{static __wrap(t){t=t>>>0;const e=Object.create(Dr.prototype);return e.__wbg_ptr=t,lw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint56_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint56_deserialize(e,r);if(i[2])throw c(i[1]);return Dr.__wrap(i[0])}safe_serialize(t){const e=s.fheint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Dr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Dr.prototype[Symbol.dispose]=Dr.prototype.free);const hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint6_free(n>>>0,1));class Ur{static __wrap(t){t=t>>>0;const e=Object.create(Ur.prototype);return e.__wbg_ptr=t,hw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint6_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint6_deserialize(e,r);if(i[2])throw c(i[1]);return Ur.__wrap(i[0])}safe_serialize(t){const e=s.fheint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ur.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ur.prototype[Symbol.dispose]=Ur.prototype.free);const pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint64_free(n>>>0,1));class Mr{static __wrap(t){t=t>>>0;const e=Object.create(Mr.prototype);return e.__wbg_ptr=t,pw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint64_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint64_deserialize(e,r);if(i[2])throw c(i[1]);return Mr.__wrap(i[0])}safe_serialize(t){const e=s.fheint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Mr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Mr.prototype[Symbol.dispose]=Mr.prototype.free);const dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint72_free(n>>>0,1));class jr{static __wrap(t){t=t>>>0;const e=Object.create(jr.prototype);return e.__wbg_ptr=t,dw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint72_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint72_deserialize(e,r);if(i[2])throw c(i[1]);return jr.__wrap(i[0])}safe_serialize(t){const e=s.fheint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return jr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(jr.prototype[Symbol.dispose]=jr.prototype.free);const ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint8_free(n>>>0,1));class Gr{static __wrap(t){t=t>>>0;const e=Object.create(Gr.prototype);return e.__wbg_ptr=t,ww.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ww.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint8_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint8_deserialize(e,r);if(i[2])throw c(i[1]);return Gr.__wrap(i[0])}safe_serialize(t){const e=s.fheint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Gr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Gr.prototype[Symbol.dispose]=Gr.prototype.free);const gw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint80_free(n>>>0,1));class Hr{static __wrap(t){t=t>>>0;const e=Object.create(Hr.prototype);return e.__wbg_ptr=t,gw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint80_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint80_deserialize(e,r);if(i[2])throw c(i[1]);return Hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Hr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Hr.prototype[Symbol.dispose]=Hr.prototype.free);const yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint88_free(n>>>0,1));class Vr{static __wrap(t){t=t>>>0;const e=Object.create(Vr.prototype);return e.__wbg_ptr=t,yw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint88_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint88_deserialize(e,r);if(i[2])throw c(i[1]);return Vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Vr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Vr.prototype[Symbol.dispose]=Vr.prototype.free);const bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint96_free(n>>>0,1));class qr{static __wrap(t){t=t>>>0;const e=Object.create(qr.prototype);return e.__wbg_ptr=t,bw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint96_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint96_deserialize(e,r);if(i[2])throw c(i[1]);return qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return qr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(qr.prototype[Symbol.dispose]=qr.prototype.free);const mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint10_free(n>>>0,1));class Qr{static __wrap(t){t=t>>>0;const e=Object.create(Qr.prototype);return e.__wbg_ptr=t,mw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,mw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint10_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint10_deserialize(e,r);if(i[2])throw c(i[1]);return Qr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Qr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Qr.prototype[Symbol.dispose]=Qr.prototype.free);const Aw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint1024_free(n>>>0,1));class Kr{static __wrap(t){t=t>>>0;const e=Object.create(Kr.prototype);return e.__wbg_ptr=t,Aw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Aw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint1024_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint1024_deserialize(e,r);if(i[2])throw c(i[1]);return Kr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Kr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Kr.prototype[Symbol.dispose]=Kr.prototype.free);const Ew=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint104_free(n>>>0,1));class Wr{static __wrap(t){t=t>>>0;const e=Object.create(Wr.prototype);return e.__wbg_ptr=t,Ew.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ew.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint104_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint104_deserialize(e,r);if(i[2])throw c(i[1]);return Wr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Wr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Wr.prototype[Symbol.dispose]=Wr.prototype.free);const vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint112_free(n>>>0,1));class Jr{static __wrap(t){t=t>>>0;const e=Object.create(Jr.prototype);return e.__wbg_ptr=t,vw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint112_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint112_deserialize(e,r);if(i[2])throw c(i[1]);return Jr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Jr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Jr.prototype[Symbol.dispose]=Jr.prototype.free);const xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint12_free(n>>>0,1));class $r{static __wrap(t){t=t>>>0;const e=Object.create($r.prototype);return e.__wbg_ptr=t,xw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint12_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint12_deserialize(e,r);if(i[2])throw c(i[1]);return $r.__wrap(i[0])}safe_serialize(t){const e=s.fheuint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return $r.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&($r.prototype[Symbol.dispose]=$r.prototype.free);const Rw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint120_free(n>>>0,1));class Yr{static __wrap(t){t=t>>>0;const e=Object.create(Yr.prototype);return e.__wbg_ptr=t,Rw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint120_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint120_deserialize(e,r);if(i[2])throw c(i[1]);return Yr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Yr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Yr.prototype[Symbol.dispose]=Yr.prototype.free);const Sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint128_free(n>>>0,1));class Zr{static __wrap(t){t=t>>>0;const e=Object.create(Zr.prototype);return e.__wbg_ptr=t,Sw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint128_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint128_deserialize(e,r);if(i[2])throw c(i[1]);return Zr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Zr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Zr.prototype[Symbol.dispose]=Zr.prototype.free);const zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint136_free(n>>>0,1));class Xr{static __wrap(t){t=t>>>0;const e=Object.create(Xr.prototype);return e.__wbg_ptr=t,zw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint136_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint136_deserialize(e,r);if(i[2])throw c(i[1]);return Xr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Xr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Xr.prototype[Symbol.dispose]=Xr.prototype.free);const Bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint14_free(n>>>0,1));class tn{static __wrap(t){t=t>>>0;const e=Object.create(tn.prototype);return e.__wbg_ptr=t,Bw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint14_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint14_deserialize(e,r);if(i[2])throw c(i[1]);return tn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return tn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(tn.prototype[Symbol.dispose]=tn.prototype.free);const kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint144_free(n>>>0,1));class en{static __wrap(t){t=t>>>0;const e=Object.create(en.prototype);return e.__wbg_ptr=t,kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint144_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint144_deserialize(e,r);if(i[2])throw c(i[1]);return en.__wrap(i[0])}safe_serialize(t){const e=s.fheuint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return en.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(en.prototype[Symbol.dispose]=en.prototype.free);const Pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint152_free(n>>>0,1));class rn{static __wrap(t){t=t>>>0;const e=Object.create(rn.prototype);return e.__wbg_ptr=t,Pw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint152_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint152_deserialize(e,r);if(i[2])throw c(i[1]);return rn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return rn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(rn.prototype[Symbol.dispose]=rn.prototype.free);const Fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint16_free(n>>>0,1));class nn{static __wrap(t){t=t>>>0;const e=Object.create(nn.prototype);return e.__wbg_ptr=t,Fw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint16_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint16_deserialize(e,r);if(i[2])throw c(i[1]);return nn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return nn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(nn.prototype[Symbol.dispose]=nn.prototype.free);const Iw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint160_free(n>>>0,1));class sn{static __wrap(t){t=t>>>0;const e=Object.create(sn.prototype);return e.__wbg_ptr=t,Iw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Iw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint160_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint160_deserialize(e,r);if(i[2])throw c(i[1]);return sn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return sn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(sn.prototype[Symbol.dispose]=sn.prototype.free);const Ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint168_free(n>>>0,1));class on{static __wrap(t){t=t>>>0;const e=Object.create(on.prototype);return e.__wbg_ptr=t,Ow.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ow.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint168_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint168_deserialize(e,r);if(i[2])throw c(i[1]);return on.__wrap(i[0])}safe_serialize(t){const e=s.fheuint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return on.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(on.prototype[Symbol.dispose]=on.prototype.free);const Tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint176_free(n>>>0,1));class an{static __wrap(t){t=t>>>0;const e=Object.create(an.prototype);return e.__wbg_ptr=t,Tw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Tw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint176_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint176_deserialize(e,r);if(i[2])throw c(i[1]);return an.__wrap(i[0])}safe_serialize(t){const e=s.fheuint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return an.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(an.prototype[Symbol.dispose]=an.prototype.free);const Cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint184_free(n>>>0,1));class cn{static __wrap(t){t=t>>>0;const e=Object.create(cn.prototype);return e.__wbg_ptr=t,Cw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint184_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint184_deserialize(e,r);if(i[2])throw c(i[1]);return cn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return cn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(cn.prototype[Symbol.dispose]=cn.prototype.free);const Nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint192_free(n>>>0,1));class un{static __wrap(t){t=t>>>0;const e=Object.create(un.prototype);return e.__wbg_ptr=t,Nw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint192_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint192_deserialize(e,r);if(i[2])throw c(i[1]);return un.__wrap(i[0])}safe_serialize(t){const e=s.fheuint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return un.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(un.prototype[Symbol.dispose]=un.prototype.free);const Lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2_free(n>>>0,1));class _n{static __wrap(t){t=t>>>0;const e=Object.create(_n.prototype);return e.__wbg_ptr=t,Lw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Lw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2_deserialize(e,r);if(i[2])throw c(i[1]);return _n.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return _n.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(_n.prototype[Symbol.dispose]=_n.prototype.free);const Dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint200_free(n>>>0,1));class fn{static __wrap(t){t=t>>>0;const e=Object.create(fn.prototype);return e.__wbg_ptr=t,Dw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint200_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint200_deserialize(e,r);if(i[2])throw c(i[1]);return fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return fn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(fn.prototype[Symbol.dispose]=fn.prototype.free);const Uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2048_free(n>>>0,1));class ln{static __wrap(t){t=t>>>0;const e=Object.create(ln.prototype);return e.__wbg_ptr=t,Uw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Uw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2048_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2048_deserialize(e,r);if(i[2])throw c(i[1]);return ln.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ln.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ln.prototype[Symbol.dispose]=ln.prototype.free);const Mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint208_free(n>>>0,1));class hn{static __wrap(t){t=t>>>0;const e=Object.create(hn.prototype);return e.__wbg_ptr=t,Mw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Mw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint208_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint208_deserialize(e,r);if(i[2])throw c(i[1]);return hn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(hn.prototype[Symbol.dispose]=hn.prototype.free);const jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint216_free(n>>>0,1));class pn{static __wrap(t){t=t>>>0;const e=Object.create(pn.prototype);return e.__wbg_ptr=t,jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint216_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint216_deserialize(e,r);if(i[2])throw c(i[1]);return pn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(pn.prototype[Symbol.dispose]=pn.prototype.free);const Gw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint224_free(n>>>0,1));class dn{static __wrap(t){t=t>>>0;const e=Object.create(dn.prototype);return e.__wbg_ptr=t,Gw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint224_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint224_deserialize(e,r);if(i[2])throw c(i[1]);return dn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dn.prototype[Symbol.dispose]=dn.prototype.free);const Hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint232_free(n>>>0,1));class wn{static __wrap(t){t=t>>>0;const e=Object.create(wn.prototype);return e.__wbg_ptr=t,Hw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint232_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint232_deserialize(e,r);if(i[2])throw c(i[1]);return wn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(wn.prototype[Symbol.dispose]=wn.prototype.free);const Vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint24_free(n>>>0,1));class gn{static __wrap(t){t=t>>>0;const e=Object.create(gn.prototype);return e.__wbg_ptr=t,Vw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint24_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint24_deserialize(e,r);if(i[2])throw c(i[1]);return gn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return gn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(gn.prototype[Symbol.dispose]=gn.prototype.free);const qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint240_free(n>>>0,1));class yn{static __wrap(t){t=t>>>0;const e=Object.create(yn.prototype);return e.__wbg_ptr=t,qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint240_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint240_deserialize(e,r);if(i[2])throw c(i[1]);return yn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return yn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(yn.prototype[Symbol.dispose]=yn.prototype.free);const Qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint248_free(n>>>0,1));class bn{static __wrap(t){t=t>>>0;const e=Object.create(bn.prototype);return e.__wbg_ptr=t,Qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint248_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint248_deserialize(e,r);if(i[2])throw c(i[1]);return bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return bn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(bn.prototype[Symbol.dispose]=bn.prototype.free);const Kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint256_free(n>>>0,1));class mn{static __wrap(t){t=t>>>0;const e=Object.create(mn.prototype);return e.__wbg_ptr=t,Kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint256_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint256_deserialize(e,r);if(i[2])throw c(i[1]);return mn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return mn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(mn.prototype[Symbol.dispose]=mn.prototype.free);const Ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint32_free(n>>>0,1));class An{static __wrap(t){t=t>>>0;const e=Object.create(An.prototype);return e.__wbg_ptr=t,Ww.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ww.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint32_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint32_deserialize(e,r);if(i[2])throw c(i[1]);return An.__wrap(i[0])}safe_serialize(t){const e=s.fheuint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return An.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(An.prototype[Symbol.dispose]=An.prototype.free);const Jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint4_free(n>>>0,1));class En{static __wrap(t){t=t>>>0;const e=Object.create(En.prototype);return e.__wbg_ptr=t,Jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint4_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint4_deserialize(e,r);if(i[2])throw c(i[1]);return En.__wrap(i[0])}safe_serialize(t){const e=s.fheuint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return En.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(En.prototype[Symbol.dispose]=En.prototype.free);const $w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint40_free(n>>>0,1));class vn{static __wrap(t){t=t>>>0;const e=Object.create(vn.prototype);return e.__wbg_ptr=t,$w.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$w.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint40_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint40_deserialize(e,r);if(i[2])throw c(i[1]);return vn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return vn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(vn.prototype[Symbol.dispose]=vn.prototype.free);const Yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint48_free(n>>>0,1));class xn{static __wrap(t){t=t>>>0;const e=Object.create(xn.prototype);return e.__wbg_ptr=t,Yw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint48_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint48_deserialize(e,r);if(i[2])throw c(i[1]);return xn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return xn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(xn.prototype[Symbol.dispose]=xn.prototype.free);const Zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint512_free(n>>>0,1));class Rn{static __wrap(t){t=t>>>0;const e=Object.create(Rn.prototype);return e.__wbg_ptr=t,Zw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint512_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint512_deserialize(e,r);if(i[2])throw c(i[1]);return Rn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Rn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Rn.prototype[Symbol.dispose]=Rn.prototype.free);const Xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint56_free(n>>>0,1));class Sn{static __wrap(t){t=t>>>0;const e=Object.create(Sn.prototype);return e.__wbg_ptr=t,Xw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint56_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint56_deserialize(e,r);if(i[2])throw c(i[1]);return Sn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Sn.prototype[Symbol.dispose]=Sn.prototype.free);const tg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint6_free(n>>>0,1));class zn{static __wrap(t){t=t>>>0;const e=Object.create(zn.prototype);return e.__wbg_ptr=t,tg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint6_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint6_deserialize(e,r);if(i[2])throw c(i[1]);return zn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return zn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(zn.prototype[Symbol.dispose]=zn.prototype.free);const eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint64_free(n>>>0,1));class Bn{static __wrap(t){t=t>>>0;const e=Object.create(Bn.prototype);return e.__wbg_ptr=t,eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,eg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint64_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint64_deserialize(e,r);if(i[2])throw c(i[1]);return Bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Bn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Bn.prototype[Symbol.dispose]=Bn.prototype.free);const rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint72_free(n>>>0,1));class kn{static __wrap(t){t=t>>>0;const e=Object.create(kn.prototype);return e.__wbg_ptr=t,rg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint72_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint72_deserialize(e,r);if(i[2])throw c(i[1]);return kn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(kn.prototype[Symbol.dispose]=kn.prototype.free);const ng=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint8_free(n>>>0,1));class Pn{static __wrap(t){t=t>>>0;const e=Object.create(Pn.prototype);return e.__wbg_ptr=t,ng.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ng.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint8_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint8_deserialize(e,r);if(i[2])throw c(i[1]);return Pn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Pn.prototype[Symbol.dispose]=Pn.prototype.free);const ig=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint80_free(n>>>0,1));class Fn{static __wrap(t){t=t>>>0;const e=Object.create(Fn.prototype);return e.__wbg_ptr=t,ig.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ig.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint80_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint80_deserialize(e,r);if(i[2])throw c(i[1]);return Fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Fn.prototype[Symbol.dispose]=Fn.prototype.free);const sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint88_free(n>>>0,1));class In{static __wrap(t){t=t>>>0;const e=Object.create(In.prototype);return e.__wbg_ptr=t,sg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint88_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint88_deserialize(e,r);if(i[2])throw c(i[1]);return In.__wrap(i[0])}safe_serialize(t){const e=s.fheuint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return In.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(In.prototype[Symbol.dispose]=In.prototype.free);const og=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint96_free(n>>>0,1));class On{static __wrap(t){t=t>>>0;const e=Object.create(On.prototype);return e.__wbg_ptr=t,og.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,og.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint96_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint96_deserialize(e,r);if(i[2])throw c(i[1]);return On.__wrap(i[0])}safe_serialize(t){const e=s.fheuint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return On.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,lt);const r=s.fheuint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,pt);const r=s.fheuint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(On.prototype[Symbol.dispose]=On.prototype.free);const ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_provencompactciphertextlist_free(n>>>0,1));class di{static __wrap(t){t=t>>>0;const e=Object.create(di.prototype);return e.__wbg_ptr=t,ag.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ag.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_provencompactciphertextlist_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.provencompactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return di.__wrap(i[0])}get_kind_of(t){const e=s.provencompactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}safe_serialize(t){const e=s.provencompactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.provencompactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return di.__wrap(o[0])}verify_and_expand(t,e,r){A(t,Ue),A(e,Me);const i=q(r,s.__wbindgen_malloc),o=j,a=s.provencompactciphertextlist_verify_and_expand(this.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,i,o);if(a[2])throw c(a[1]);return pi.__wrap(a[0])}expand_without_verification(){const t=s.provencompactciphertextlist_expand_without_verification(this.__wbg_ptr);if(t[2])throw c(t[1]);return pi.__wrap(t[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}static builder(t){A(t,Me);const e=s.provencompactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Ui.__wrap(e[0])}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}serialize(){const t=s.provencompactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(di.prototype[Symbol.dispose]=di.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortint_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintclientkey_free(n>>>0,1));const Wu=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompactpublickeyencryptionparameters_free(n>>>0,1));class Mi{static __wrap(t){t=t>>>0;const e=Object.create(Mi.prototype);return e.__wbg_ptr=t,Wu.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wu.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompactpublickeyencryptionparameters_free(t,0)}static new_parameters(t,e,r,i,o,a,u,_){A(e,ms);const l=s.shortintcompactpublickeyencryptionparameters_new_parameters(t,e.__wbg_ptr,r,i,o,a,u,_);if(l[2])throw c(l[1]);return Mi.__wrap(l[0])}constructor(t){const e=s.shortintcompactpublickeyencryptionparameters_new(t);return this.__wbg_ptr=e>>>0,Wu.register(this,this.__wbg_ptr,this),this}}Symbol.dispose&&(Mi.prototype[Symbol.dispose]=Mi.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedpublickey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedserverkey_free(n>>>0,1));const cg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintnoisedistribution_free(n>>>0,1));class ms{static __wrap(t){t=t>>>0;const e=Object.create(ms.prototype);return e.__wbg_ptr=t,cg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintnoisedistribution_free(t,0)}}Symbol.dispose&&(ms.prototype[Symbol.dispose]=ms.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintpublickey_free(n>>>0,1));const ug=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheclientkey_free(n>>>0,1));class K{static __wrap(t){t=t>>>0;const e=Object.create(K.prototype);return e.__wbg_ptr=t,ug.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ug.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheclientkey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfheclientkey_deserialize(e,r);if(i[2])throw c(i[1]);return K.__wrap(i[0])}safe_serialize(t){const e=s.tfheclientkey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfheclientkey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return K.__wrap(o[0])}static generate_with_seed(t,e){A(t,wi);const r=s.tfheclientkey_generate_with_seed(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return K.__wrap(r[0])}static generate(t){A(t,wi);const e=s.tfheclientkey_generate(t.__wbg_ptr);if(e[2])throw c(e[1]);return K.__wrap(e[0])}serialize(){const t=s.tfheclientkey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(K.prototype[Symbol.dispose]=K.prototype.free);const _g=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompactpublickey_free(n>>>0,1));class Me{static __wrap(t){t=t>>>0;const e=Object.create(Me.prototype);return e.__wbg_ptr=t,_g.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_g.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompactpublickey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompactpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return Me.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompactpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompactpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Me.__wrap(o[0])}static safe_deserialize_conformant(t,e,r){const i=q(t,s.__wbindgen_malloc),o=j;A(r,Mi);const a=s.tfhecompactpublickey_safe_deserialize_conformant(i,o,e,r.__wbg_ptr);if(a[2])throw c(a[1]);return Me.__wrap(a[0])}static new(t){A(t,K);const e=s.tfhecompactpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return Me.__wrap(e[0])}serialize(){const t=s.tfhecompactpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Me.prototype[Symbol.dispose]=Me.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedcompactpublickey_free(n>>>0,1));const fg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedpublickey_free(n>>>0,1));class pt{static __wrap(t){t=t>>>0;const e=Object.create(pt.prototype);return e.__wbg_ptr=t,fg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompressedpublickey_free(t,0)}decompress(){const t=s.tfhecompressedpublickey_decompress(this.__wbg_ptr);if(t[2])throw c(t[1]);return lt.__wrap(t[0])}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompressedpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return pt.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompressedpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompressedpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pt.__wrap(o[0])}static new(t){A(t,K);const e=s.tfhecompressedpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return pt.__wrap(e[0])}serialize(){const t=s.tfhecompressedpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(pt.prototype[Symbol.dispose]=pt.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedserverkey_free(n>>>0,1));const lg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheconfig_free(n>>>0,1));class wi{static __wrap(t){t=t>>>0;const e=Object.create(wi.prototype);return e.__wbg_ptr=t,lg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheconfig_free(t,0)}}Symbol.dispose&&(wi.prototype[Symbol.dispose]=wi.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheconfigbuilder_free(n>>>0,1));const hg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhepublickey_free(n>>>0,1));class lt{static __wrap(t){t=t>>>0;const e=Object.create(lt.prototype);return e.__wbg_ptr=t,hg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhepublickey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhepublickey_deserialize(e,r);if(i[2])throw c(i[1]);return lt.__wrap(i[0])}safe_serialize(t){const e=s.tfhepublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhepublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return lt.__wrap(o[0])}static new(t){A(t,K);const e=s.tfhepublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return lt.__wrap(e[0])}serialize(){const t=s.tfhepublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(lt.prototype[Symbol.dispose]=lt.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhe_free(n>>>0,1));const pg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_wbg_rayon_poolbuilder_free(n>>>0,1));class As{static __wrap(t){t=t>>>0;const e=Object.create(As.prototype);return e.__wbg_ptr=t,pg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_wbg_rayon_poolbuilder_free(t,0)}numThreads(){return s.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}build(){s.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}receiver(){return s.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}}Symbol.dispose&&(As.prototype[Symbol.dispose]=As.prototype.free);const k2=new Set(["basic","cors","default"]);async function P2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.ok&&k2.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function F2(){const n={};return n.wbg={},n.wbg.__wbg_BigInt_40a77d45cca49470=function(){return ys(function(t){return BigInt(t)},arguments)},n.wbg.__wbg_BigInt_6adbfd8eb0f7ec07=function(t){return BigInt(t)},n.wbg.__wbg_Error_e17e777aac105295=function(t,e){return Error(Ys(t,e))},n.wbg.__wbg_call_13410aac570ffff7=function(){return ys(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_a5400b25a865cfd8=function(){return ys(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(Ys(t,e))}finally{s.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return ys(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_getTime_6bb3f64e0f18f817=function(t){return t.getTime()},n.wbg.__wbg_instanceof_Window_12d20d558ef92592=function(t){let e;try{e=t instanceof Window}catch{e=!1}return e},n.wbg.__wbg_length_6bb7e81f9d7713e4=function(t){return t.length},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},n.wbg.__wbg_new0_b0a0a38c201e6df5=function(){return new Date},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_newnoargs_254190557c45b4ec=function(t,e){return new Function(Ys(t,e))},n.wbg.__wbg_newwithlength_a167dcc7aaa3ba77=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},n.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(t,e,r){Uint8Array.prototype.set.call(Q(t,e),r)},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return ys(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return ys(function(){return module.require},arguments)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=na(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;jn().setInt32(t+4*1,o,!0),jn().setInt32(t+4*0,i,!0)},n.wbg.__wbg_startWorkers_2ca11761e08ff5d5=function(t,e,r){return R2(t,e,As.__wrap(r))},n.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12=function(){const t=typeof ta>"u"?null:ta;return Di(t)?0:Js(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184=function(){const t=typeof globalThis>"u"?null:globalThis;return Di(t)?0:Js(t)},n.wbg.__wbg_static_accessor_SELF_995b214ae681ff99=function(){const t=typeof self>"u"?null:self;return Di(t)?0:Js(t)},n.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea=function(){const t=typeof window>"u"?null:window;return Di(t)?0:Js(t)},n.wbg.__wbg_subarray_70fd07feefe14294=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_toString_1f1286a7a97689fe=function(t,e,r){const i=e.toString(r),o=na(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;jn().setInt32(t+4*1,a,!0),jn().setInt32(t+4*0,o,!0)},n.wbg.__wbg_toString_d8f537919ef401d6=function(t){return t.toString()},n.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},n.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1=function(t,e){const r=e,i=typeof r=="bigint"?r:void 0;jn().setBigInt64(t+8*1,Di(i)?BigInt(0):i,!0),jn().setInt32(t+4*0,!Di(i),!0)},n.wbg.__wbg_wbindgenbitand_24bfc92ff26d44cb=function(t,e){return t&e},n.wbg.__wbg_wbindgenbitor_87169f71f306a104=function(t,e){return t|e},n.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(t,e){const r=qu(e),i=na(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;jn().setInt32(t+4*1,o,!0),jn().setInt32(t+4*0,i,!0)},n.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74=function(t){return typeof t=="function"},n.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(t){return typeof t=="string"},n.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(t){return t===void 0},n.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58=function(t,e){return t===e},n.wbg.__wbg_wbindgenlt_544155a2b3097bd5=function(t,e){return t<e},n.wbg.__wbg_wbindgenmemory_d84da70f7c42d172=function(){return s.memory},n.wbg.__wbg_wbindgenmodule_7e59019f6366ff9c=function(){return Xs.__wbindgen_wasm_module},n.wbg.__wbg_wbindgenneg_3577d8a6fd6fd98b=function(t){return-t},n.wbg.__wbg_wbindgenshl_54c6fe049ff902f0=function(t,e){return t<<e},n.wbg.__wbg_wbindgenshr_7d2aae6044c0dab1=function(t,e){return t>>e},n.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=Di(i)?0:na(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;jn().setInt32(t+4*1,a,!0),jn().setInt32(t+4*0,o,!0)},n.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(t,e){throw new Error(Ys(t,e))},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(t,e){return Ys(t,e)},n.wbg.__wbindgen_cast_2ddd8a25ff58642a=function(t,e){return BigInt.asUintN(64,t)|e<<BigInt(64)},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(t){return BigInt.asUintN(64,t)},n.wbg.__wbindgen_cast_9ae0607507abb057=function(t){return t},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(t,e){return Q(t,e)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(t){return t},n.wbg.__wbindgen_cast_e7b45dd881f38ce3=function(t,e){return BigInt.asUintN(64,t)|BigInt.asUintN(64,e)<<BigInt(64)},n.wbg.__wbindgen_init_externref_table=function(){const t=s.__wbindgen_export_2,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n}function I2(n,t){n.wbg.memory=t||new WebAssembly.Memory({initial:21,maximum:16384,shared:!0})}function O2(n,t,e){if(s=n.exports,Xs.__wbindgen_wasm_module=t,Zs=null,$s=null,typeof e<"u"&&(typeof e!="number"||e===0||e%65536!==0))throw"invalid stack size";return s.__wbindgen_start(e),s}async function Xs(n,t){if(s!==void 0)return s;let e;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n,memory:t,thread_stack_size:e}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/tfhe_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const r=F2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n)),I2(r,t);const{instance:i,module:o}=await P2(await n,r);return O2(i,o,e)}var T2=Object.freeze({__proto__:null,CompactCiphertextList:Gn,CompactCiphertextListBuilder:Ui,CompactCiphertextListExpander:pi,CompactPkeCrs:Ue,FheBool:ir,FheInt10:sr,FheInt1024:or,FheInt104:ar,FheInt112:cr,FheInt12:ur,FheInt120:_r,FheInt128:fr,FheInt136:lr,FheInt14:hr,FheInt144:pr,FheInt152:dr,FheInt16:wr,FheInt160:gr,FheInt168:yr,FheInt176:br,FheInt184:mr,FheInt192:Ar,FheInt2:Er,FheInt200:vr,FheInt2048:xr,FheInt208:Rr,FheInt216:Sr,FheInt224:zr,FheInt232:Br,FheInt24:kr,FheInt240:Pr,FheInt248:Fr,FheInt256:Ir,FheInt32:Or,FheInt4:Tr,FheInt40:Cr,FheInt48:Nr,FheInt512:Lr,FheInt56:Dr,FheInt6:Ur,FheInt64:Mr,FheInt72:jr,FheInt8:Gr,FheInt80:Hr,FheInt88:Vr,FheInt96:qr,FheUint10:Qr,FheUint1024:Kr,FheUint104:Wr,FheUint112:Jr,FheUint12:$r,FheUint120:Yr,FheUint128:Zr,FheUint136:Xr,FheUint14:tn,FheUint144:en,FheUint152:rn,FheUint16:nn,FheUint160:sn,FheUint168:on,FheUint176:an,FheUint184:cn,FheUint192:un,FheUint2:_n,FheUint200:fn,FheUint2048:ln,FheUint208:hn,FheUint216:pn,FheUint224:dn,FheUint232:wn,FheUint24:gn,FheUint240:yn,FheUint248:bn,FheUint256:mn,FheUint32:An,FheUint4:En,FheUint40:vn,FheUint48:xn,FheUint512:Rn,FheUint56:Sn,FheUint6:zn,FheUint64:Bn,FheUint72:kn,FheUint8:Pn,FheUint80:Fn,FheUint88:In,FheUint96:On,ProvenCompactCiphertextList:di,ShortintCompactPublicKeyEncryptionParameters:Mi,ShortintNoiseDistribution:ms,TfheClientKey:K,TfheCompactPublicKey:Me,TfheCompressedPublicKey:pt,TfheConfig:wi,TfhePublicKey:lt,ZkComputeLoad:zd,default:Xs,initThreadPool:Ku,init_panic_hook:Qu,wbg_rayon_PoolBuilder:As,wbg_rayon_start_worker:B2});let tt,te=0,to=null;function Es(){return(to===null||to.byteLength===0)&&(to=new Uint8Array(tt.memory.buffer)),to}const ia=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},C2=typeof ia.encodeInto=="function"?function(n,t){return ia.encodeInto(n,t)}:function(n,t){const e=ia.encode(n);return t.set(e),{read:n.length,written:e.length}};function ji(n,t,e){if(e===void 0){const u=ia.encode(n),_=t(u.length,1)>>>0;return Es().subarray(_,_+u.length).set(u),te=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=Es();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=Es().subarray(i+a,i+r),_=C2(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return te=a,i}let Gi=null;function Qe(){return(Gi===null||Gi.buffer.detached===!0||Gi.buffer.detached===void 0&&Gi.buffer!==tt.memory.buffer)&&(Gi=new DataView(tt.memory.buffer)),Gi}function vs(n){const t=tt.__externref_table_alloc();return tt.__wbindgen_export_4.set(t,n),t}function Hi(n,t){try{return n.apply(this,t)}catch(e){const r=vs(e);tt.__wbindgen_exn_store(r)}}const dg=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&dg.decode();function eo(n,t){return n=n>>>0,dg.decode(Es().subarray(n,n+t))}function gi(n){return n==null}function Ju(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=Ju(n[0]));for(let a=1;a<i;a++)o+=", "+Ju(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
22
- ${n.stack}`:r}function Vi(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function Ke(n,t){return n=n>>>0,Es().subarray(n/1,n/1+t)}function We(n,t){const e=t(n.length*1,1)>>>0;return Es().set(n,e/1),te=n.length,e}function qi(n){const t=tt.__wbindgen_export_4.get(n);return tt.__externref_table_dealloc(n),t}function N2(n,t){const e=ji(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),r=te,i=tt.new_server_id_addr(n,e,r);if(i[2])throw qi(i[1]);return Rs.__wrap(i[0])}function wg(n,t){const e=t(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){const i=vs(n[r]);Qe().setUint32(e+4*r,i,!0)}return te=n.length,e}function L2(n,t,e){const r=wg(n,tt.__wbindgen_malloc),i=te,o=ji(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=te,u=ji(e,tt.__wbindgen_malloc,tt.__wbindgen_realloc),_=te,l=tt.new_client(r,i,o,a,u,_);if(l[2])throw qi(l[1]);return sa.__wrap(l[0])}function gg(n,t){n=n>>>0;const e=Qe(),r=[];for(let i=n;i<n+4*t;i+=4)r.push(tt.__wbindgen_export_4.get(e.getUint32(i,!0)));return tt.__externref_drop_slice(n,t),r}function D2(){const n=tt.ml_kem_pke_keygen();return Qi.__wrap(n)}function U2(n){Vi(n,Qi);const t=tt.ml_kem_pke_get_pk(n.__wbg_ptr);return xs.__wrap(t)}function M2(n){Vi(n,xs);const t=tt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw qi(t[2]);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function j2(n){Vi(n,Qi);const t=tt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw qi(t[2]);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function G2(n){const t=We(n,tt.__wbindgen_malloc),e=te,r=tt.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw qi(r[1]);return xs.__wrap(r[0])}function H2(n){const t=We(n,tt.__wbindgen_malloc),e=te,r=tt.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw qi(r[1]);return Qi.__wrap(r[0])}function V2(n,t,e,r,i,o,a){Vi(n,sa),Vi(i,xs),Vi(o,Qi);const u=tt.process_user_decryption_resp_from_js(n.__wbg_ptr,t,e,r,i.__wbg_ptr,o.__wbg_ptr,a);if(u[3])throw qi(u[2]);var _=gg(u[0],u[1]).slice();return tt.__wbindgen_free(u[0],u[1]*4,4),_}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_ciphertexthandle_free(n>>>0,1));const yg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_client_free(n>>>0,1));class sa{static __wrap(t){t=t>>>0;const e=Object.create(sa.prototype);return e.__wbg_ptr=t,yg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_client_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_eip712domainmsg_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_parseduserdecryptionrequest_free(n>>>0,1));const bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_privateenckeymlkem512_free(n>>>0,1));class Qi{static __wrap(t){t=t>>>0;const e=Object.create(Qi.prototype);return e.__wbg_ptr=t,bg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_privateenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_privatesigkey_free(n>>>0,1));const mg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_publicenckeymlkem512_free(n>>>0,1));class xs{static __wrap(t){t=t>>>0;const e=Object.create(xs.prototype);return e.__wbg_ptr=t,mg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,mg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_publicenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_publicsigkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_requestid_free(n>>>0,1));const Ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_serveridaddr_free(n>>>0,1));class Rs{static __wrap(t){t=t>>>0;const e=Object.create(Rs.prototype);return e.__wbg_ptr=t,Ag.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof Rs?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ag.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_serveridaddr_free(t,0)}}const Eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedciphertext_free(n>>>0,1));class ro{static __wrap(t){t=t>>>0;const e=Object.create(ro.prototype);return e.__wbg_ptr=t,Eg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof ro?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Eg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedciphertext_free(t,0)}get ciphertext(){const t=tt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get external_handle(){const t=tt.__wbg_get_typedciphertext_external_handle(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get ciphertext_format(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)}set ciphertext_format(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}const vg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedplaintext_free(n>>>0,1));class $u{static __wrap(t){t=t>>>0;const e=Object.create($u.prototype);return e.__wbg_ptr=t,vg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedplaintext_free(t,0)}get bytes(){const t=tt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedplaintext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedplaintext_fhe_type(this.__wbg_ptr,t)}}const xg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class no{static __wrap(t){t=t>>>0;const e=Object.create(no.prototype);return e.__wbg_ptr=t,xg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof no?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedsigncryptedciphertext_free(t,0)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get signcrypted_ciphertext(){const t=tt.__wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_handle(){const t=tt.__wbg_get_typedsigncryptedciphertext_external_handle(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get packing_factor(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)>>>0}set packing_factor(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_userdecryptionrequest_free(n>>>0,1));const q2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponse_free(n>>>0,1));class Yu{static __unwrap(t){return t instanceof Yu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,q2.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponse_free(t,0)}get signature(){const t=tt.__wbg_get_userdecryptionresponse_signature(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_signature(){const t=tt.__wbg_get_userdecryptionresponse_external_signature(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get payload(){const t=tt.__wbg_get_userdecryptionresponse_payload(this.__wbg_ptr);return t===0?void 0:oa.__wrap(t)}set payload(t){let e=0;gi(t)||(Vi(t,oa),e=t.__destroy_into_raw()),tt.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr,e)}get extra_data(){const t=tt.__wbg_get_userdecryptionresponse_extra_data(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set extra_data(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr,e,r)}}const Rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class oa{static __wrap(t){t=t>>>0;const e=Object.create(oa.prototype);return e.__wbg_ptr=t,Rg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=tt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get digest(){const t=tt.__wbg_get_userdecryptionresponsepayload_digest(this.__wbg_ptr);var e=Ke(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=We(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get signcrypted_ciphertexts(){const t=tt.__wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);var e=gg(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*4,4),e}set signcrypted_ciphertexts(t){const e=wg(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr,e,r)}get party_id(){return tt.__wbg_get_userdecryptionresponsepayload_party_id(this.__wbg_ptr)>>>0}set party_id(t){tt.__wbg_set_userdecryptionresponsepayload_party_id(this.__wbg_ptr,t)}get degree(){return tt.__wbg_get_userdecryptionresponsepayload_degree(this.__wbg_ptr)>>>0}set degree(t){tt.__wbg_set_userdecryptionresponsepayload_degree(this.__wbg_ptr,t)}}async function Q2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function K2(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;Qe().setInt32(t+4*1,o,!0),Qe().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return Hi(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Hi(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_ed58b8e10a292839=function(t){return t.crypto},n.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(eo(t,e))}finally{tt.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return Hi(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return Hi(function(t,e){return Reflect.get(t,e)},arguments)},n.wbg.__wbg_get_b9b93047fe3cf45b=function(t,e){return t[e>>>0]},n.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(t,e){return t[e]},n.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let e;try{e=t instanceof ArrayBuffer}catch{e=!1}return e},n.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let e;try{e=t instanceof Uint8Array}catch{e=!1}return e},n.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},n.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},n.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},n.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},n.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},n.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(t){return t.msCrypto},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(eo(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},n.wbg.__wbg_next_6574e1a8a62d1055=function(){return Hi(function(t){return t.next()},arguments)},n.wbg.__wbg_node_02999533c4ea02e3=function(t){return t.node},n.wbg.__wbg_process_5c1d670bc53614b8=function(t){return t.process},n.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return Hi(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return Hi(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return Rs.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return Rs.__unwrap(t)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;Qe().setInt32(t+4*1,o,!0),Qe().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof ta>"u"?null:ta;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return gi(t)?0:vs(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_typedciphertext_new=function(t){return ro.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return ro.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return $u.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return no.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return no.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return Yu.__unwrap(t)},n.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},n.wbg.__wbg_versions_c71aa1626a93e0a1=function(t){return t.versions},n.wbg.__wbindgen_as_number=function(t){return+t},n.wbg.__wbindgen_boolean_get=function(t){const e=t;return typeof e=="boolean"?e?1:0:2},n.wbg.__wbindgen_debug_string=function(t,e){const r=Ju(e),i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;Qe().setInt32(t+4*1,o,!0),Qe().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(eo(t,e))},n.wbg.__wbindgen_in=function(t,e){return t in e},n.wbg.__wbindgen_init_externref_table=function(){const t=tt.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_null=function(t){return t===null},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_loose_eq=function(t,e){return t==e},n.wbg.__wbindgen_memory=function(){return tt.memory},n.wbg.__wbindgen_number_get=function(t,e){const r=e,i=typeof r=="number"?r:void 0;Qe().setFloat64(t+8*1,gi(i)?0:i,!0),Qe().setInt32(t+4*0,!gi(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=gi(i)?0:ji(i,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=te;Qe().setInt32(t+4*1,a,!0),Qe().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return eo(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(eo(t,e))},n}function W2(n,t){return tt=n.exports,Zu.__wbindgen_wasm_module=t,Gi=null,to=null,tt.__wbindgen_start(),tt}async function Zu(n){if(tt!==void 0)return tt;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/kms_lib_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const t=K2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await Q2(await n,t);return W2(e,r)}const J2=BigInt(1024*1024*512),Xu=BigInt(1024*1024*512),t_=BigInt(1024*1024*512),io=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",Sg=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},Je=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function Hn(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const aa=function(n){if(!n||n?.length===0)return BigInt(0);const t=Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("");return BigInt(`0x${t}`)};function $2(n,t){if(t)switch(t.__type){case"BearerToken":n.headers.Authorization=`Bearer ${t.token}`;break;case"ApiKeyHeader":n.headers[t.header||"x-api-key"]=t.value;break;case"ApiKeyCookie":if(typeof window<"u")document.cookie=`${t.cookie||"x-api-key"}=${t.value}; path=/; SameSite=Lax; Secure; HttpOnly;`,n.credentials="include";else{let e=`${t.cookie||"x-api-key"}=${t.value};`;n.headers.Cookie=e}break}return n}function zg(n){if(n instanceof Error&&typeof n.cause=="object"&&n.cause!==null)return n.cause}function Y2(n){const t=zg(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function Z2(n){const t=zg(n);if(!(!t||!("status"in t)||t.status===void 0)&&typeof t.status=="number")return t.status}async function Bg(n,t){let e;if(t.status===429)e="Relayer rate limit exceeded: Please wait and try again later.";else switch(n){case"PUBLIC_DECRYPT":{e=`Public decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"USER_DECRYPT":{e=`User decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"KEY_URL":{e=`HTTP error! status: ${t.status}`;break}default:{const i=await t.text();e=`Relayer didn't response correctly. Bad status ${t.statusText}. Content: ${i}`;break}}const r={code:"RELAYER_FETCH_ERROR",operation:n,status:t.status,statusText:t.statusText,url:t.url};throw new Error(e,{cause:r})}function kg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't return a JSON";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't return a JSON";break}default:{e="Relayer didn't return a JSON";break}}const r={code:"RELAYER_NO_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Pg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer returned an unexpected JSON response";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer returned an unexpected JSON response";break}default:{e="Relayer returned an unexpected JSON response";break}}const r={code:"RELAYER_UNEXPECTED_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function X2(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Pulbic decrypt failed: the public decryption didn't succeed for an unknown reason";break}case"USER_DECRYPT":{e="User decrypt failed: the user decryption didn't succeed for an unknown reason";break}default:{e="Relayer didn't response correctly.";break}}const r={code:"RELAYER_INTERNAL_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Fg(n,t,e){if(!e)switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't respond";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't respond";break}default:{e="Relayer didn't response correctly. Bad JSON.";break}}const r={code:"RELAYER_UNKNOWN_ERROR",operation:n,error:t};throw new Error(e??"Relayer didn't response correctly.",{cause:r})}function Ig(n){if(!n||typeof n!="object")throw new Error("Unexpected response JSON.");if(!("response"in n&&n.response!==null&&n.response!==void 0))throw new Error("Unexpected response JSON format: missing 'response' property.")}async function e_(n,t,e,r){const i=$2({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},r?.auth);let o,a;try{o=await fetch(t,i)}catch(_){Fg(n,_)}o.ok||await Bg(n,o);let u;try{u=await o.json()}catch(_){kg(n,_)}try{Ig(u),a=u}catch(_){Pg(n,_)}return a}async function tA(n,t){let e,r;try{e=await fetch(t)}catch(o){Fg(n,o)}e.ok||await Bg(n,e);let i;try{i=await e.json()}catch(o){kg(n,o)}try{Ig(i),r=i}catch(o){Pg(n,o)}return r}const r_={},Og=async(n,t)=>{if(r_[n])return r_[n];const e=await tA("KEY_URL",`${n}/v1/keyurl`);try{let r;if(!t)r=e.response.fhe_key_info[0].fhe_public_key.urls[0],t=e.response.fhe_key_info[0].fhe_public_key.data_id;else{const v=e.response.fhe_key_info.find(F=>F.fhe_public_key.data_id===t);if(!v)throw new Error(`Could not find FHE key info with data_id ${t}`);r=v.fhe_public_key.urls[0]}const i=await fetch(r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status} on ${i.url}`);let o;typeof i.bytes=="function"?o=await i.bytes():o=new Uint8Array(await i.arrayBuffer());const a=e.response.crs[2048].urls[0],u=e.response.crs[2048].data_id,_=await fetch(a);if(!_.ok)throw new Error(`HTTP error! status: ${_.status} on ${_.url}`);let l;typeof _.bytes=="function"?l=await _.bytes():l=new Uint8Array(await _.arrayBuffer());let f;try{f=TFHE.TfheCompactPublicKey.safe_deserialize(o,Xu)}catch(v){throw new Error("Invalid public key (deserialization failed)",{cause:v})}let g;try{g=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),t_)}catch(v){throw new Error("Invalid crs (deserialization failed)",{cause:v})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:g,publicParamsId:u}}};return r_[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Tg=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Cg=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],eA=n=>{if(typeof n.network=="string")return new Am(n.network);if(n.network)return new Ni(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},rA=async(n,t)=>{if(t.chainId&&typeof t.chainId=="number")return t.chainId;if(t.chainId&&typeof t.chainId!="number")throw new Error("chainId must be a number.");{const e=(await n.getNetwork()).chainId;return Number(e)}},nA=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Og(io(n.relayerUrl));return{publicKey:t.publicKey,publicKeyId:t.publicKeyId}}else if(n.publicKey&&n.publicKey.data&&n.publicKey.id){const t=n.publicKey.data;try{return{publicKey:TFHE.TfheCompactPublicKey.safe_deserialize(t,Xu),publicKeyId:n.publicKey.id}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a public key with its public key ID.")},iA=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Og(io(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,t_),publicParamsId:n.publicParams[2048].publicParamsId}}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a valid CRS with its CRS ID.")},sA=async(n,t)=>await new nr(t.kmsContractAddress,Tg,n).getKmsSigners(),oA=async(n,t)=>{const r=await new nr(t.kmsContractAddress,Tg,n).getThreshold();return Number(r)},aA=async(n,t)=>await new nr(t.inputVerifierContractAddress,Cg,n).getCoprocessorSigners(),cA=async(n,t)=>{const r=await new nr(t.inputVerifierContractAddress,Cg,n).getThreshold();return Number(r)},Ng={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function Lg(n){let t=0;for(const e of n){if(e.length!==66)throw new Error(`Handle ${e} is not of valid length`);const r=e.slice(-4,-2).toLowerCase(),i=parseInt(r,16);if(!(i in Ng))throw new Error(`Handle ${e} is not of valid type`);if(t+=Ng[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const ca=n=>Ut(n),uA=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],Dg=10,Ug=BigInt(365);function _A(n,t){return t===0?n===BigInt(1):t===7?ca("0x"+n.toString(16).padStart(40,"0")):t===9?"0x"+n.toString(16).padStart(128,"0"):t===10?"0x"+n.toString(16).padStart(256,"0"):t===11?"0x"+n.toString(16).padStart(512,"0"):n}function fA(n,t){let e=[];for(const i of n){const o=i.slice(-4,-2).toLowerCase(),a=parseInt(o,16);e.push(a)}let r={};return n.forEach((i,o)=>r[i]=_A(t[o],e[o])),r}function lA(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Ug)throw Error(`durationDays is above max duration of ${Ug}`);const e=BigInt(Math.floor(Date.now()/1e3));if(n>e)throw Error("startTimestamp is set in the future");const r=t*BigInt(86400);if(n+r<e)throw Error("User decrypt request has expired")}const hA=(n,t,e,r,i,o,a,u)=>async(_,l,f,g,y,v,F,k,T)=>{const E="0x00";let R,B;try{R=TKMS.u8vec_to_ml_kem_pke_pk(Je(f)),B=TKMS.u8vec_to_ml_kem_pke_sk(Je(l))}catch(wt){throw new Error("Invalid public or private key",{cause:wt})}const z=g.replace(/^(0x)/,""),O=f.replace(/^(0x)/,""),C=_.map(wt=>({handle:typeof wt.handle=="string"?Hn(Je(wt.handle),!0):Hn(wt.handle,!0),contractAddress:ca(wt.contractAddress)}));Lg(C.map(wt=>wt.handle)),lA(BigInt(F),BigInt(k));const N=new nr(i,uA,a),L=C.map(async({handle:wt,contractAddress:at})=>{const ht=await N.persistAllowed(wt,v),mt=await N.persistAllowed(wt,at);if(!ht)throw new Error(`User ${v} is not authorized to user decrypt handle ${wt}!`);if(!mt)throw new Error(`dapp contract ${at} is not authorized to user decrypt handle ${wt}!`);if(v===at)throw new Error(`userAddress ${v} should not be equal to contractAddress when requesting user decryption!`)}),J=y.length;if(J===0)throw Error("contractAddresses is empty");if(J>Dg)throw Error(`contractAddresses max length of ${Dg} exceeded`);await Promise.all(L).catch(wt=>{throw wt});const nt={handleContractPairs:C,requestValidity:{startTimestamp:F.toString(),durationDays:k.toString()},contractsChainId:e.toString(),contractAddresses:y.map(wt=>ca(wt)),userAddress:ca(v),signature:z,publicKey:O,extraData:E},dt=await e_("USER_DECRYPT",`${o}/v1/user-decrypt`,nt,u??T);let D=n.map((wt,at)=>TKMS.new_server_id_addr(at+1,wt));const vt=TKMS.new_client(D,v,"default");try{const wt=new ArrayBuffer(32);new DataView(wt).setUint32(28,t,!1);const mt={name:"Decryption",version:"1",chain_id:new Uint8Array(wt),verifying_contract:r,salt:null},Rt={signature:z,client_address:v,enc_key:O,ciphertext_handles:C.map(W=>W.handle.replace(/^0x/,"")),eip712_verifying_contract:r},kt=TKMS.process_user_decryption_resp_from_js(vt,Rt,mt,dt.response,R,B,!0).map(W=>aa(W.bytes));return fA(C.map(W=>W.handle),kt)}catch(wt){throw new Error("An error occured during decryption",{cause:wt})}},Vn=(n,t)=>{if(n==null)throw new Error("Missing value");let e;if(t>=8?e=BigInt(`0x${new Array(t/8).fill(null).reduce(r=>`${r}ff`,"")}`):e=BigInt(2**t-1),typeof n!="number"&&typeof n!="bigint")throw new Error("Value must be a number or a bigint.");if(n>e)throw new Error(`The value exceeds the limit for ${t}bits integer (${e.toString()}).`)},pA=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:o})=>{if(!Ve(i))throw new Error("Contract address is not a valid address.");if(!Ve(o))throw new Error("User address is not a valid address.");const a=e,u=[],_=TFHE.CompactCiphertextList.builder(a);let l=new Uint8Array;const f=g=>{if(u.reduce((y,v)=>y+Math.max(2,v),0)+g>2048)throw Error("Packing more than 2048 bits in a single input ciphertext is unsupported");if(u.length+1>256)throw Error("Packing more than 256 variables in a single input ciphertext is unsupported")};return{addBool(g){if(g==null)throw new Error("Missing value");if(typeof g!="boolean"&&typeof g!="number"&&typeof g!="bigint")throw new Error("The value must be a boolean, a number or a bigint.");if(Number(g)>1)throw new Error("The value must be 1 or 0.");return Vn(Number(g),1),f(2),_.push_boolean(!!g),u.push(1),this},add8(g){return Vn(g,8),f(8),_.push_u8(Number(g)),u.push(8),this},add16(g){return Vn(g,16),f(16),_.push_u16(Number(g)),u.push(16),this},add32(g){return Vn(g,32),f(32),_.push_u32(Number(g)),u.push(32),this},add64(g){return Vn(g,64),f(64),_.push_u64(BigInt(g)),u.push(64),this},add128(g){return Vn(g,128),f(128),_.push_u128(BigInt(g)),u.push(128),this},addAddress(g){if(!Ve(g))throw new Error("The value must be a valid address.");return f(160),_.push_u160(BigInt(g)),u.push(160),this},add256(g){return Vn(g,256),f(256),_.push_u256(BigInt(g)),u.push(256),this},addBytes64(g){if(g.length!==64)throw Error("Uncorrect length of input Uint8Array, should be 64 for an ebytes64");const y=aa(g);return Vn(y,512),f(512),_.push_u512(y),u.push(512),this},addBytes128(g){if(g.length!==128)throw Error("Uncorrect length of input Uint8Array, should be 128 for an ebytes128");const y=aa(g);return Vn(y,1024),f(1024),_.push_u1024(y),u.push(1024),this},addBytes256(g){if(g.length!==256)throw Error("Uncorrect length of input Uint8Array, should be 256 for an ebytes256");const y=aa(g);return Vn(y,2048),f(2048),_.push_u2048(y),u.push(2048),this},getBits(){return u},encrypt(){const y=(()=>{const z=L=>Object.keys(L),O=u.reduce((L,J)=>L+J,0),C=z(r),N=C.find(L=>Number(L)>=O);if(!N)throw new Error(`Too many bits in provided values. Maximum is ${C[C.length-1]}.`);return N})(),v=r[y].publicParams,F=Je(i),k=Je(o),T=Je(n),E=Je(t.toString(16).padStart(64,"0")),R=new Uint8Array(F.length+k.length+T.length+32);return R.set(F,0),R.set(k,20),R.set(T,40),R.set(E,R.length-E.length),l=_.build_with_proof_packed(v,R,TFHE.ZkComputeLoad.Verify).safe_serialize(J2),l}}},Mg={1:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8,512:9,1024:10,2048:11},dA=BigInt("18446744073709551615"),wA="ZK-w_rct",gA="ZK-w_hdl",yA=(n,t,e,r,i)=>{const o=xd("keccak256").update(Ne.from(wA)).update(Ne.from(n)).digest(),a=Ne.from(Je(e)),u=r.toString(16).padStart(64,"0"),_=Ne.from(u,"hex");return t.map((f,g)=>{const y=Mg[f],v=Ne.from([g]),F=xd("keccak256").update(Ne.from(gA)).update(o).update(v).update(a).update(_).digest(),k=new Uint8Array(32);if(k.set(F,0),BigInt(r)>dA)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const T=Je(u).slice(24,32);return k[21]=g,k.set(T,22),k[30]=y,k[31]=i,k})},jg=n=>Ut(n),bA=()=>0;function mA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate coprocessor signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of coprocessor signers`);return t.length>=e}function AA(n){const t=n.response;return typeof t!="object"||t===null||!("handles"in t&&Array.isArray(t.handles))||!("signatures"in t&&Array.isArray(t.signatures))?!1:t.signatures.every(e=>typeof e=="string")&&t.handles.every(e=>typeof e=="string")}const EA=(n,t,e,r,i,o,a,u,_,l)=>(f,g)=>{if(!Ve(f))throw new Error("Contract address is not a valid address.");if(!Ve(g))throw new Error("User address is not a valid address.");const y=pA({aclContractAddress:n,chainId:e,tfheCompactPublicKey:o,publicParams:a,contractAddress:f,userAddress:g});return{_input:y,addBool(v){return y.addBool(v),this},add8(v){return y.add8(v),this},add16(v){return y.add16(v),this},add32(v){return y.add32(v),this},add64(v){return y.add64(v),this},add128(v){return y.add128(v),this},add256(v){return y.add256(v),this},addAddress(v){return y.addAddress(v),this},getBits(){return y.getBits()},encrypt:async v=>{const F="0x00",k=y.getBits(),T=y.encrypt(),E={contractAddress:jg(f),userAddress:jg(g),ciphertextWithInputVerification:Hn(T),contractChainId:"0x"+e.toString(16),extraData:F},R=await e_("INPUT_PROOF",`${i}/v1/input-proof`,E,v??l);AA(R)||X2("INPUT_PROOF",R);const B=yA(T,k,n,e,bA());if(R.response.handles&&R.response.handles.length>0){const D=R.response.handles.map(Je);if(B.length!=D.length)throw new Error(`Incorrect Handles list sizes: (expected) ${B.length} != ${D.length} (received)`);for(let vt=0;vt<B.length;vt+=1){let wt=B[vt],at=D[vt],ht=Hn(wt),mt=Hn(at);if(ht!==mt)throw new Error(`Incorrect Handle ${vt}: (expected) ${ht} != ${mt} (received)`)}}const z=R.response.signatures,O={name:"InputVerification",version:"1",chainId:r,verifyingContract:t},C={CiphertextVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"userAddress",type:"address"},{name:"contractAddress",type:"address"},{name:"contractChainId",type:"uint256"},{name:"extraData",type:"bytes"}]},N=z.map(D=>{const vt=D.startsWith("0x")?D:`0x${D}`;return Pl(O,C,{ctHandles:B,userAddress:g,contractAddress:f,contractChainId:e,extraData:F},vt)});if(!mA(u,N,_))throw Error("Coprocessor signers threshold is not reached");let J=Sg(B.length);const nt=z.length;return J+=Sg(nt),B.map(D=>Hn(D)).map(D=>J+=D),z.map(D=>J+=D.slice(2)),J+=F.slice(2),{handles:B,inputProof:Je(J)}}}},vA=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function xA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate KMS signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of KMS signers`);return t.length>=e}const RA={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function SA(n,t){let e=[];for(const l of n){const f=l.slice(-4,-2).toLowerCase(),g=parseInt(f,16);e.push(g)}const r="0x"+"00".repeat(32)+t.slice(2)+"00".repeat(32),i=e.map(l=>RA[l]),u=new Fi().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length);let _={};return n.forEach((l,f)=>_[l]=u[f]),_}const zA=(n,t,e,r,i,o,a,u)=>async(_,l)=>{const f="0x00",g=new nr(i,vA,a);let y;try{y=await Promise.all(_.map(async L=>{const J=Hn(typeof L=="string"?Je(L):L,!0);if(!await g.isAllowedForDecryption(J))throw new Error(`Handle ${J} is not allowed for public decryption!`);return J}))}catch(L){throw L}Lg(y);const v={ciphertextHandles:y,extraData:f},F=await e_("PUBLIC_DECRYPT",`${o}/v1/public-decrypt`,v,l??u),k={name:"Decryption",version:"1",chainId:e,verifyingContract:r},T={PublicDecryptVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"decryptedResult",type:"bytes"},{name:"extraData",type:"bytes"}]},E=F.response[0],R=E.decrypted_value.startsWith("0x")?E.decrypted_value:`0x${E.decrypted_value}`,B=E.signatures,z="0x",O=B.map(L=>{const J=L.startsWith("0x")?L:`0x${L}`;return Pl(k,T,{ctHandles:y,decryptedResult:R,extraData:z},J)});if(!xA(n,O,t))throw Error("KMS signers threshold is not reached");return SA(y,R)},Gg=(n,t)=>(e,r,i,o,a)=>{const u="0x00";if(a&&!Ve(a))throw new Error("Invalid delegated account.");if(!Ve(n))throw new Error("Invalid verifying contract address.");if(!r.every(v=>Ve(v)))throw new Error("Invalid contract address.");const _=typeof e=="string"?e.startsWith("0x")?e:`0x${e}`:e,l=typeof i=="number"?i.toString():i,f=typeof o=="number"?o.toString():o,g=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],y={name:"Decryption",version:"1",chainId:t,verifyingContract:n};return a?{types:{EIP712Domain:g,DelegatedUserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"},{name:"delegatedAccount",type:"address"}]},primaryType:"DelegatedUserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u,delegatedAccount:a}}:{types:{EIP712Domain:g,UserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"}]},primaryType:"UserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u}}},Hg=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:Hn(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:Hn(TKMS.ml_kem_pke_sk_to_u8vec(n))}};Wi.fetch=v2(Wi.fetch,{retries:5,retryDelay:500});const BA={aclContractAddress:"0x687820221192C5B662b25367F70076A37bc79b6c",kmsContractAddress:"0x1364cBBf2cDF5032C47d8226a6f6FBD2AFCDacAC",inputVerifierContractAddress:"0xbc91f3daD1A5F19F8390c400196e58073B6a0BC4",verifyingContractAddressDecryption:"0xb6E160B1ff80D67Bfe90A85eE06Ce0A2613607D1",verifyingContractAddressInputVerification:"0x7048C39f048125eDa9d678AEbaDfB22F7900a29F",chainId:11155111,gatewayChainId:55815,network:"https://eth-sepolia.public.blastapi.io",relayerUrl:"https://relayer.testnet.zama.cloud"},kA=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:o,gatewayChainId:a,auth:u}=n;if(!i||!Ve(i))throw new Error("KMS contract address is not valid or empty");if(!t||!Ve(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!Ve(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!o||!Ve(o))throw new Error("ACL contract address is not valid or empty");if(r&&!(r.data instanceof Uint8Array))throw new Error("publicKey must be a Uint8Array");const _=eA(n);if(!_)throw new Error("No network has been provided!");const l=await rA(_,n),f=await nA(n),g=await iA(n),y=await sA(_,n),v=await oA(_,n),F=await aA(_,n),k=await cA(_,n);return{createEncryptedInput:EA(o,e,l,a,io(n.relayerUrl),f.publicKey,g,F,k),generateKeypair:Hg,createEIP712:Gg(t,l),publicDecrypt:zA(y,v,a,t,o,io(n.relayerUrl),_,u&&{auth:u}),userDecrypt:hA(y,a,l,t,o,io(n.relayerUrl),_,u&&{auth:u}),getPublicKey:()=>f.publicKey?{publicKey:f.publicKey.safe_serialize(Xu),publicKeyId:f.publicKeyId}:null,getPublicParams:T=>g[T]?{publicParams:g[T].publicParams.safe_serialize(t_),publicParamsId:g[T].publicParamsId}:null}};let Vg=!1;const PA=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await x2()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
20
+ `)+" "+nt[1]:nt[0]+Z+" "+W.join(", ")+" "+nt[1]}n.types=_2();function T(W){return Array.isArray(W)}n.isArray=T;function E(W){return typeof W=="boolean"}n.isBoolean=E;function R(W){return W===null}n.isNull=R;function B(W){return W==null}n.isNullOrUndefined=B;function z(W){return typeof W=="number"}n.isNumber=z;function O(W){return typeof W=="string"}n.isString=O;function C(W){return typeof W=="symbol"}n.isSymbol=C;function N(W){return W===void 0}n.isUndefined=N;function D(W){return $(W)&&wt(W)==="[object RegExp]"}n.isRegExp=D,n.types.isRegExp=D;function $(W){return typeof W=="object"&&W!==null}n.isObject=$;function et(W){return $(W)&&wt(W)==="[object Date]"}n.isDate=et,n.types.isDate=et;function ft(W){return $(W)&&(wt(W)==="[object Error]"||W instanceof Error)}n.isError=ft,n.types.isNativeError=ft;function L(W){return typeof W=="function"}n.isFunction=L;function vt(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W>"u"}n.isPrimitive=vt,n.isBuffer=f2();function wt(W){return Object.prototype.toString.call(W)}function at(W){return W<10?"0"+W.toString(10):W.toString(10)}var pt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mt(){var W=new Date,Z=[at(W.getHours()),at(W.getMinutes()),at(W.getSeconds())].join(":");return[W.getDate(),pt[W.getMonth()],Z].join(" ")}n.log=function(){console.log("%s - %s",mt(),n.format.apply(n,arguments))},n.inherits=ds(),n._extend=function(W,Z){if(!Z||!$(Z))return W;for(var nt=Object.keys(Z),yt=nt.length;yt--;)W[nt[yt]]=Z[nt[yt]];return W};function Rt(W,Z){return Object.prototype.hasOwnProperty.call(W,Z)}var xt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(xt&&Z[xt]){var nt=Z[xt];if(typeof nt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(nt,xt,{value:nt,enumerable:!1,writable:!1,configurable:!0}),nt}function nt(){for(var yt,H,M=new Promise(function(_t,x){yt=_t,H=x}),X=[],ct=0;ct<arguments.length;ct++)X.push(arguments[ct]);X.push(function(_t,x){_t?H(_t):yt(x)});try{Z.apply(this,X)}catch(_t){H(_t)}return M}return Object.setPrototypeOf(nt,Object.getPrototypeOf(Z)),xt&&Object.defineProperty(nt,xt,{value:nt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(nt,t(Z))},n.promisify.custom=xt;function Pt(W,Z){if(!W){var nt=new Error("Promise was rejected with a falsy value");nt.reason=W,W=nt}return Z(W)}function jt(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');function Z(){for(var nt=[],yt=0;yt<arguments.length;yt++)nt.push(arguments[yt]);var H=nt.pop();if(typeof H!="function")throw new TypeError("The last argument must be of type Function");var M=this,X=function(){return H.apply(M,arguments)};W.apply(this,nt).then(function(ct){Ct.nextTick(X.bind(null,null,ct))},function(ct){Ct.nextTick(Pt.bind(null,ct,X))})}return Object.setPrototypeOf(Z,Object.getPrototypeOf(W)),Object.defineProperties(Z,t(W)),Z}n.callbackify=jt}(Ac)),Ac}var vu,Zp;function l2(){if(Zp)return vu;Zp=1;function n(I,k){var T=Object.keys(I);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(I);k&&(E=E.filter(function(R){return Object.getOwnPropertyDescriptor(I,R).enumerable})),T.push.apply(T,E)}return T}function t(I){for(var k=1;k<arguments.length;k++){var T=arguments[k]!=null?arguments[k]:{};k%2?n(Object(T),!0).forEach(function(E){e(I,E,T[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(T)):n(Object(T)).forEach(function(E){Object.defineProperty(I,E,Object.getOwnPropertyDescriptor(T,E))})}return I}function e(I,k,T){return k=a(k),k in I?Object.defineProperty(I,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):I[k]=T,I}function r(I,k){if(!(I instanceof k))throw new TypeError("Cannot call a class as a function")}function i(I,k){for(var T=0;T<k.length;T++){var E=k[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,a(E.key),E)}}function o(I,k,T){return k&&i(I.prototype,k),Object.defineProperty(I,"prototype",{writable:!1}),I}function a(I){var k=u(I,"string");return typeof k=="symbol"?k:String(k)}function u(I,k){if(typeof I!="object"||I===null)return I;var T=I[Symbol.toPrimitive];if(T!==void 0){var E=T.call(I,k);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(I)}var _=Wo(),l=_.Buffer,f=Yp(),g=f.inspect,y=g&&g.custom||"inspect";function v(I,k,T){l.prototype.copy.call(I,k,T)}return vu=function(){function I(){r(this,I),this.head=null,this.tail=null,this.length=0}return o(I,[{key:"push",value:function(T){var E={data:T,next:null};this.length>0?this.tail.next=E:this.head=E,this.tail=E,++this.length}},{key:"unshift",value:function(T){var E={data:T,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var E=this.head,R=""+E.data;E=E.next;)R+=T+E.data;return R}},{key:"concat",value:function(T){if(this.length===0)return l.alloc(0);for(var E=l.allocUnsafe(T>>>0),R=this.head,B=0;R;)v(R.data,E,B),B+=R.data.length,R=R.next;return E}},{key:"consume",value:function(T,E){var R;return T<this.head.data.length?(R=this.head.data.slice(0,T),this.head.data=this.head.data.slice(T)):T===this.head.data.length?R=this.shift():R=E?this._getString(T):this._getBuffer(T),R}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(T){var E=this.head,R=1,B=E.data;for(T-=B.length;E=E.next;){var z=E.data,O=T>z.length?z.length:T;if(O===z.length?B+=z:B+=z.slice(0,T),T-=O,T===0){O===z.length?(++R,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=z.slice(O));break}++R}return this.length-=R,B}},{key:"_getBuffer",value:function(T){var E=l.allocUnsafe(T),R=this.head,B=1;for(R.data.copy(E),T-=R.data.length;R=R.next;){var z=R.data,O=T>z.length?z.length:T;if(z.copy(E,E.length-T,0,O),T-=O,T===0){O===z.length?(++B,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=z.slice(O));break}++B}return this.length-=B,E}},{key:y,value:function(T,E){return g(this,t(t({},E),{},{depth:0,customInspect:!1}))}}]),I}(),vu}var xu,Xp;function td(){if(Xp)return xu;Xp=1;function n(a,u){var _=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(u?u(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ct.nextTick(i,this,a)):Ct.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(g){!u&&g?_._writableState?_._writableState.errorEmitted?Ct.nextTick(e,_):(_._writableState.errorEmitted=!0,Ct.nextTick(t,_,g)):Ct.nextTick(t,_,g):u?(Ct.nextTick(e,_),u(g)):Ct.nextTick(e,_)}),this)}function t(a,u){i(a,u),e(a)}function e(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,u){a.emit("error",u)}function o(a,u){var _=a._readableState,l=a._writableState;_&&_.autoDestroy||l&&l.autoDestroy?a.destroy(u):a.emit("error",u)}return xu={destroy:n,undestroy:r,errorOrDestroy:o},xu}var Ru={},ed;function ws(){if(ed)return Ru;ed=1;function n(u,_){u.prototype=Object.create(_.prototype),u.prototype.constructor=u,u.__proto__=_}var t={};function e(u,_,l){l||(l=Error);function f(y,v,I){return typeof _=="string"?_:_(y,v,I)}var g=function(y){n(v,y);function v(I,k,T){return y.call(this,f(I,k,T))||this}return v}(l);g.prototype.name=l.name,g.prototype.code=u,t[u]=g}function r(u,_){if(Array.isArray(u)){var l=u.length;return u=u.map(function(f){return String(f)}),l>2?"one of ".concat(_," ").concat(u.slice(0,l-1).join(", "),", or ")+u[l-1]:l===2?"one of ".concat(_," ").concat(u[0]," or ").concat(u[1]):"of ".concat(_," ").concat(u[0])}else return"of ".concat(_," ").concat(String(u))}function i(u,_,l){return u.substr(0,_.length)===_}function o(u,_,l){return(l===void 0||l>u.length)&&(l=u.length),u.substring(l-_.length,l)===_}function a(u,_,l){return typeof l!="number"&&(l=0),l+_.length>u.length?!1:u.indexOf(_,l)!==-1}return e("ERR_INVALID_OPT_VALUE",function(u,_){return'The value "'+_+'" is invalid for option "'+u+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(u,_,l){var f;typeof _=="string"&&i(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var g;if(o(u," argument"))g="The ".concat(u," ").concat(f," ").concat(r(_,"type"));else{var y=a(u,".")?"property":"argument";g='The "'.concat(u,'" ').concat(y," ").concat(f," ").concat(r(_,"type"))}return g+=". Received type ".concat(typeof l),g},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ru.codes=t,Ru}var Su,rd;function nd(){if(rd)return Su;rd=1;var n=ws().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function e(r,i,o,a){var u=t(i,a,o);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var _=a?o:"highWaterMark";throw new n(_,u)}return Math.floor(u)}return r.objectMode?16:16*1024}return Su={getHighWaterMark:e},Su}var zu,id;function h2(){if(id)return zu;id=1,zu=n;function n(e,r){if(t("noDeprecation"))return e;var i=!1;function o(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return e.apply(this,arguments)}return o}function t(e){try{if(!pi.localStorage)return!1}catch{return!1}var r=pi.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}return zu}var Bu,sd;function od(){if(sd)return Bu;sd=1,Bu=D;function n(H){var M=this;this.next=null,this.entry=null,this.finish=function(){yt(M,H)}}var t;D.WritableState=C;var e={deprecate:h2()},r=Mh(),i=Wo().Buffer,o=(typeof pi<"u"?pi:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(H){return i.from(H)}function u(H){return i.isBuffer(H)||H instanceof o}var _=td(),l=nd(),f=l.getHighWaterMark,g=ws().codes,y=g.ERR_INVALID_ARG_TYPE,v=g.ERR_METHOD_NOT_IMPLEMENTED,I=g.ERR_MULTIPLE_CALLBACK,k=g.ERR_STREAM_CANNOT_PIPE,T=g.ERR_STREAM_DESTROYED,E=g.ERR_STREAM_NULL_VALUES,R=g.ERR_STREAM_WRITE_AFTER_END,B=g.ERR_UNKNOWN_ENCODING,z=_.errorOrDestroy;ds()(D,r);function O(){}function C(H,M,X){t=t||gs(),H=H||{},typeof X!="boolean"&&(X=M instanceof t),this.objectMode=!!H.objectMode,X&&(this.objectMode=this.objectMode||!!H.writableObjectMode),this.highWaterMark=f(this,H,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ct=H.decodeStrings===!1;this.decodeStrings=!ct,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(_t){pt(M,_t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var M=this.bufferedRequest,X=[];M;)X.push(M),M=M.next;return X},function(){try{Object.defineProperty(C.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var N;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(N=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(M){return N.call(this,M)?!0:this!==D?!1:M&&M._writableState instanceof C}})):N=function(M){return M instanceof this};function D(H){t=t||gs();var M=this instanceof t;if(!M&&!N.call(D,this))return new D(H);this._writableState=new C(H,this,M),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),r.call(this)}D.prototype.pipe=function(){z(this,new k)};function $(H,M){var X=new R;z(H,X),Ct.nextTick(M,X)}function et(H,M,X,ct){var _t;return X===null?_t=new E:typeof X!="string"&&!M.objectMode&&(_t=new y("chunk",["string","Buffer"],X)),_t?(z(H,_t),Ct.nextTick(ct,_t),!1):!0}D.prototype.write=function(H,M,X){var ct=this._writableState,_t=!1,x=!ct.objectMode&&u(H);return x&&!i.isBuffer(H)&&(H=a(H)),typeof M=="function"&&(X=M,M=null),x?M="buffer":M||(M=ct.defaultEncoding),typeof X!="function"&&(X=O),ct.ending?$(this,X):(x||et(this,ct,H,X))&&(ct.pendingcb++,_t=L(this,ct,x,H,M,X)),_t},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,!H.writing&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&xt(this,H))},D.prototype.setDefaultEncoding=function(M){if(typeof M=="string"&&(M=M.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((M+"").toLowerCase())>-1))throw new B(M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ft(H,M,X){return!H.objectMode&&H.decodeStrings!==!1&&typeof M=="string"&&(M=i.from(M,X)),M}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(H,M,X,ct,_t,x){if(!X){var S=ft(M,ct,_t);ct!==S&&(X=!0,_t="buffer",ct=S)}var rt=M.objectMode?1:ct.length;M.length+=rt;var lt=M.length<M.highWaterMark;if(lt||(M.needDrain=!0),M.writing||M.corked){var Bt=M.lastBufferedRequest;M.lastBufferedRequest={chunk:ct,encoding:_t,isBuf:X,callback:x,next:null},Bt?Bt.next=M.lastBufferedRequest:M.bufferedRequest=M.lastBufferedRequest,M.bufferedRequestCount+=1}else vt(H,M,!1,rt,ct,_t,x);return lt}function vt(H,M,X,ct,_t,x,S){M.writelen=ct,M.writecb=S,M.writing=!0,M.sync=!0,M.destroyed?M.onwrite(new T("write")):X?H._writev(_t,M.onwrite):H._write(_t,x,M.onwrite),M.sync=!1}function wt(H,M,X,ct,_t){--M.pendingcb,X?(Ct.nextTick(_t,ct),Ct.nextTick(Z,H,M),H._writableState.errorEmitted=!0,z(H,ct)):(_t(ct),H._writableState.errorEmitted=!0,z(H,ct),Z(H,M))}function at(H){H.writing=!1,H.writecb=null,H.length-=H.writelen,H.writelen=0}function pt(H,M){var X=H._writableState,ct=X.sync,_t=X.writecb;if(typeof _t!="function")throw new I;if(at(X),M)wt(H,X,ct,M,_t);else{var x=Pt(X)||H.destroyed;!x&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest&&xt(H,X),ct?Ct.nextTick(mt,H,X,x,_t):mt(H,X,x,_t)}}function mt(H,M,X,ct){X||Rt(H,M),M.pendingcb--,ct(),Z(H,M)}function Rt(H,M){M.length===0&&M.needDrain&&(M.needDrain=!1,H.emit("drain"))}function xt(H,M){M.bufferProcessing=!0;var X=M.bufferedRequest;if(H._writev&&X&&X.next){var ct=M.bufferedRequestCount,_t=new Array(ct),x=M.corkedRequestsFree;x.entry=X;for(var S=0,rt=!0;X;)_t[S]=X,X.isBuf||(rt=!1),X=X.next,S+=1;_t.allBuffers=rt,vt(H,M,!0,M.length,_t,"",x.finish),M.pendingcb++,M.lastBufferedRequest=null,x.next?(M.corkedRequestsFree=x.next,x.next=null):M.corkedRequestsFree=new n(M),M.bufferedRequestCount=0}else{for(;X;){var lt=X.chunk,Bt=X.encoding,bt=X.callback,kt=M.objectMode?1:lt.length;if(vt(H,M,!1,kt,lt,Bt,bt),X=X.next,M.bufferedRequestCount--,M.writing)break}X===null&&(M.lastBufferedRequest=null)}M.bufferedRequest=X,M.bufferProcessing=!1}D.prototype._write=function(H,M,X){X(new v("_write()"))},D.prototype._writev=null,D.prototype.end=function(H,M,X){var ct=this._writableState;return typeof H=="function"?(X=H,H=null,M=null):typeof M=="function"&&(X=M,M=null),H!=null&&this.write(H,M),ct.corked&&(ct.corked=1,this.uncork()),ct.ending||nt(this,ct,X),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Pt(H){return H.ending&&H.length===0&&H.bufferedRequest===null&&!H.finished&&!H.writing}function jt(H,M){H._final(function(X){M.pendingcb--,X&&z(H,X),M.prefinished=!0,H.emit("prefinish"),Z(H,M)})}function W(H,M){!M.prefinished&&!M.finalCalled&&(typeof H._final=="function"&&!M.destroyed?(M.pendingcb++,M.finalCalled=!0,Ct.nextTick(jt,H,M)):(M.prefinished=!0,H.emit("prefinish")))}function Z(H,M){var X=Pt(M);if(X&&(W(H,M),M.pendingcb===0&&(M.finished=!0,H.emit("finish"),M.autoDestroy))){var ct=H._readableState;(!ct||ct.autoDestroy&&ct.endEmitted)&&H.destroy()}return X}function nt(H,M,X){M.ending=!0,Z(H,M),X&&(M.finished?Ct.nextTick(X):H.once("finish",X)),M.ended=!0,H.writable=!1}function yt(H,M,X){var ct=H.entry;for(H.entry=null;ct;){var _t=ct.callback;M.pendingcb--,_t(X),ct=ct.next}M.corkedRequestsFree.next=H}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),D.prototype.destroy=_.destroy,D.prototype._undestroy=_.undestroy,D.prototype._destroy=function(H,M){M(H)},Bu}var ku,ad;function gs(){if(ad)return ku;ad=1;var n=Object.keys||function(l){var f=[];for(var g in l)f.push(g);return f};ku=a;var t=dd(),e=od();ds()(a,t);for(var r=n(e.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=e.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),e.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function u(){this._writableState.ended||Ct.nextTick(_,this)}function _(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),ku}var Pu={},Zo={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var cd;function p2(){return cd||(cd=1,function(n,t){var e=Wo(),r=e.Buffer;function i(a,u){for(var _ in a)u[_]=a[_]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=e:(i(e,t),t.Buffer=o);function o(a,u,_){return r(a,u,_)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(a,u,_){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,u,_)},o.alloc=function(a,u,_){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return u!==void 0?typeof _=="string"?l.fill(u,_):l.fill(u):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(a)}}(Zo,Zo.exports)),Zo.exports}var ud;function _d(){if(ud)return Pu;ud=1;var n=p2().Buffer,t=n.isEncoding||function(E){switch(E=""+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 e(E){if(!E)return"utf8";for(var R;;)switch(E){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return E;default:if(R)return;E=(""+E).toLowerCase(),R=!0}}function r(E){var R=e(E);if(typeof R!="string"&&(n.isEncoding===t||!t(E)))throw new Error("Unknown encoding: "+E);return R||E}Pu.StringDecoder=i;function i(E){this.encoding=r(E);var R;switch(this.encoding){case"utf16le":this.text=g,this.end=y,R=4;break;case"utf8":this.fillLast=_,R=4;break;case"base64":this.text=v,this.end=I,R=3;break;default:this.write=k,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(R)}i.prototype.write=function(E){if(E.length===0)return"";var R,B;if(this.lastNeed){if(R=this.fillLast(E),R===void 0)return"";B=this.lastNeed,this.lastNeed=0}else B=0;return B<E.length?R?R+this.text(E,B):this.text(E,B):R||""},i.prototype.end=f,i.prototype.text=l,i.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length};function o(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function a(E,R,B){var z=R.length-1;if(z<B)return 0;var O=o(R[z]);return O>=0?(O>0&&(E.lastNeed=O-1),O):--z<B||O===-2?0:(O=o(R[z]),O>=0?(O>0&&(E.lastNeed=O-2),O):--z<B||O===-2?0:(O=o(R[z]),O>=0?(O>0&&(O===2?O=0:E.lastNeed=O-3),O):0))}function u(E,R,B){if((R[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&R.length>1){if((R[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&R.length>2&&(R[2]&192)!==128)return E.lastNeed=2,"�"}}function _(E){var R=this.lastTotal-this.lastNeed,B=u(this,E);if(B!==void 0)return B;if(this.lastNeed<=E.length)return E.copy(this.lastChar,R,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,R,0,E.length),this.lastNeed-=E.length}function l(E,R){var B=a(this,E,R);if(!this.lastNeed)return E.toString("utf8",R);this.lastTotal=B;var z=E.length-(B-this.lastNeed);return E.copy(this.lastChar,0,z),E.toString("utf8",R,z)}function f(E){var R=E&&E.length?this.write(E):"";return this.lastNeed?R+"�":R}function g(E,R){if((E.length-R)%2===0){var B=E.toString("utf16le",R);if(B){var z=B.charCodeAt(B.length-1);if(z>=55296&&z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],B.slice(0,-1)}return B}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",R,E.length-1)}function y(E){var R=E&&E.length?this.write(E):"";if(this.lastNeed){var B=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,B)}return R}function v(E,R){var B=(E.length-R)%3;return B===0?E.toString("base64",R):(this.lastNeed=3-B,this.lastTotal=3,B===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",R,E.length-B))}function I(E){var R=E&&E.length?this.write(E):"";return this.lastNeed?R+this.lastChar.toString("base64",0,3-this.lastNeed):R}function k(E){return E.toString(this.encoding)}function T(E){return E&&E.length?this.write(E):""}return Pu}var Iu,fd;function Fu(){if(fd)return Iu;fd=1;var n=ws().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var u=arguments.length,_=new Array(u),l=0;l<u;l++)_[l]=arguments[l];o.apply(this,_)}}}function e(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,u){if(typeof a=="function")return i(o,null,a);a||(a={}),u=t(u||e);var _=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,f=function(){o.writable||y()},g=o._writableState&&o._writableState.finished,y=function(){l=!1,g=!0,_||u.call(o)},v=o._readableState&&o._readableState.endEmitted,I=function(){_=!1,v=!0,l||u.call(o)},k=function(B){u.call(o,B)},T=function(){var B;if(_&&!v)return(!o._readableState||!o._readableState.ended)&&(B=new n),u.call(o,B);if(l&&!g)return(!o._writableState||!o._writableState.ended)&&(B=new n),u.call(o,B)},E=function(){o.req.on("finish",y)};return r(o)?(o.on("complete",y),o.on("abort",T),o.req?E():o.on("request",E)):l&&!o._writableState&&(o.on("end",f),o.on("close",f)),o.on("end",I),o.on("finish",y),a.error!==!1&&o.on("error",k),o.on("close",T),function(){o.removeListener("complete",y),o.removeListener("abort",T),o.removeListener("request",E),o.req&&o.req.removeListener("finish",y),o.removeListener("end",f),o.removeListener("close",f),o.removeListener("finish",y),o.removeListener("end",I),o.removeListener("error",k),o.removeListener("close",T)}}return Iu=i,Iu}var Ou,ld;function d2(){if(ld)return Ou;ld=1;var n;function t(B,z,O){return z=e(z),z in B?Object.defineProperty(B,z,{value:O,enumerable:!0,configurable:!0,writable:!0}):B[z]=O,B}function e(B){var z=r(B,"string");return typeof z=="symbol"?z:String(z)}function r(B,z){if(typeof B!="object"||B===null)return B;var O=B[Symbol.toPrimitive];if(O!==void 0){var C=O.call(B,z);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(z==="string"?String:Number)(B)}var i=Fu(),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),_=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),g=Symbol("stream");function y(B,z){return{value:B,done:z}}function v(B){var z=B[o];if(z!==null){var O=B[g].read();O!==null&&(B[l]=null,B[o]=null,B[a]=null,z(y(O,!1)))}}function I(B){Ct.nextTick(v,B)}function k(B,z){return function(O,C){B.then(function(){if(z[_]){O(y(void 0,!0));return}z[f](O,C)},C)}}var T=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((n={get stream(){return this[g]},next:function(){var z=this,O=this[u];if(O!==null)return Promise.reject(O);if(this[_])return Promise.resolve(y(void 0,!0));if(this[g].destroyed)return new Promise(function($,et){Ct.nextTick(function(){z[u]?et(z[u]):$(y(void 0,!0))})});var C=this[l],N;if(C)N=new Promise(k(C,this));else{var D=this[g].read();if(D!==null)return Promise.resolve(y(D,!1));N=new Promise(this[f])}return this[l]=N,N}},t(n,Symbol.asyncIterator,function(){return this}),t(n,"return",function(){var z=this;return new Promise(function(O,C){z[g].destroy(null,function(N){if(N){C(N);return}O(y(void 0,!0))})})}),n),T),R=function(z){var O,C=Object.create(E,(O={},t(O,g,{value:z,writable:!0}),t(O,o,{value:null,writable:!0}),t(O,a,{value:null,writable:!0}),t(O,u,{value:null,writable:!0}),t(O,_,{value:z._readableState.endEmitted,writable:!0}),t(O,f,{value:function(D,$){var et=C[g].read();et?(C[l]=null,C[o]=null,C[a]=null,D(y(et,!1))):(C[o]=D,C[a]=$)},writable:!0}),O));return C[l]=null,i(z,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=C[a];D!==null&&(C[l]=null,C[o]=null,C[a]=null,D(N)),C[u]=N;return}var $=C[o];$!==null&&(C[l]=null,C[o]=null,C[a]=null,$(y(void 0,!0))),C[_]=!0}),z.on("readable",I.bind(null,C)),C};return Ou=R,Ou}var Tu,hd;function w2(){return hd||(hd=1,Tu=function(){throw new Error("Readable.from is not available in the browser")}),Tu}var Cu,pd;function dd(){if(pd)return Cu;pd=1,Cu=$;var n;$.ReadableState=D,Dh().EventEmitter;var t=function(S,rt){return S.listeners(rt).length},e=Mh(),r=Wo().Buffer,i=(typeof pi<"u"?pi:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(x){return r.from(x)}function a(x){return r.isBuffer(x)||x instanceof i}var u=Yp(),_;u&&u.debuglog?_=u.debuglog("stream"):_=function(){};var l=l2(),f=td(),g=nd(),y=g.getHighWaterMark,v=ws().codes,I=v.ERR_INVALID_ARG_TYPE,k=v.ERR_STREAM_PUSH_AFTER_EOF,T=v.ERR_METHOD_NOT_IMPLEMENTED,E=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,R,B,z;ds()($,e);var O=f.errorOrDestroy,C=["error","close","destroy","pause","resume"];function N(x,S,rt){if(typeof x.prependListener=="function")return x.prependListener(S,rt);!x._events||!x._events[S]?x.on(S,rt):Array.isArray(x._events[S])?x._events[S].unshift(rt):x._events[S]=[rt,x._events[S]]}function D(x,S,rt){n=n||gs(),x=x||{},typeof rt!="boolean"&&(rt=S instanceof n),this.objectMode=!!x.objectMode,rt&&(this.objectMode=this.objectMode||!!x.readableObjectMode),this.highWaterMark=y(this,x,"readableHighWaterMark",rt),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(R||(R=_d().StringDecoder),this.decoder=new R(x.encoding),this.encoding=x.encoding)}function $(x){if(n=n||gs(),!(this instanceof $))return new $(x);var S=this instanceof n;this._readableState=new D(x,this,S),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),e.call(this)}Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(S){this._readableState&&(this._readableState.destroyed=S)}}),$.prototype.destroy=f.destroy,$.prototype._undestroy=f.undestroy,$.prototype._destroy=function(x,S){S(x)},$.prototype.push=function(x,S){var rt=this._readableState,lt;return rt.objectMode?lt=!0:typeof x=="string"&&(S=S||rt.defaultEncoding,S!==rt.encoding&&(x=r.from(x,S),S=""),lt=!0),et(this,x,S,!1,lt)},$.prototype.unshift=function(x){return et(this,x,null,!0,!1)};function et(x,S,rt,lt,Bt){_("readableAddChunk",S);var bt=x._readableState;if(S===null)bt.reading=!1,pt(x,bt);else{var kt;if(Bt||(kt=L(bt,S)),kt)O(x,kt);else if(bt.objectMode||S&&S.length>0)if(typeof S!="string"&&!bt.objectMode&&Object.getPrototypeOf(S)!==r.prototype&&(S=o(S)),lt)bt.endEmitted?O(x,new E):ft(x,bt,S,!0);else if(bt.ended)O(x,new k);else{if(bt.destroyed)return!1;bt.reading=!1,bt.decoder&&!rt?(S=bt.decoder.write(S),bt.objectMode||S.length!==0?ft(x,bt,S,!1):xt(x,bt)):ft(x,bt,S,!1)}else lt||(bt.reading=!1,xt(x,bt))}return!bt.ended&&(bt.length<bt.highWaterMark||bt.length===0)}function ft(x,S,rt,lt){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,x.emit("data",rt)):(S.length+=S.objectMode?1:rt.length,lt?S.buffer.unshift(rt):S.buffer.push(rt),S.needReadable&&mt(x)),xt(x,S)}function L(x,S){var rt;return!a(S)&&typeof S!="string"&&S!==void 0&&!x.objectMode&&(rt=new I("chunk",["string","Buffer","Uint8Array"],S)),rt}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(x){R||(R=_d().StringDecoder);var S=new R(x);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var rt=this._readableState.buffer.head,lt="";rt!==null;)lt+=S.write(rt.data),rt=rt.next;return this._readableState.buffer.clear(),lt!==""&&this._readableState.buffer.push(lt),this._readableState.length=lt.length,this};var vt=1073741824;function wt(x){return x>=vt?x=vt:(x--,x|=x>>>1,x|=x>>>2,x|=x>>>4,x|=x>>>8,x|=x>>>16,x++),x}function at(x,S){return x<=0||S.length===0&&S.ended?0:S.objectMode?1:x!==x?S.flowing&&S.length?S.buffer.head.data.length:S.length:(x>S.highWaterMark&&(S.highWaterMark=wt(x)),x<=S.length?x:S.ended?S.length:(S.needReadable=!0,0))}$.prototype.read=function(x){_("read",x),x=parseInt(x,10);var S=this._readableState,rt=x;if(x!==0&&(S.emittedReadable=!1),x===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return _("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?X(this):mt(this),null;if(x=at(x,S),x===0&&S.ended)return S.length===0&&X(this),null;var lt=S.needReadable;_("need readable",lt),(S.length===0||S.length-x<S.highWaterMark)&&(lt=!0,_("length less than watermark",lt)),S.ended||S.reading?(lt=!1,_("reading or ended",lt)):lt&&(_("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||(x=at(rt,S)));var Bt;return x>0?Bt=M(x,S):Bt=null,Bt===null?(S.needReadable=S.length<=S.highWaterMark,x=0):(S.length-=x,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),rt!==x&&S.ended&&X(this)),Bt!==null&&this.emit("data",Bt),Bt};function pt(x,S){if(_("onEofChunk"),!S.ended){if(S.decoder){var rt=S.decoder.end();rt&&rt.length&&(S.buffer.push(rt),S.length+=S.objectMode?1:rt.length)}S.ended=!0,S.sync?mt(x):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,Rt(x)))}}function mt(x){var S=x._readableState;_("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(_("emitReadable",S.flowing),S.emittedReadable=!0,Ct.nextTick(Rt,x))}function Rt(x){var S=x._readableState;_("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(x.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,H(x)}function xt(x,S){S.readingMore||(S.readingMore=!0,Ct.nextTick(Pt,x,S))}function Pt(x,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var rt=S.length;if(_("maybeReadMore read 0"),x.read(0),rt===S.length)break}S.readingMore=!1}$.prototype._read=function(x){O(this,new T("_read()"))},$.prototype.pipe=function(x,S){var rt=this,lt=this._readableState;switch(lt.pipesCount){case 0:lt.pipes=x;break;case 1:lt.pipes=[lt.pipes,x];break;default:lt.pipes.push(x);break}lt.pipesCount+=1,_("pipe count=%d opts=%j",lt.pipesCount,S);var Bt=(!S||S.end!==!1)&&x!==Ct.stdout&&x!==Ct.stderr,bt=Bt?pe:ze;lt.endEmitted?Ct.nextTick(bt):rt.once("end",bt),x.on("unpipe",kt);function kt(Fe,_e){_("onunpipe"),Fe===rt&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,we())}function pe(){_("onend"),x.end()}var it=jt(rt);x.on("drain",it);var de=!1;function we(){_("cleanup"),x.removeListener("close",ge),x.removeListener("finish",he),x.removeListener("drain",it),x.removeListener("error",Qt),x.removeListener("unpipe",kt),rt.removeListener("end",pe),rt.removeListener("end",ze),rt.removeListener("data",Gt),de=!0,lt.awaitDrain&&(!x._writableState||x._writableState.needDrain)&&it()}rt.on("data",Gt);function Gt(Fe){_("ondata");var _e=x.write(Fe);_("dest.write",_e),_e===!1&&((lt.pipesCount===1&&lt.pipes===x||lt.pipesCount>1&&_t(lt.pipes,x)!==-1)&&!de&&(_("false write response, pause",lt.awaitDrain),lt.awaitDrain++),rt.pause())}function Qt(Fe){_("onerror",Fe),ze(),x.removeListener("error",Qt),t(x,"error")===0&&O(x,Fe)}N(x,"error",Qt);function ge(){x.removeListener("finish",he),ze()}x.once("close",ge);function he(){_("onfinish"),x.removeListener("close",ge),ze()}x.once("finish",he);function ze(){_("unpipe"),rt.unpipe(x)}return x.emit("pipe",rt),lt.flowing||(_("pipe resume"),rt.resume()),x};function jt(x){return function(){var rt=x._readableState;_("pipeOnDrain",rt.awaitDrain),rt.awaitDrain&&rt.awaitDrain--,rt.awaitDrain===0&&t(x,"data")&&(rt.flowing=!0,H(x))}}$.prototype.unpipe=function(x){var S=this._readableState,rt={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return x&&x!==S.pipes?this:(x||(x=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,x&&x.emit("unpipe",this,rt),this);if(!x){var lt=S.pipes,Bt=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var bt=0;bt<Bt;bt++)lt[bt].emit("unpipe",this,{hasUnpiped:!1});return this}var kt=_t(S.pipes,x);return kt===-1?this:(S.pipes.splice(kt,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),x.emit("unpipe",this,rt),this)},$.prototype.on=function(x,S){var rt=e.prototype.on.call(this,x,S),lt=this._readableState;return x==="data"?(lt.readableListening=this.listenerCount("readable")>0,lt.flowing!==!1&&this.resume()):x==="readable"&&!lt.endEmitted&&!lt.readableListening&&(lt.readableListening=lt.needReadable=!0,lt.flowing=!1,lt.emittedReadable=!1,_("on readable",lt.length,lt.reading),lt.length?mt(this):lt.reading||Ct.nextTick(Z,this)),rt},$.prototype.addListener=$.prototype.on,$.prototype.removeListener=function(x,S){var rt=e.prototype.removeListener.call(this,x,S);return x==="readable"&&Ct.nextTick(W,this),rt},$.prototype.removeAllListeners=function(x){var S=e.prototype.removeAllListeners.apply(this,arguments);return(x==="readable"||x===void 0)&&Ct.nextTick(W,this),S};function W(x){var S=x._readableState;S.readableListening=x.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:x.listenerCount("data")>0&&x.resume()}function Z(x){_("readable nexttick read 0"),x.read(0)}$.prototype.resume=function(){var x=this._readableState;return x.flowing||(_("resume"),x.flowing=!x.readableListening,nt(this,x)),x.paused=!1,this};function nt(x,S){S.resumeScheduled||(S.resumeScheduled=!0,Ct.nextTick(yt,x,S))}function yt(x,S){_("resume",S.reading),S.reading||x.read(0),S.resumeScheduled=!1,x.emit("resume"),H(x),S.flowing&&!S.reading&&x.read(0)}$.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function H(x){var S=x._readableState;for(_("flow",S.flowing);S.flowing&&x.read()!==null;);}$.prototype.wrap=function(x){var S=this,rt=this._readableState,lt=!1;x.on("end",function(){if(_("wrapped end"),rt.decoder&&!rt.ended){var kt=rt.decoder.end();kt&&kt.length&&S.push(kt)}S.push(null)}),x.on("data",function(kt){if(_("wrapped data"),rt.decoder&&(kt=rt.decoder.write(kt)),!(rt.objectMode&&kt==null)&&!(!rt.objectMode&&(!kt||!kt.length))){var pe=S.push(kt);pe||(lt=!0,x.pause())}});for(var Bt in x)this[Bt]===void 0&&typeof x[Bt]=="function"&&(this[Bt]=function(pe){return function(){return x[pe].apply(x,arguments)}}(Bt));for(var bt=0;bt<C.length;bt++)x.on(C[bt],this.emit.bind(this,C[bt]));return this._read=function(kt){_("wrapped _read",kt),lt&&(lt=!1,x.resume())},this},typeof Symbol=="function"&&($.prototype[Symbol.asyncIterator]=function(){return B===void 0&&(B=d2()),B(this)}),Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty($.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty($.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}}),$._fromList=M,Object.defineProperty($.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function M(x,S){if(S.length===0)return null;var rt;return S.objectMode?rt=S.buffer.shift():!x||x>=S.length?(S.decoder?rt=S.buffer.join(""):S.buffer.length===1?rt=S.buffer.first():rt=S.buffer.concat(S.length),S.buffer.clear()):rt=S.buffer.consume(x,S.decoder),rt}function X(x){var S=x._readableState;_("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,Ct.nextTick(ct,S,x))}function ct(x,S){if(_("endReadableNT",x.endEmitted,x.length),!x.endEmitted&&x.length===0&&(x.endEmitted=!0,S.readable=!1,S.emit("end"),x.autoDestroy)){var rt=S._writableState;(!rt||rt.autoDestroy&&rt.finished)&&S.destroy()}}typeof Symbol=="function"&&($.from=function(x,S){return z===void 0&&(z=w2()),z($,x,S)});function _t(x,S){for(var rt=0,lt=x.length;rt<lt;rt++)if(x[rt]===S)return rt;return-1}return Cu}var Nu,wd;function gd(){if(wd)return Nu;wd=1,Nu=u;var n=ws().codes,t=n.ERR_METHOD_NOT_IMPLEMENTED,e=n.ERR_MULTIPLE_CALLBACK,r=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,o=gs();ds()(u,o);function a(f,g){var y=this._transformState;y.transforming=!1;var v=y.writecb;if(v===null)return this.emit("error",new e);y.writechunk=null,y.writecb=null,g!=null&&this.push(g),v(f);var I=this._readableState;I.reading=!1,(I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}function u(f){if(!(this instanceof u))return new u(f);o.call(this,f),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",_)}function _(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,y){l(f,g,y)}):l(this,null,null)}u.prototype.push=function(f,g){return this._transformState.needTransform=!1,o.prototype.push.call(this,f,g)},u.prototype._transform=function(f,g,y){y(new t("_transform()"))},u.prototype._write=function(f,g,y){var v=this._transformState;if(v.writecb=y,v.writechunk=f,v.writeencoding=g,!v.transforming){var I=this._readableState;(v.needTransform||I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}},u.prototype._read=function(f){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},u.prototype._destroy=function(f,g){o.prototype._destroy.call(this,f,function(y){g(y)})};function l(f,g,y){if(g)return f.emit("error",g);if(y!=null&&f.push(y),f._writableState.length)throw new i;if(f._transformState.transforming)throw new r;return f.push(null)}return Nu}var Lu,yd;function g2(){if(yd)return Lu;yd=1,Lu=t;var n=gd();ds()(t,n);function t(e){if(!(this instanceof t))return new t(e);n.call(this,e)}return t.prototype._transform=function(e,r,i){i(null,e)},Lu}var Du,bd;function y2(){if(bd)return Du;bd=1;var n;function t(y){var v=!1;return function(){v||(v=!0,y.apply(void 0,arguments))}}var e=ws().codes,r=e.ERR_MISSING_ARGS,i=e.ERR_STREAM_DESTROYED;function o(y){if(y)throw y}function a(y){return y.setHeader&&typeof y.abort=="function"}function u(y,v,I,k){k=t(k);var T=!1;y.on("close",function(){T=!0}),n===void 0&&(n=Fu()),n(y,{readable:v,writable:I},function(R){if(R)return k(R);T=!0,k()});var E=!1;return function(R){if(!T&&!E){if(E=!0,a(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();k(R||new i("pipe"))}}}function _(y){y()}function l(y,v){return y.pipe(v)}function f(y){return!y.length||typeof y[y.length-1]!="function"?o:y.pop()}function g(){for(var y=arguments.length,v=new Array(y),I=0;I<y;I++)v[I]=arguments[I];var k=f(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new r("streams");var T,E=v.map(function(R,B){var z=B<v.length-1,O=B>0;return u(R,z,O,function(C){T||(T=C),C&&E.forEach(_),!z&&(E.forEach(_),k(T))})});return v.reduce(l)}return Du=g,Du}var md;function Ad(){return md||(md=1,function(n,t){t=n.exports=dd(),t.Stream=t,t.Readable=t,t.Writable=od(),t.Duplex=gs(),t.Transform=gd(),t.PassThrough=g2(),t.finished=Fu(),t.pipeline=y2()}(qo,qo.exports)),qo.exports}var Uu,Ed;function b2(){if(Ed)return Uu;Ed=1;const{Transform:n}=Ad();return Uu=t=>class Jg extends n{constructor(r,i,o,a,u){super(u),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._hashBitLength=a,this._options=u,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(r){let i=null;try{this.push(this.digest())}catch(o){i=o}r(i)}update(r,i){if(!Ne.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Ne.isBuffer(r)||(r=Ne.from(r,i)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let i=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(i=i.toString(r)),this._resetState(),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Jg(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Uu}var Mu,vd;function m2(){if(vd)return Mu;vd=1;const{Transform:n}=Ad();return Mu=t=>class $g extends n{constructor(r,i,o,a){super(a),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._options=a,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,i){if(!Ne.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Ne.isBuffer(r)||(r=Ne.from(r,i)),this._state.absorb(r),this}squeeze(r,i){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(r);return i!==void 0&&(o=o.toString(i)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new $g(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Mu}var ju,xd;function A2(){if(xd)return ju;xd=1;const n=b2(),t=m2();return ju=function(e){const r=n(e),i=t(e);return function(o,a){switch(typeof o=="string"?o.toLowerCase():o){case"keccak224":return new r(1152,448,null,224,a);case"keccak256":return new r(1088,512,null,256,a);case"keccak384":return new r(832,768,null,384,a);case"keccak512":return new r(576,1024,null,512,a);case"sha3-224":return new r(1152,448,6,224,a);case"sha3-256":return new r(1088,512,6,256,a);case"sha3-384":return new r(832,768,6,384,a);case"sha3-512":return new r(576,1024,6,512,a);case"shake128":return new i(1344,256,31,a);case"shake256":return new i(1088,512,31,a);default:throw new Error("Invald algorithm: "+o)}}},ju}var Gu={},Rd;function E2(){if(Rd)return Gu;Rd=1;const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return Gu.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],_=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],g=t[8]^t[18]^t[28]^t[38]^t[48],y=t[9]^t[19]^t[29]^t[39]^t[49];let v=g^(o<<1|a>>>31),I=y^(a<<1|o>>>31);const k=t[0]^v,T=t[1]^I,E=t[10]^v,R=t[11]^I,B=t[20]^v,z=t[21]^I,O=t[30]^v,C=t[31]^I,N=t[40]^v,D=t[41]^I;v=r^(u<<1|_>>>31),I=i^(_<<1|u>>>31);const $=t[2]^v,et=t[3]^I,ft=t[12]^v,L=t[13]^I,vt=t[22]^v,wt=t[23]^I,at=t[32]^v,pt=t[33]^I,mt=t[42]^v,Rt=t[43]^I;v=o^(l<<1|f>>>31),I=a^(f<<1|l>>>31);const xt=t[4]^v,Pt=t[5]^I,jt=t[14]^v,W=t[15]^I,Z=t[24]^v,nt=t[25]^I,yt=t[34]^v,H=t[35]^I,M=t[44]^v,X=t[45]^I;v=u^(g<<1|y>>>31),I=_^(y<<1|g>>>31);const ct=t[6]^v,_t=t[7]^I,x=t[16]^v,S=t[17]^I,rt=t[26]^v,lt=t[27]^I,Bt=t[36]^v,bt=t[37]^I,kt=t[46]^v,pe=t[47]^I;v=l^(r<<1|i>>>31),I=f^(i<<1|r>>>31);const it=t[8]^v,de=t[9]^I,we=t[18]^v,Gt=t[19]^I,Qt=t[28]^v,ge=t[29]^I,he=t[38]^v,ze=t[39]^I,Fe=t[48]^v,_e=t[49]^I,Ye=k,b=T,h=R<<4|E>>>28,d=E<<4|R>>>28,P=B<<3|z>>>29,U=z<<3|B>>>29,J=C<<9|O>>>23,st=O<<9|C>>>23,It=N<<18|D>>>14,Vt=D<<18|N>>>14,qt=$<<1|et>>>31,Wt=et<<1|$>>>31,Ut=L<<12|ft>>>20,bi=ft<<12|L>>>20,Oe=vt<<10|wt>>>22,Wi=wt<<10|vt>>>22,so=pt<<13|at>>>19,Ze=at<<13|pt>>>19,oo=mt<<2|Rt>>>30,m=Rt<<2|mt>>>30,p=Pt<<30|xt>>>2,w=xt<<30|Pt>>>2,F=jt<<6|W>>>26,V=W<<6|jt>>>26,Y=nt<<11|Z>>>21,ot=Z<<11|nt>>>21,Ft=yt<<15|H>>>17,Zt=H<<15|yt>>>17,Jt=X<<29|M>>>3,Xt=M<<29|X>>>3,Ht=ct<<28|_t>>>4,s_=_t<<28|ct>>>4,o_=S<<23|x>>>9,a_=x<<23|S>>>9,c_=rt<<25|lt>>>7,u_=lt<<25|rt>>>7,__=Bt<<21|bt>>>11,f_=bt<<21|Bt>>>11,l_=pe<<24|kt>>>8,h_=kt<<24|pe>>>8,p_=it<<27|de>>>5,d_=de<<27|it>>>5,w_=we<<20|Gt>>>12,g_=Gt<<20|we>>>12,y_=ge<<7|Qt>>>25,b_=Qt<<7|ge>>>25,m_=he<<8|ze>>>24,A_=ze<<8|he>>>24,E_=Fe<<14|_e>>>18,v_=_e<<14|Fe>>>18;t[0]=Ye^~Ut&Y,t[1]=b^~bi&ot,t[10]=Ht^~w_&P,t[11]=s_^~g_&U,t[20]=qt^~F&c_,t[21]=Wt^~V&u_,t[30]=p_^~h&Oe,t[31]=d_^~d&Wi,t[40]=p^~o_&y_,t[41]=w^~a_&b_,t[2]=Ut^~Y&__,t[3]=bi^~ot&f_,t[12]=w_^~P&so,t[13]=g_^~U&Ze,t[22]=F^~c_&m_,t[23]=V^~u_&A_,t[32]=h^~Oe&Ft,t[33]=d^~Wi&Zt,t[42]=o_^~y_&J,t[43]=a_^~b_&st,t[4]=Y^~__&E_,t[5]=ot^~f_&v_,t[14]=P^~so&Jt,t[15]=U^~Ze&Xt,t[24]=c_^~m_&It,t[25]=u_^~A_&Vt,t[34]=Oe^~Ft&l_,t[35]=Wi^~Zt&h_,t[44]=y_^~J&oo,t[45]=b_^~st&m,t[6]=__^~E_&Ye,t[7]=f_^~v_&b,t[16]=so^~Jt&Ht,t[17]=Ze^~Xt&s_,t[26]=m_^~It&qt,t[27]=A_^~Vt&Wt,t[36]=Ft^~l_&p_,t[37]=Zt^~h_&d_,t[46]=J^~oo&p,t[47]=st^~m&w,t[8]=E_^~Ye&Ut,t[9]=v_^~b&bi,t[18]=Jt^~Ht&w_,t[19]=Xt^~s_&g_,t[28]=It^~qt&F,t[29]=Vt^~Wt&V,t[38]=l_^~p_&h,t[39]=h_^~d_&d,t[48]=oo^~p&o_,t[49]=m^~w&a_,t[0]^=n[e*2],t[1]^=n[e*2+1]}},Gu}var Hu,Sd;function v2(){if(Sd)return Hu;Sd=1;const n=E2();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,r){for(let i=0;i<50;++i)this.state[i]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(e){for(let r=0;r<e.length;++r)this.state[~~(this.count/4)]^=e[r]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),(e&128)!==0&&this.count===this.blockSize-1&&n.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),n.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const r=Ne.alloc(e);for(let i=0;i<e;++i)r[i]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},t.prototype.copy=function(e){for(let r=0;r<50;++r)e.state[r]=this.state[r];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},Hu=t,Hu}var Vu,zd;function x2(){return zd||(zd=1,Vu=A2()(v2())),Vu}var R2=x2();const Bd=Fh(R2);var Xo={exports:{}},S2=Xo.exports,kd;function z2(){return kd||(kd=1,function(n,t){(function(e,r){n.exports=r()})(S2,function(){var e=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var u={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(u,a),function(l,f){var g=a.retries,y=a.retryDelay,v=a.retryOn;if(f&&f.retries!==void 0)if(r(f.retries))g=f.retries;else throw new i("retries must be a positive integer");if(f&&f.retryDelay!==void 0)if(r(f.retryDelay)||typeof f.retryDelay=="function")y=f.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(f&&f.retryOn)if(Array.isArray(f.retryOn)||typeof f.retryOn=="function")v=f.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(I,k){var T=function(R){var B=typeof Request<"u"&&l instanceof Request?l.clone():l;o(B,f).then(function(z){if(Array.isArray(v)&&v.indexOf(z.status)===-1)I(z);else if(typeof v=="function")try{return Promise.resolve(v(R,null,z)).then(function(O){O?E(R,null,z):I(z)}).catch(k)}catch(O){k(O)}else R<g?E(R,null,z):I(z)}).catch(function(z){if(typeof v=="function")try{Promise.resolve(v(R,z,null)).then(function(O){O?E(R,z,null):k(z)}).catch(function(O){k(O)})}catch(O){k(O)}else R<g?E(R,z,null):k(z)})};function E(R,B,z){var O=typeof y=="function"?y(R,B,z):y;setTimeout(function(){T(++R)},O)}T(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return e})}(Xo)),Xo.exports}var B2=z2();const k2=Fh(B2),P2=()=>(async n=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(n)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var ta=typeof Ji<"u"?Ji:typeof self<"u"?self:typeof window<"u"?window:{};function Pd(n,t){return new Promise(e=>{n.addEventListener("message",function r({data:i}){i?.type===t&&(n.removeEventListener("message",r),e(i))})})}Pd(self,"wasm_bindgen_worker_init").then(async({init:n,receiver:t})=>{const e=await Promise.resolve().then(function(){return M2});await e.default(n),postMessage({type:"wasm_bindgen_worker_ready"}),e.wbg_rayon_start_worker(t)});async function I2(n,t,e){if(e.numThreads()===0)throw new Error("num_threads must be > 0.");const r={type:"wasm_bindgen_worker_init",init:{module_or_path:n,memory:t},receiver:e.receiver()};await Promise.all(Array.from({length:e.numThreads()},async()=>{let i;try{i=new Worker(new URL("/workerHelpers.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href),{type:"module"})}catch{const u=await(await fetch("/workerHelpers.js")).blob(),_=URL.createObjectURL(u);i=new Worker(_)}return i.postMessage(r),await Pd(i,"wasm_bindgen_worker_ready"),i})),e.build()}let s;function Js(n){const t=s.__externref_table_alloc();return s.__wbindgen_export_2.set(t,n),t}function ys(n,t){try{return n.apply(this,t)}catch(e){const r=Js(e);s.__wbindgen_exn_store(r)}}let $s=null;function bs(){return($s===null||$s.buffer!==s.memory.buffer)&&($s=new Uint8Array(s.memory.buffer)),$s}let ea=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});ea.decode();const F2=2146435072;let qu=0;function O2(n,t){return qu+=t,qu>=F2&&(ea=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),ea.decode(),qu=t),ea.decode(bs().slice(n,n+t))}function Ys(n,t){return n=n>>>0,O2(n,t)}function Q(n,t){return n=n>>>0,bs().subarray(n/1,n/1+t)}let j=0;const ra=new TextEncoder;ra.encodeInto=function(n,t){const e=ra.encode(n);return t.set(e),{read:n.length,written:e.length}};function na(n,t,e){if(e===void 0){const u=ra.encode(n),_=t(u.length,1)>>>0;return bs().subarray(_,_+u.length).set(u),j=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=bs();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=bs().subarray(i+a,i+r),_=ra.encodeInto(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return j=a,i}let Zs=null;function Hn(){return(Zs===null||Zs.buffer!==s.memory.buffer)&&(Zs=new DataView(s.memory.buffer)),Zs}function Ui(n){return n==null}function Qu(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=Qu(n[0]));for(let a=1;a<i;a++)o+=", "+Qu(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
21
+ ${n.stack}`:r}function q(n,t){const e=t(n.length*1,1)>>>0;return bs().set(n,e/1),j=n.length,e}function c(n){const t=s.__wbindgen_export_2.get(n);return s.__externref_table_dealloc(n),t}function A(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function Ku(){s.init_panic_hook()}function T2(n){s.wbg_rayon_start_worker(n)}function Wu(n){return s.initThreadPool(n)}const Id=Object.freeze({Proof:0,0:"Proof",Verify:1,1:"Verify"});typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_boolean_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanclientkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleannoisedistribution_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanpublickey_free(n>>>0,1));const Fd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlist_free(n>>>0,1));class Vn{static __wrap(t){t=t>>>0;const e=Object.create(Vn.prototype);return e.__wbg_ptr=t,Fd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlist_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return Vn.__wrap(i[0])}get_kind_of(t){const e=s.compactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}safe_serialize(t){const e=s.compactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Vn.__wrap(o[0])}len(){return s.compactciphertextlist_len(this.__wbg_ptr)>>>0}expand(){const t=s.compactciphertextlist_expand(this.__wbg_ptr);if(t[2])throw c(t[1]);return di.__wrap(t[0])}static builder(t){A(t,Me);const e=s.compactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Mi.__wrap(e[0])}is_empty(){return s.compactciphertextlist_is_empty(this.__wbg_ptr)!==0}serialize(){const t=s.compactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Vn.prototype[Symbol.dispose]=Vn.prototype.free);const Od=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistbuilder_free(n>>>0,1));class Mi{static __wrap(t){t=t>>>0;const e=Object.create(Mi.prototype);return e.__wbg_ptr=t,Od.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Od.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistbuilder_free(t,0)}push_i1024(t){const e=s.compactciphertextlistbuilder_push_i1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i2048(t){const e=s.compactciphertextlistbuilder_push_i2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u1024(t){const e=s.compactciphertextlistbuilder_push_u1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2048(t){const e=s.compactciphertextlistbuilder_push_u2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build_packed(){const t=s.compactciphertextlistbuilder_build_packed(this.__wbg_ptr);if(t[2])throw c(t[1]);return Vn.__wrap(t[0])}push_boolean(t){const e=s.compactciphertextlistbuilder_push_boolean(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build_with_proof_packed(t,e,r){A(t,Ue);const i=q(e,s.__wbindgen_malloc),o=j,a=s.compactciphertextlistbuilder_build_with_proof_packed(this.__wbg_ptr,t.__wbg_ptr,i,o,r);if(a[2])throw c(a[1]);return wi.__wrap(a[0])}build(){const t=s.compactciphertextlistbuilder_build(this.__wbg_ptr);if(t[2])throw c(t[1]);return Vn.__wrap(t[0])}push_i2(t){const e=s.compactciphertextlistbuilder_push_i2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i4(t){const e=s.compactciphertextlistbuilder_push_i4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i6(t){const e=s.compactciphertextlistbuilder_push_i6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i8(t){const e=s.compactciphertextlistbuilder_push_i8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2(t){const e=s.compactciphertextlistbuilder_push_u2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u4(t){const e=s.compactciphertextlistbuilder_push_u4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u6(t){const e=s.compactciphertextlistbuilder_push_u6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u8(t){const e=s.compactciphertextlistbuilder_push_u8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i10(t){const e=s.compactciphertextlistbuilder_push_i10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i12(t){const e=s.compactciphertextlistbuilder_push_i12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i14(t){const e=s.compactciphertextlistbuilder_push_i14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i16(t){const e=s.compactciphertextlistbuilder_push_i16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i24(t){const e=s.compactciphertextlistbuilder_push_i24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i32(t){const e=s.compactciphertextlistbuilder_push_i32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i40(t){const e=s.compactciphertextlistbuilder_push_i40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i48(t){const e=s.compactciphertextlistbuilder_push_i48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i56(t){const e=s.compactciphertextlistbuilder_push_i56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i64(t){const e=s.compactciphertextlistbuilder_push_i64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i72(t){const e=s.compactciphertextlistbuilder_push_i72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i80(t){const e=s.compactciphertextlistbuilder_push_i80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i88(t){const e=s.compactciphertextlistbuilder_push_i88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i96(t){const e=s.compactciphertextlistbuilder_push_i96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u10(t){const e=s.compactciphertextlistbuilder_push_u10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u12(t){const e=s.compactciphertextlistbuilder_push_u12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u14(t){const e=s.compactciphertextlistbuilder_push_u14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u16(t){const e=s.compactciphertextlistbuilder_push_u16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u24(t){const e=s.compactciphertextlistbuilder_push_u24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u32(t){const e=s.compactciphertextlistbuilder_push_u32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u40(t){const e=s.compactciphertextlistbuilder_push_u40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u48(t){const e=s.compactciphertextlistbuilder_push_u48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u56(t){const e=s.compactciphertextlistbuilder_push_u56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u64(t){const e=s.compactciphertextlistbuilder_push_u64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u72(t){const e=s.compactciphertextlistbuilder_push_u72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u80(t){const e=s.compactciphertextlistbuilder_push_u80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u88(t){const e=s.compactciphertextlistbuilder_push_u88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u96(t){const e=s.compactciphertextlistbuilder_push_u96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i104(t){const e=s.compactciphertextlistbuilder_push_i104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i112(t){const e=s.compactciphertextlistbuilder_push_i112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i120(t){const e=s.compactciphertextlistbuilder_push_i120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i128(t){const e=s.compactciphertextlistbuilder_push_i128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i136(t){const e=s.compactciphertextlistbuilder_push_i136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i144(t){const e=s.compactciphertextlistbuilder_push_i144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i152(t){const e=s.compactciphertextlistbuilder_push_i152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i160(t){const e=s.compactciphertextlistbuilder_push_i160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i168(t){const e=s.compactciphertextlistbuilder_push_i168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i176(t){const e=s.compactciphertextlistbuilder_push_i176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i184(t){const e=s.compactciphertextlistbuilder_push_i184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i192(t){const e=s.compactciphertextlistbuilder_push_i192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i200(t){const e=s.compactciphertextlistbuilder_push_i200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i208(t){const e=s.compactciphertextlistbuilder_push_i208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i216(t){const e=s.compactciphertextlistbuilder_push_i216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i224(t){const e=s.compactciphertextlistbuilder_push_i224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i232(t){const e=s.compactciphertextlistbuilder_push_i232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i240(t){const e=s.compactciphertextlistbuilder_push_i240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i248(t){const e=s.compactciphertextlistbuilder_push_i248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i256(t){const e=s.compactciphertextlistbuilder_push_i256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i512(t){const e=s.compactciphertextlistbuilder_push_i512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u104(t){const e=s.compactciphertextlistbuilder_push_u104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u112(t){const e=s.compactciphertextlistbuilder_push_u112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u120(t){const e=s.compactciphertextlistbuilder_push_u120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u128(t){const e=s.compactciphertextlistbuilder_push_u128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u136(t){const e=s.compactciphertextlistbuilder_push_u136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u144(t){const e=s.compactciphertextlistbuilder_push_u144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u152(t){const e=s.compactciphertextlistbuilder_push_u152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u160(t){const e=s.compactciphertextlistbuilder_push_u160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u168(t){const e=s.compactciphertextlistbuilder_push_u168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u176(t){const e=s.compactciphertextlistbuilder_push_u176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u184(t){const e=s.compactciphertextlistbuilder_push_u184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u192(t){const e=s.compactciphertextlistbuilder_push_u192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u200(t){const e=s.compactciphertextlistbuilder_push_u200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u208(t){const e=s.compactciphertextlistbuilder_push_u208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u216(t){const e=s.compactciphertextlistbuilder_push_u216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u224(t){const e=s.compactciphertextlistbuilder_push_u224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u232(t){const e=s.compactciphertextlistbuilder_push_u232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u240(t){const e=s.compactciphertextlistbuilder_push_u240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u248(t){const e=s.compactciphertextlistbuilder_push_u248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u256(t){const e=s.compactciphertextlistbuilder_push_u256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u512(t){const e=s.compactciphertextlistbuilder_push_u512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}}Symbol.dispose&&(Mi.prototype[Symbol.dispose]=Mi.prototype.free);const Td=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistexpander_free(n>>>0,1));class di{static __wrap(t){t=t>>>0;const e=Object.create(di.prototype);return e.__wbg_ptr=t,Td.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Td.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistexpander_free(t,0)}get_int104(t){const e=s.compactciphertextlistexpander_get_int104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cr.__wrap(e[0])}get_int112(t){const e=s.compactciphertextlistexpander_get_int112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ur.__wrap(e[0])}get_int120(t){const e=s.compactciphertextlistexpander_get_int120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fr.__wrap(e[0])}get_int128(t){const e=s.compactciphertextlistexpander_get_int128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return lr.__wrap(e[0])}get_int136(t){const e=s.compactciphertextlistexpander_get_int136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hr.__wrap(e[0])}get_int144(t){const e=s.compactciphertextlistexpander_get_int144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dr.__wrap(e[0])}get_int152(t){const e=s.compactciphertextlistexpander_get_int152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wr.__wrap(e[0])}get_int160(t){const e=s.compactciphertextlistexpander_get_int160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yr.__wrap(e[0])}get_int168(t){const e=s.compactciphertextlistexpander_get_int168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return br.__wrap(e[0])}get_int176(t){const e=s.compactciphertextlistexpander_get_int176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mr.__wrap(e[0])}get_int184(t){const e=s.compactciphertextlistexpander_get_int184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ar.__wrap(e[0])}get_int192(t){const e=s.compactciphertextlistexpander_get_int192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Er.__wrap(e[0])}get_int200(t){const e=s.compactciphertextlistexpander_get_int200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xr.__wrap(e[0])}get_int208(t){const e=s.compactciphertextlistexpander_get_int208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sr.__wrap(e[0])}get_int216(t){const e=s.compactciphertextlistexpander_get_int216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return zr.__wrap(e[0])}get_int224(t){const e=s.compactciphertextlistexpander_get_int224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Br.__wrap(e[0])}get_int232(t){const e=s.compactciphertextlistexpander_get_int232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kr.__wrap(e[0])}get_int240(t){const e=s.compactciphertextlistexpander_get_int240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ir.__wrap(e[0])}get_int248(t){const e=s.compactciphertextlistexpander_get_int248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fr.__wrap(e[0])}get_int256(t){const e=s.compactciphertextlistexpander_get_int256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Or.__wrap(e[0])}get_int512(t){const e=s.compactciphertextlistexpander_get_int512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Dr.__wrap(e[0])}get_uint10(t){const e=s.compactciphertextlistexpander_get_uint10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Kr.__wrap(e[0])}get_uint12(t){const e=s.compactciphertextlistexpander_get_uint12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Yr.__wrap(e[0])}get_uint14(t){const e=s.compactciphertextlistexpander_get_uint14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return en.__wrap(e[0])}get_uint16(t){const e=s.compactciphertextlistexpander_get_uint16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sn.__wrap(e[0])}get_uint24(t){const e=s.compactciphertextlistexpander_get_uint24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yn.__wrap(e[0])}get_uint32(t){const e=s.compactciphertextlistexpander_get_uint32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return En.__wrap(e[0])}get_uint40(t){const e=s.compactciphertextlistexpander_get_uint40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xn.__wrap(e[0])}get_uint48(t){const e=s.compactciphertextlistexpander_get_uint48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Rn.__wrap(e[0])}get_uint56(t){const e=s.compactciphertextlistexpander_get_uint56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return zn.__wrap(e[0])}get_uint64(t){const e=s.compactciphertextlistexpander_get_uint64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kn.__wrap(e[0])}get_uint72(t){const e=s.compactciphertextlistexpander_get_uint72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pn.__wrap(e[0])}get_uint80(t){const e=s.compactciphertextlistexpander_get_uint80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fn.__wrap(e[0])}get_uint88(t){const e=s.compactciphertextlistexpander_get_uint88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return On.__wrap(e[0])}get_uint96(t){const e=s.compactciphertextlistexpander_get_uint96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tn.__wrap(e[0])}get_int1024(t){const e=s.compactciphertextlistexpander_get_int1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ar.__wrap(e[0])}get_int2048(t){const e=s.compactciphertextlistexpander_get_int2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Rr.__wrap(e[0])}get_kind_of(t){const e=s.compactciphertextlistexpander_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}get_uint104(t){const e=s.compactciphertextlistexpander_get_uint104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Jr.__wrap(e[0])}get_uint112(t){const e=s.compactciphertextlistexpander_get_uint112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return $r.__wrap(e[0])}get_uint120(t){const e=s.compactciphertextlistexpander_get_uint120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Zr.__wrap(e[0])}get_uint128(t){const e=s.compactciphertextlistexpander_get_uint128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Xr.__wrap(e[0])}get_uint136(t){const e=s.compactciphertextlistexpander_get_uint136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return tn.__wrap(e[0])}get_uint144(t){const e=s.compactciphertextlistexpander_get_uint144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return rn.__wrap(e[0])}get_uint152(t){const e=s.compactciphertextlistexpander_get_uint152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return nn.__wrap(e[0])}get_uint160(t){const e=s.compactciphertextlistexpander_get_uint160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return on.__wrap(e[0])}get_uint168(t){const e=s.compactciphertextlistexpander_get_uint168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return an.__wrap(e[0])}get_uint176(t){const e=s.compactciphertextlistexpander_get_uint176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cn.__wrap(e[0])}get_uint184(t){const e=s.compactciphertextlistexpander_get_uint184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return un.__wrap(e[0])}get_uint192(t){const e=s.compactciphertextlistexpander_get_uint192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _n.__wrap(e[0])}get_uint200(t){const e=s.compactciphertextlistexpander_get_uint200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ln.__wrap(e[0])}get_uint208(t){const e=s.compactciphertextlistexpander_get_uint208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pn.__wrap(e[0])}get_uint216(t){const e=s.compactciphertextlistexpander_get_uint216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dn.__wrap(e[0])}get_uint224(t){const e=s.compactciphertextlistexpander_get_uint224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wn.__wrap(e[0])}get_uint232(t){const e=s.compactciphertextlistexpander_get_uint232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gn.__wrap(e[0])}get_uint240(t){const e=s.compactciphertextlistexpander_get_uint240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return bn.__wrap(e[0])}get_uint248(t){const e=s.compactciphertextlistexpander_get_uint248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mn.__wrap(e[0])}get_uint256(t){const e=s.compactciphertextlistexpander_get_uint256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return An.__wrap(e[0])}get_uint512(t){const e=s.compactciphertextlistexpander_get_uint512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sn.__wrap(e[0])}get_uint1024(t){const e=s.compactciphertextlistexpander_get_uint1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Wr.__wrap(e[0])}get_uint2048(t){const e=s.compactciphertextlistexpander_get_uint2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hn.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}get_bool(t){const e=s.compactciphertextlistexpander_get_bool(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sr.__wrap(e[0])}get_int2(t){const e=s.compactciphertextlistexpander_get_int2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vr.__wrap(e[0])}get_int4(t){const e=s.compactciphertextlistexpander_get_int4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Cr.__wrap(e[0])}get_int6(t){const e=s.compactciphertextlistexpander_get_int6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Mr.__wrap(e[0])}get_int8(t){const e=s.compactciphertextlistexpander_get_int8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Hr.__wrap(e[0])}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_int10(t){const e=s.compactciphertextlistexpander_get_int10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return or.__wrap(e[0])}get_int12(t){const e=s.compactciphertextlistexpander_get_int12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _r.__wrap(e[0])}get_int14(t){const e=s.compactciphertextlistexpander_get_int14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pr.__wrap(e[0])}get_int16(t){const e=s.compactciphertextlistexpander_get_int16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gr.__wrap(e[0])}get_int24(t){const e=s.compactciphertextlistexpander_get_int24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pr.__wrap(e[0])}get_int32(t){const e=s.compactciphertextlistexpander_get_int32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tr.__wrap(e[0])}get_int40(t){const e=s.compactciphertextlistexpander_get_int40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Nr.__wrap(e[0])}get_int48(t){const e=s.compactciphertextlistexpander_get_int48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Lr.__wrap(e[0])}get_int56(t){const e=s.compactciphertextlistexpander_get_int56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ur.__wrap(e[0])}get_int64(t){const e=s.compactciphertextlistexpander_get_int64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return jr.__wrap(e[0])}get_int72(t){const e=s.compactciphertextlistexpander_get_int72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Gr.__wrap(e[0])}get_int80(t){const e=s.compactciphertextlistexpander_get_int80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Vr.__wrap(e[0])}get_int88(t){const e=s.compactciphertextlistexpander_get_int88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return qr.__wrap(e[0])}get_int96(t){const e=s.compactciphertextlistexpander_get_int96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Qr.__wrap(e[0])}get_uint2(t){const e=s.compactciphertextlistexpander_get_uint2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fn.__wrap(e[0])}get_uint4(t){const e=s.compactciphertextlistexpander_get_uint4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vn.__wrap(e[0])}get_uint6(t){const e=s.compactciphertextlistexpander_get_uint6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Bn.__wrap(e[0])}get_uint8(t){const e=s.compactciphertextlistexpander_get_uint8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return In.__wrap(e[0])}}Symbol.dispose&&(di.prototype[Symbol.dispose]=di.prototype.free);const Cd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactpkecrs_free(n>>>0,1));class Ue{static __wrap(t){t=t>>>0;const e=Object.create(Ue.prototype);return e.__wbg_ptr=t,Cd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactpkecrs_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize(e,r);if(i[2])throw c(i[1]);return Ue.__wrap(i[0])}static from_config(t,e){A(t,gi);const r=s.compactpkecrs_from_config(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return Ue.__wrap(r[0])}safe_serialize(t){const e=s.compactpkecrs_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ue.__wrap(o[0])}static deserialize_from_public_params(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize_from_public_params(e,r);if(i[2])throw c(i[1]);return Ue.__wrap(i[0])}static safe_deserialize_from_public_params(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize_from_public_params(r,i,e);if(o[2])throw c(o[1]);return Ue.__wrap(o[0])}serialize(t){const e=s.compactpkecrs_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}}Symbol.dispose&&(Ue.prototype[Symbol.dispose]=Ue.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfhebool_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint96_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint96_free(n>>>0,1));const Nd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fhebool_free(n>>>0,1));class sr{static __wrap(t){t=t>>>0;const e=Object.create(sr.prototype);return e.__wbg_ptr=t,Nd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fhebool_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fhebool_deserialize(e,r);if(i[2])throw c(i[1]);return sr.__wrap(i[0])}safe_serialize(t){const e=s.fhebool_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fhebool_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return sr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fhebool_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fhebool_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fhebool_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fhebool_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]!==0}serialize(){const t=s.fhebool_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(sr.prototype[Symbol.dispose]=sr.prototype.free);const Ld=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint10_free(n>>>0,1));class or{static __wrap(t){t=t>>>0;const e=Object.create(or.prototype);return e.__wbg_ptr=t,Ld.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ld.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint10_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint10_deserialize(e,r);if(i[2])throw c(i[1]);return or.__wrap(i[0])}safe_serialize(t){const e=s.fheint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return or.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(or.prototype[Symbol.dispose]=or.prototype.free);const Dd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint1024_free(n>>>0,1));class ar{static __wrap(t){t=t>>>0;const e=Object.create(ar.prototype);return e.__wbg_ptr=t,Dd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint1024_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint1024_deserialize(e,r);if(i[2])throw c(i[1]);return ar.__wrap(i[0])}safe_serialize(t){const e=s.fheint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ar.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ar.prototype[Symbol.dispose]=ar.prototype.free);const Ud=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint104_free(n>>>0,1));class cr{static __wrap(t){t=t>>>0;const e=Object.create(cr.prototype);return e.__wbg_ptr=t,Ud.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ud.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint104_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint104_deserialize(e,r);if(i[2])throw c(i[1]);return cr.__wrap(i[0])}safe_serialize(t){const e=s.fheint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return cr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(cr.prototype[Symbol.dispose]=cr.prototype.free);const Md=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint112_free(n>>>0,1));class ur{static __wrap(t){t=t>>>0;const e=Object.create(ur.prototype);return e.__wbg_ptr=t,Md.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Md.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint112_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint112_deserialize(e,r);if(i[2])throw c(i[1]);return ur.__wrap(i[0])}safe_serialize(t){const e=s.fheint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ur.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ur.prototype[Symbol.dispose]=ur.prototype.free);const jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint12_free(n>>>0,1));class _r{static __wrap(t){t=t>>>0;const e=Object.create(_r.prototype);return e.__wbg_ptr=t,jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint12_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint12_deserialize(e,r);if(i[2])throw c(i[1]);return _r.__wrap(i[0])}safe_serialize(t){const e=s.fheint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return _r.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(_r.prototype[Symbol.dispose]=_r.prototype.free);const Gd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint120_free(n>>>0,1));class fr{static __wrap(t){t=t>>>0;const e=Object.create(fr.prototype);return e.__wbg_ptr=t,Gd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint120_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint120_deserialize(e,r);if(i[2])throw c(i[1]);return fr.__wrap(i[0])}safe_serialize(t){const e=s.fheint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return fr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(fr.prototype[Symbol.dispose]=fr.prototype.free);const Hd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint128_free(n>>>0,1));class lr{static __wrap(t){t=t>>>0;const e=Object.create(lr.prototype);return e.__wbg_ptr=t,Hd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint128_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint128_deserialize(e,r);if(i[2])throw c(i[1]);return lr.__wrap(i[0])}safe_serialize(t){const e=s.fheint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return lr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(lr.prototype[Symbol.dispose]=lr.prototype.free);const Vd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint136_free(n>>>0,1));class hr{static __wrap(t){t=t>>>0;const e=Object.create(hr.prototype);return e.__wbg_ptr=t,Vd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint136_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint136_deserialize(e,r);if(i[2])throw c(i[1]);return hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(hr.prototype[Symbol.dispose]=hr.prototype.free);const qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint14_free(n>>>0,1));class pr{static __wrap(t){t=t>>>0;const e=Object.create(pr.prototype);return e.__wbg_ptr=t,qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint14_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint14_deserialize(e,r);if(i[2])throw c(i[1]);return pr.__wrap(i[0])}safe_serialize(t){const e=s.fheint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(pr.prototype[Symbol.dispose]=pr.prototype.free);const Qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint144_free(n>>>0,1));class dr{static __wrap(t){t=t>>>0;const e=Object.create(dr.prototype);return e.__wbg_ptr=t,Qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint144_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint144_deserialize(e,r);if(i[2])throw c(i[1]);return dr.__wrap(i[0])}safe_serialize(t){const e=s.fheint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dr.prototype[Symbol.dispose]=dr.prototype.free);const Kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint152_free(n>>>0,1));class wr{static __wrap(t){t=t>>>0;const e=Object.create(wr.prototype);return e.__wbg_ptr=t,Kd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint152_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint152_deserialize(e,r);if(i[2])throw c(i[1]);return wr.__wrap(i[0])}safe_serialize(t){const e=s.fheint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(wr.prototype[Symbol.dispose]=wr.prototype.free);const Wd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint16_free(n>>>0,1));class gr{static __wrap(t){t=t>>>0;const e=Object.create(gr.prototype);return e.__wbg_ptr=t,Wd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint16_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint16_deserialize(e,r);if(i[2])throw c(i[1]);return gr.__wrap(i[0])}safe_serialize(t){const e=s.fheint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return gr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(gr.prototype[Symbol.dispose]=gr.prototype.free);const Jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint160_free(n>>>0,1));class yr{static __wrap(t){t=t>>>0;const e=Object.create(yr.prototype);return e.__wbg_ptr=t,Jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint160_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint160_deserialize(e,r);if(i[2])throw c(i[1]);return yr.__wrap(i[0])}safe_serialize(t){const e=s.fheint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return yr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(yr.prototype[Symbol.dispose]=yr.prototype.free);const $d=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint168_free(n>>>0,1));class br{static __wrap(t){t=t>>>0;const e=Object.create(br.prototype);return e.__wbg_ptr=t,$d.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$d.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint168_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint168_deserialize(e,r);if(i[2])throw c(i[1]);return br.__wrap(i[0])}safe_serialize(t){const e=s.fheint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return br.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(br.prototype[Symbol.dispose]=br.prototype.free);const Yd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint176_free(n>>>0,1));class mr{static __wrap(t){t=t>>>0;const e=Object.create(mr.prototype);return e.__wbg_ptr=t,Yd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint176_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint176_deserialize(e,r);if(i[2])throw c(i[1]);return mr.__wrap(i[0])}safe_serialize(t){const e=s.fheint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return mr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(mr.prototype[Symbol.dispose]=mr.prototype.free);const Zd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint184_free(n>>>0,1));class Ar{static __wrap(t){t=t>>>0;const e=Object.create(Ar.prototype);return e.__wbg_ptr=t,Zd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint184_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint184_deserialize(e,r);if(i[2])throw c(i[1]);return Ar.__wrap(i[0])}safe_serialize(t){const e=s.fheint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ar.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ar.prototype[Symbol.dispose]=Ar.prototype.free);const Xd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint192_free(n>>>0,1));class Er{static __wrap(t){t=t>>>0;const e=Object.create(Er.prototype);return e.__wbg_ptr=t,Xd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint192_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint192_deserialize(e,r);if(i[2])throw c(i[1]);return Er.__wrap(i[0])}safe_serialize(t){const e=s.fheint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Er.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Er.prototype[Symbol.dispose]=Er.prototype.free);const tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2_free(n>>>0,1));class vr{static __wrap(t){t=t>>>0;const e=Object.create(vr.prototype);return e.__wbg_ptr=t,tw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2_deserialize(e,r);if(i[2])throw c(i[1]);return vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return vr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(vr.prototype[Symbol.dispose]=vr.prototype.free);const ew=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint200_free(n>>>0,1));class xr{static __wrap(t){t=t>>>0;const e=Object.create(xr.prototype);return e.__wbg_ptr=t,ew.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ew.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint200_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint200_deserialize(e,r);if(i[2])throw c(i[1]);return xr.__wrap(i[0])}safe_serialize(t){const e=s.fheint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return xr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(xr.prototype[Symbol.dispose]=xr.prototype.free);const rw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2048_free(n>>>0,1));class Rr{static __wrap(t){t=t>>>0;const e=Object.create(Rr.prototype);return e.__wbg_ptr=t,rw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2048_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2048_deserialize(e,r);if(i[2])throw c(i[1]);return Rr.__wrap(i[0])}safe_serialize(t){const e=s.fheint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Rr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Rr.prototype[Symbol.dispose]=Rr.prototype.free);const nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint208_free(n>>>0,1));class Sr{static __wrap(t){t=t>>>0;const e=Object.create(Sr.prototype);return e.__wbg_ptr=t,nw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,nw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint208_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint208_deserialize(e,r);if(i[2])throw c(i[1]);return Sr.__wrap(i[0])}safe_serialize(t){const e=s.fheint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Sr.prototype[Symbol.dispose]=Sr.prototype.free);const iw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint216_free(n>>>0,1));class zr{static __wrap(t){t=t>>>0;const e=Object.create(zr.prototype);return e.__wbg_ptr=t,iw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,iw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint216_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint216_deserialize(e,r);if(i[2])throw c(i[1]);return zr.__wrap(i[0])}safe_serialize(t){const e=s.fheint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return zr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(zr.prototype[Symbol.dispose]=zr.prototype.free);const sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint224_free(n>>>0,1));class Br{static __wrap(t){t=t>>>0;const e=Object.create(Br.prototype);return e.__wbg_ptr=t,sw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint224_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint224_deserialize(e,r);if(i[2])throw c(i[1]);return Br.__wrap(i[0])}safe_serialize(t){const e=s.fheint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Br.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Br.prototype[Symbol.dispose]=Br.prototype.free);const ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint232_free(n>>>0,1));class kr{static __wrap(t){t=t>>>0;const e=Object.create(kr.prototype);return e.__wbg_ptr=t,ow.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ow.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint232_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint232_deserialize(e,r);if(i[2])throw c(i[1]);return kr.__wrap(i[0])}safe_serialize(t){const e=s.fheint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(kr.prototype[Symbol.dispose]=kr.prototype.free);const aw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint24_free(n>>>0,1));class Pr{static __wrap(t){t=t>>>0;const e=Object.create(Pr.prototype);return e.__wbg_ptr=t,aw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,aw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint24_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint24_deserialize(e,r);if(i[2])throw c(i[1]);return Pr.__wrap(i[0])}safe_serialize(t){const e=s.fheint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Pr.prototype[Symbol.dispose]=Pr.prototype.free);const cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint240_free(n>>>0,1));class Ir{static __wrap(t){t=t>>>0;const e=Object.create(Ir.prototype);return e.__wbg_ptr=t,cw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint240_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint240_deserialize(e,r);if(i[2])throw c(i[1]);return Ir.__wrap(i[0])}safe_serialize(t){const e=s.fheint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ir.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ir.prototype[Symbol.dispose]=Ir.prototype.free);const uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint248_free(n>>>0,1));class Fr{static __wrap(t){t=t>>>0;const e=Object.create(Fr.prototype);return e.__wbg_ptr=t,uw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,uw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint248_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint248_deserialize(e,r);if(i[2])throw c(i[1]);return Fr.__wrap(i[0])}safe_serialize(t){const e=s.fheint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Fr.prototype[Symbol.dispose]=Fr.prototype.free);const _w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint256_free(n>>>0,1));class Or{static __wrap(t){t=t>>>0;const e=Object.create(Or.prototype);return e.__wbg_ptr=t,_w.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_w.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint256_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint256_deserialize(e,r);if(i[2])throw c(i[1]);return Or.__wrap(i[0])}safe_serialize(t){const e=s.fheint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Or.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Or.prototype[Symbol.dispose]=Or.prototype.free);const fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint32_free(n>>>0,1));class Tr{static __wrap(t){t=t>>>0;const e=Object.create(Tr.prototype);return e.__wbg_ptr=t,fw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint32_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint32_deserialize(e,r);if(i[2])throw c(i[1]);return Tr.__wrap(i[0])}safe_serialize(t){const e=s.fheint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Tr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Tr.prototype[Symbol.dispose]=Tr.prototype.free);const lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint4_free(n>>>0,1));class Cr{static __wrap(t){t=t>>>0;const e=Object.create(Cr.prototype);return e.__wbg_ptr=t,lw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint4_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint4_deserialize(e,r);if(i[2])throw c(i[1]);return Cr.__wrap(i[0])}safe_serialize(t){const e=s.fheint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Cr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Cr.prototype[Symbol.dispose]=Cr.prototype.free);const hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint40_free(n>>>0,1));class Nr{static __wrap(t){t=t>>>0;const e=Object.create(Nr.prototype);return e.__wbg_ptr=t,hw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint40_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint40_deserialize(e,r);if(i[2])throw c(i[1]);return Nr.__wrap(i[0])}safe_serialize(t){const e=s.fheint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Nr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Nr.prototype[Symbol.dispose]=Nr.prototype.free);const pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint48_free(n>>>0,1));class Lr{static __wrap(t){t=t>>>0;const e=Object.create(Lr.prototype);return e.__wbg_ptr=t,pw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint48_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint48_deserialize(e,r);if(i[2])throw c(i[1]);return Lr.__wrap(i[0])}safe_serialize(t){const e=s.fheint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Lr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Lr.prototype[Symbol.dispose]=Lr.prototype.free);const dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint512_free(n>>>0,1));class Dr{static __wrap(t){t=t>>>0;const e=Object.create(Dr.prototype);return e.__wbg_ptr=t,dw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint512_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint512_deserialize(e,r);if(i[2])throw c(i[1]);return Dr.__wrap(i[0])}safe_serialize(t){const e=s.fheint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Dr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Dr.prototype[Symbol.dispose]=Dr.prototype.free);const ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint56_free(n>>>0,1));class Ur{static __wrap(t){t=t>>>0;const e=Object.create(Ur.prototype);return e.__wbg_ptr=t,ww.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ww.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint56_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint56_deserialize(e,r);if(i[2])throw c(i[1]);return Ur.__wrap(i[0])}safe_serialize(t){const e=s.fheint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ur.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ur.prototype[Symbol.dispose]=Ur.prototype.free);const gw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint6_free(n>>>0,1));class Mr{static __wrap(t){t=t>>>0;const e=Object.create(Mr.prototype);return e.__wbg_ptr=t,gw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint6_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint6_deserialize(e,r);if(i[2])throw c(i[1]);return Mr.__wrap(i[0])}safe_serialize(t){const e=s.fheint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Mr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Mr.prototype[Symbol.dispose]=Mr.prototype.free);const yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint64_free(n>>>0,1));class jr{static __wrap(t){t=t>>>0;const e=Object.create(jr.prototype);return e.__wbg_ptr=t,yw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint64_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint64_deserialize(e,r);if(i[2])throw c(i[1]);return jr.__wrap(i[0])}safe_serialize(t){const e=s.fheint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return jr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(jr.prototype[Symbol.dispose]=jr.prototype.free);const bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint72_free(n>>>0,1));class Gr{static __wrap(t){t=t>>>0;const e=Object.create(Gr.prototype);return e.__wbg_ptr=t,bw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint72_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint72_deserialize(e,r);if(i[2])throw c(i[1]);return Gr.__wrap(i[0])}safe_serialize(t){const e=s.fheint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Gr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Gr.prototype[Symbol.dispose]=Gr.prototype.free);const mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint8_free(n>>>0,1));class Hr{static __wrap(t){t=t>>>0;const e=Object.create(Hr.prototype);return e.__wbg_ptr=t,mw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,mw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint8_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint8_deserialize(e,r);if(i[2])throw c(i[1]);return Hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Hr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Hr.prototype[Symbol.dispose]=Hr.prototype.free);const Aw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint80_free(n>>>0,1));class Vr{static __wrap(t){t=t>>>0;const e=Object.create(Vr.prototype);return e.__wbg_ptr=t,Aw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Aw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint80_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint80_deserialize(e,r);if(i[2])throw c(i[1]);return Vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Vr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Vr.prototype[Symbol.dispose]=Vr.prototype.free);const Ew=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint88_free(n>>>0,1));class qr{static __wrap(t){t=t>>>0;const e=Object.create(qr.prototype);return e.__wbg_ptr=t,Ew.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ew.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint88_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint88_deserialize(e,r);if(i[2])throw c(i[1]);return qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return qr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(qr.prototype[Symbol.dispose]=qr.prototype.free);const vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint96_free(n>>>0,1));class Qr{static __wrap(t){t=t>>>0;const e=Object.create(Qr.prototype);return e.__wbg_ptr=t,vw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint96_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint96_deserialize(e,r);if(i[2])throw c(i[1]);return Qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Qr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Qr.prototype[Symbol.dispose]=Qr.prototype.free);const xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint10_free(n>>>0,1));class Kr{static __wrap(t){t=t>>>0;const e=Object.create(Kr.prototype);return e.__wbg_ptr=t,xw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint10_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint10_deserialize(e,r);if(i[2])throw c(i[1]);return Kr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Kr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Kr.prototype[Symbol.dispose]=Kr.prototype.free);const Rw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint1024_free(n>>>0,1));class Wr{static __wrap(t){t=t>>>0;const e=Object.create(Wr.prototype);return e.__wbg_ptr=t,Rw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint1024_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint1024_deserialize(e,r);if(i[2])throw c(i[1]);return Wr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Wr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Wr.prototype[Symbol.dispose]=Wr.prototype.free);const Sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint104_free(n>>>0,1));class Jr{static __wrap(t){t=t>>>0;const e=Object.create(Jr.prototype);return e.__wbg_ptr=t,Sw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint104_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint104_deserialize(e,r);if(i[2])throw c(i[1]);return Jr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Jr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Jr.prototype[Symbol.dispose]=Jr.prototype.free);const zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint112_free(n>>>0,1));class $r{static __wrap(t){t=t>>>0;const e=Object.create($r.prototype);return e.__wbg_ptr=t,zw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint112_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint112_deserialize(e,r);if(i[2])throw c(i[1]);return $r.__wrap(i[0])}safe_serialize(t){const e=s.fheuint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return $r.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&($r.prototype[Symbol.dispose]=$r.prototype.free);const Bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint12_free(n>>>0,1));class Yr{static __wrap(t){t=t>>>0;const e=Object.create(Yr.prototype);return e.__wbg_ptr=t,Bw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint12_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint12_deserialize(e,r);if(i[2])throw c(i[1]);return Yr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Yr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Yr.prototype[Symbol.dispose]=Yr.prototype.free);const kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint120_free(n>>>0,1));class Zr{static __wrap(t){t=t>>>0;const e=Object.create(Zr.prototype);return e.__wbg_ptr=t,kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint120_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint120_deserialize(e,r);if(i[2])throw c(i[1]);return Zr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Zr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Zr.prototype[Symbol.dispose]=Zr.prototype.free);const Pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint128_free(n>>>0,1));class Xr{static __wrap(t){t=t>>>0;const e=Object.create(Xr.prototype);return e.__wbg_ptr=t,Pw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint128_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint128_deserialize(e,r);if(i[2])throw c(i[1]);return Xr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Xr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Xr.prototype[Symbol.dispose]=Xr.prototype.free);const Iw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint136_free(n>>>0,1));class tn{static __wrap(t){t=t>>>0;const e=Object.create(tn.prototype);return e.__wbg_ptr=t,Iw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Iw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint136_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint136_deserialize(e,r);if(i[2])throw c(i[1]);return tn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return tn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(tn.prototype[Symbol.dispose]=tn.prototype.free);const Fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint14_free(n>>>0,1));class en{static __wrap(t){t=t>>>0;const e=Object.create(en.prototype);return e.__wbg_ptr=t,Fw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint14_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint14_deserialize(e,r);if(i[2])throw c(i[1]);return en.__wrap(i[0])}safe_serialize(t){const e=s.fheuint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return en.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(en.prototype[Symbol.dispose]=en.prototype.free);const Ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint144_free(n>>>0,1));class rn{static __wrap(t){t=t>>>0;const e=Object.create(rn.prototype);return e.__wbg_ptr=t,Ow.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ow.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint144_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint144_deserialize(e,r);if(i[2])throw c(i[1]);return rn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return rn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(rn.prototype[Symbol.dispose]=rn.prototype.free);const Tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint152_free(n>>>0,1));class nn{static __wrap(t){t=t>>>0;const e=Object.create(nn.prototype);return e.__wbg_ptr=t,Tw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Tw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint152_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint152_deserialize(e,r);if(i[2])throw c(i[1]);return nn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return nn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(nn.prototype[Symbol.dispose]=nn.prototype.free);const Cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint16_free(n>>>0,1));class sn{static __wrap(t){t=t>>>0;const e=Object.create(sn.prototype);return e.__wbg_ptr=t,Cw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint16_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint16_deserialize(e,r);if(i[2])throw c(i[1]);return sn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return sn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(sn.prototype[Symbol.dispose]=sn.prototype.free);const Nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint160_free(n>>>0,1));class on{static __wrap(t){t=t>>>0;const e=Object.create(on.prototype);return e.__wbg_ptr=t,Nw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint160_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint160_deserialize(e,r);if(i[2])throw c(i[1]);return on.__wrap(i[0])}safe_serialize(t){const e=s.fheuint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return on.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(on.prototype[Symbol.dispose]=on.prototype.free);const Lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint168_free(n>>>0,1));class an{static __wrap(t){t=t>>>0;const e=Object.create(an.prototype);return e.__wbg_ptr=t,Lw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Lw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint168_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint168_deserialize(e,r);if(i[2])throw c(i[1]);return an.__wrap(i[0])}safe_serialize(t){const e=s.fheuint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return an.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(an.prototype[Symbol.dispose]=an.prototype.free);const Dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint176_free(n>>>0,1));class cn{static __wrap(t){t=t>>>0;const e=Object.create(cn.prototype);return e.__wbg_ptr=t,Dw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint176_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint176_deserialize(e,r);if(i[2])throw c(i[1]);return cn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return cn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(cn.prototype[Symbol.dispose]=cn.prototype.free);const Uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint184_free(n>>>0,1));class un{static __wrap(t){t=t>>>0;const e=Object.create(un.prototype);return e.__wbg_ptr=t,Uw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Uw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint184_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint184_deserialize(e,r);if(i[2])throw c(i[1]);return un.__wrap(i[0])}safe_serialize(t){const e=s.fheuint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return un.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(un.prototype[Symbol.dispose]=un.prototype.free);const Mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint192_free(n>>>0,1));class _n{static __wrap(t){t=t>>>0;const e=Object.create(_n.prototype);return e.__wbg_ptr=t,Mw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Mw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint192_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint192_deserialize(e,r);if(i[2])throw c(i[1]);return _n.__wrap(i[0])}safe_serialize(t){const e=s.fheuint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return _n.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(_n.prototype[Symbol.dispose]=_n.prototype.free);const jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2_free(n>>>0,1));class fn{static __wrap(t){t=t>>>0;const e=Object.create(fn.prototype);return e.__wbg_ptr=t,jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2_deserialize(e,r);if(i[2])throw c(i[1]);return fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return fn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(fn.prototype[Symbol.dispose]=fn.prototype.free);const Gw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint200_free(n>>>0,1));class ln{static __wrap(t){t=t>>>0;const e=Object.create(ln.prototype);return e.__wbg_ptr=t,Gw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint200_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint200_deserialize(e,r);if(i[2])throw c(i[1]);return ln.__wrap(i[0])}safe_serialize(t){const e=s.fheuint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ln.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ln.prototype[Symbol.dispose]=ln.prototype.free);const Hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2048_free(n>>>0,1));class hn{static __wrap(t){t=t>>>0;const e=Object.create(hn.prototype);return e.__wbg_ptr=t,Hw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2048_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2048_deserialize(e,r);if(i[2])throw c(i[1]);return hn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(hn.prototype[Symbol.dispose]=hn.prototype.free);const Vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint208_free(n>>>0,1));class pn{static __wrap(t){t=t>>>0;const e=Object.create(pn.prototype);return e.__wbg_ptr=t,Vw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint208_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint208_deserialize(e,r);if(i[2])throw c(i[1]);return pn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(pn.prototype[Symbol.dispose]=pn.prototype.free);const qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint216_free(n>>>0,1));class dn{static __wrap(t){t=t>>>0;const e=Object.create(dn.prototype);return e.__wbg_ptr=t,qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint216_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint216_deserialize(e,r);if(i[2])throw c(i[1]);return dn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dn.prototype[Symbol.dispose]=dn.prototype.free);const Qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint224_free(n>>>0,1));class wn{static __wrap(t){t=t>>>0;const e=Object.create(wn.prototype);return e.__wbg_ptr=t,Qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint224_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint224_deserialize(e,r);if(i[2])throw c(i[1]);return wn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(wn.prototype[Symbol.dispose]=wn.prototype.free);const Kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint232_free(n>>>0,1));class gn{static __wrap(t){t=t>>>0;const e=Object.create(gn.prototype);return e.__wbg_ptr=t,Kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint232_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint232_deserialize(e,r);if(i[2])throw c(i[1]);return gn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return gn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(gn.prototype[Symbol.dispose]=gn.prototype.free);const Ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint24_free(n>>>0,1));class yn{static __wrap(t){t=t>>>0;const e=Object.create(yn.prototype);return e.__wbg_ptr=t,Ww.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ww.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint24_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint24_deserialize(e,r);if(i[2])throw c(i[1]);return yn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return yn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(yn.prototype[Symbol.dispose]=yn.prototype.free);const Jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint240_free(n>>>0,1));class bn{static __wrap(t){t=t>>>0;const e=Object.create(bn.prototype);return e.__wbg_ptr=t,Jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint240_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint240_deserialize(e,r);if(i[2])throw c(i[1]);return bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return bn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(bn.prototype[Symbol.dispose]=bn.prototype.free);const $w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint248_free(n>>>0,1));class mn{static __wrap(t){t=t>>>0;const e=Object.create(mn.prototype);return e.__wbg_ptr=t,$w.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$w.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint248_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint248_deserialize(e,r);if(i[2])throw c(i[1]);return mn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return mn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(mn.prototype[Symbol.dispose]=mn.prototype.free);const Yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint256_free(n>>>0,1));class An{static __wrap(t){t=t>>>0;const e=Object.create(An.prototype);return e.__wbg_ptr=t,Yw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint256_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint256_deserialize(e,r);if(i[2])throw c(i[1]);return An.__wrap(i[0])}safe_serialize(t){const e=s.fheuint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return An.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(An.prototype[Symbol.dispose]=An.prototype.free);const Zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint32_free(n>>>0,1));class En{static __wrap(t){t=t>>>0;const e=Object.create(En.prototype);return e.__wbg_ptr=t,Zw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint32_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint32_deserialize(e,r);if(i[2])throw c(i[1]);return En.__wrap(i[0])}safe_serialize(t){const e=s.fheuint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return En.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(En.prototype[Symbol.dispose]=En.prototype.free);const Xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint4_free(n>>>0,1));class vn{static __wrap(t){t=t>>>0;const e=Object.create(vn.prototype);return e.__wbg_ptr=t,Xw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint4_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint4_deserialize(e,r);if(i[2])throw c(i[1]);return vn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return vn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(vn.prototype[Symbol.dispose]=vn.prototype.free);const tg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint40_free(n>>>0,1));class xn{static __wrap(t){t=t>>>0;const e=Object.create(xn.prototype);return e.__wbg_ptr=t,tg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint40_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint40_deserialize(e,r);if(i[2])throw c(i[1]);return xn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return xn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(xn.prototype[Symbol.dispose]=xn.prototype.free);const eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint48_free(n>>>0,1));class Rn{static __wrap(t){t=t>>>0;const e=Object.create(Rn.prototype);return e.__wbg_ptr=t,eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,eg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint48_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint48_deserialize(e,r);if(i[2])throw c(i[1]);return Rn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Rn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Rn.prototype[Symbol.dispose]=Rn.prototype.free);const rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint512_free(n>>>0,1));class Sn{static __wrap(t){t=t>>>0;const e=Object.create(Sn.prototype);return e.__wbg_ptr=t,rg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint512_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint512_deserialize(e,r);if(i[2])throw c(i[1]);return Sn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Sn.prototype[Symbol.dispose]=Sn.prototype.free);const ng=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint56_free(n>>>0,1));class zn{static __wrap(t){t=t>>>0;const e=Object.create(zn.prototype);return e.__wbg_ptr=t,ng.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ng.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint56_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint56_deserialize(e,r);if(i[2])throw c(i[1]);return zn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return zn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(zn.prototype[Symbol.dispose]=zn.prototype.free);const ig=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint6_free(n>>>0,1));class Bn{static __wrap(t){t=t>>>0;const e=Object.create(Bn.prototype);return e.__wbg_ptr=t,ig.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ig.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint6_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint6_deserialize(e,r);if(i[2])throw c(i[1]);return Bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Bn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Bn.prototype[Symbol.dispose]=Bn.prototype.free);const sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint64_free(n>>>0,1));class kn{static __wrap(t){t=t>>>0;const e=Object.create(kn.prototype);return e.__wbg_ptr=t,sg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint64_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint64_deserialize(e,r);if(i[2])throw c(i[1]);return kn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(kn.prototype[Symbol.dispose]=kn.prototype.free);const og=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint72_free(n>>>0,1));class Pn{static __wrap(t){t=t>>>0;const e=Object.create(Pn.prototype);return e.__wbg_ptr=t,og.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,og.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint72_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint72_deserialize(e,r);if(i[2])throw c(i[1]);return Pn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Pn.prototype[Symbol.dispose]=Pn.prototype.free);const ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint8_free(n>>>0,1));class In{static __wrap(t){t=t>>>0;const e=Object.create(In.prototype);return e.__wbg_ptr=t,ag.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ag.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint8_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint8_deserialize(e,r);if(i[2])throw c(i[1]);return In.__wrap(i[0])}safe_serialize(t){const e=s.fheuint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return In.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(In.prototype[Symbol.dispose]=In.prototype.free);const cg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint80_free(n>>>0,1));class Fn{static __wrap(t){t=t>>>0;const e=Object.create(Fn.prototype);return e.__wbg_ptr=t,cg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint80_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint80_deserialize(e,r);if(i[2])throw c(i[1]);return Fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Fn.prototype[Symbol.dispose]=Fn.prototype.free);const ug=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint88_free(n>>>0,1));class On{static __wrap(t){t=t>>>0;const e=Object.create(On.prototype);return e.__wbg_ptr=t,ug.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ug.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint88_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint88_deserialize(e,r);if(i[2])throw c(i[1]);return On.__wrap(i[0])}safe_serialize(t){const e=s.fheuint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return On.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(On.prototype[Symbol.dispose]=On.prototype.free);const _g=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint96_free(n>>>0,1));class Tn{static __wrap(t){t=t>>>0;const e=Object.create(Tn.prototype);return e.__wbg_ptr=t,_g.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_g.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint96_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint96_deserialize(e,r);if(i[2])throw c(i[1]);return Tn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Tn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Tn.prototype[Symbol.dispose]=Tn.prototype.free);const fg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_provencompactciphertextlist_free(n>>>0,1));class wi{static __wrap(t){t=t>>>0;const e=Object.create(wi.prototype);return e.__wbg_ptr=t,fg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_provencompactciphertextlist_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.provencompactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return wi.__wrap(i[0])}get_kind_of(t){const e=s.provencompactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}safe_serialize(t){const e=s.provencompactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.provencompactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wi.__wrap(o[0])}verify_and_expand(t,e,r){A(t,Ue),A(e,Me);const i=q(r,s.__wbindgen_malloc),o=j,a=s.provencompactciphertextlist_verify_and_expand(this.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,i,o);if(a[2])throw c(a[1]);return di.__wrap(a[0])}expand_without_verification(){const t=s.provencompactciphertextlist_expand_without_verification(this.__wbg_ptr);if(t[2])throw c(t[1]);return di.__wrap(t[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}static builder(t){A(t,Me);const e=s.provencompactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Mi.__wrap(e[0])}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}serialize(){const t=s.provencompactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(wi.prototype[Symbol.dispose]=wi.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortint_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintclientkey_free(n>>>0,1));const Ju=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompactpublickeyencryptionparameters_free(n>>>0,1));class ji{static __wrap(t){t=t>>>0;const e=Object.create(ji.prototype);return e.__wbg_ptr=t,Ju.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ju.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompactpublickeyencryptionparameters_free(t,0)}static new_parameters(t,e,r,i,o,a,u,_){A(e,ms);const l=s.shortintcompactpublickeyencryptionparameters_new_parameters(t,e.__wbg_ptr,r,i,o,a,u,_);if(l[2])throw c(l[1]);return ji.__wrap(l[0])}constructor(t){const e=s.shortintcompactpublickeyencryptionparameters_new(t);return this.__wbg_ptr=e>>>0,Ju.register(this,this.__wbg_ptr,this),this}}Symbol.dispose&&(ji.prototype[Symbol.dispose]=ji.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedpublickey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedserverkey_free(n>>>0,1));const lg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintnoisedistribution_free(n>>>0,1));class ms{static __wrap(t){t=t>>>0;const e=Object.create(ms.prototype);return e.__wbg_ptr=t,lg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintnoisedistribution_free(t,0)}}Symbol.dispose&&(ms.prototype[Symbol.dispose]=ms.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintpublickey_free(n>>>0,1));const hg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheclientkey_free(n>>>0,1));class K{static __wrap(t){t=t>>>0;const e=Object.create(K.prototype);return e.__wbg_ptr=t,hg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheclientkey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfheclientkey_deserialize(e,r);if(i[2])throw c(i[1]);return K.__wrap(i[0])}safe_serialize(t){const e=s.tfheclientkey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfheclientkey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return K.__wrap(o[0])}static generate_with_seed(t,e){A(t,gi);const r=s.tfheclientkey_generate_with_seed(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return K.__wrap(r[0])}static generate(t){A(t,gi);const e=s.tfheclientkey_generate(t.__wbg_ptr);if(e[2])throw c(e[1]);return K.__wrap(e[0])}serialize(){const t=s.tfheclientkey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(K.prototype[Symbol.dispose]=K.prototype.free);const pg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompactpublickey_free(n>>>0,1));class Me{static __wrap(t){t=t>>>0;const e=Object.create(Me.prototype);return e.__wbg_ptr=t,pg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompactpublickey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompactpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return Me.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompactpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompactpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Me.__wrap(o[0])}static safe_deserialize_conformant(t,e,r){const i=q(t,s.__wbindgen_malloc),o=j;A(r,ji);const a=s.tfhecompactpublickey_safe_deserialize_conformant(i,o,e,r.__wbg_ptr);if(a[2])throw c(a[1]);return Me.__wrap(a[0])}static new(t){A(t,K);const e=s.tfhecompactpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return Me.__wrap(e[0])}serialize(){const t=s.tfhecompactpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Me.prototype[Symbol.dispose]=Me.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedcompactpublickey_free(n>>>0,1));const dg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedpublickey_free(n>>>0,1));class dt{static __wrap(t){t=t>>>0;const e=Object.create(dt.prototype);return e.__wbg_ptr=t,dg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompressedpublickey_free(t,0)}decompress(){const t=s.tfhecompressedpublickey_decompress(this.__wbg_ptr);if(t[2])throw c(t[1]);return ht.__wrap(t[0])}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompressedpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return dt.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompressedpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompressedpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dt.__wrap(o[0])}static new(t){A(t,K);const e=s.tfhecompressedpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return dt.__wrap(e[0])}serialize(){const t=s.tfhecompressedpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dt.prototype[Symbol.dispose]=dt.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedserverkey_free(n>>>0,1));const wg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheconfig_free(n>>>0,1));class gi{static __wrap(t){t=t>>>0;const e=Object.create(gi.prototype);return e.__wbg_ptr=t,wg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheconfig_free(t,0)}}Symbol.dispose&&(gi.prototype[Symbol.dispose]=gi.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheconfigbuilder_free(n>>>0,1));const gg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhepublickey_free(n>>>0,1));class ht{static __wrap(t){t=t>>>0;const e=Object.create(ht.prototype);return e.__wbg_ptr=t,gg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhepublickey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhepublickey_deserialize(e,r);if(i[2])throw c(i[1]);return ht.__wrap(i[0])}safe_serialize(t){const e=s.tfhepublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhepublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ht.__wrap(o[0])}static new(t){A(t,K);const e=s.tfhepublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return ht.__wrap(e[0])}serialize(){const t=s.tfhepublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ht.prototype[Symbol.dispose]=ht.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhe_free(n>>>0,1));const yg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_wbg_rayon_poolbuilder_free(n>>>0,1));class As{static __wrap(t){t=t>>>0;const e=Object.create(As.prototype);return e.__wbg_ptr=t,yg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_wbg_rayon_poolbuilder_free(t,0)}numThreads(){return s.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}build(){s.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}receiver(){return s.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}}Symbol.dispose&&(As.prototype[Symbol.dispose]=As.prototype.free);const C2=new Set(["basic","cors","default"]);async function N2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.ok&&C2.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function L2(){const n={};return n.wbg={},n.wbg.__wbg_BigInt_40a77d45cca49470=function(){return ys(function(t){return BigInt(t)},arguments)},n.wbg.__wbg_BigInt_6adbfd8eb0f7ec07=function(t){return BigInt(t)},n.wbg.__wbg_Error_e17e777aac105295=function(t,e){return Error(Ys(t,e))},n.wbg.__wbg_call_13410aac570ffff7=function(){return ys(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_a5400b25a865cfd8=function(){return ys(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(Ys(t,e))}finally{s.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return ys(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_getTime_6bb3f64e0f18f817=function(t){return t.getTime()},n.wbg.__wbg_instanceof_Window_12d20d558ef92592=function(t){let e;try{e=t instanceof Window}catch{e=!1}return e},n.wbg.__wbg_length_6bb7e81f9d7713e4=function(t){return t.length},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},n.wbg.__wbg_new0_b0a0a38c201e6df5=function(){return new Date},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_newnoargs_254190557c45b4ec=function(t,e){return new Function(Ys(t,e))},n.wbg.__wbg_newwithlength_a167dcc7aaa3ba77=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},n.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(t,e,r){Uint8Array.prototype.set.call(Q(t,e),r)},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return ys(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return ys(function(){return module.require},arguments)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=na(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;Hn().setInt32(t+4*1,o,!0),Hn().setInt32(t+4*0,i,!0)},n.wbg.__wbg_startWorkers_2ca11761e08ff5d5=function(t,e,r){return I2(t,e,As.__wrap(r))},n.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12=function(){const t=typeof ta>"u"?null:ta;return Ui(t)?0:Js(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184=function(){const t=typeof globalThis>"u"?null:globalThis;return Ui(t)?0:Js(t)},n.wbg.__wbg_static_accessor_SELF_995b214ae681ff99=function(){const t=typeof self>"u"?null:self;return Ui(t)?0:Js(t)},n.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea=function(){const t=typeof window>"u"?null:window;return Ui(t)?0:Js(t)},n.wbg.__wbg_subarray_70fd07feefe14294=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_toString_1f1286a7a97689fe=function(t,e,r){const i=e.toString(r),o=na(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;Hn().setInt32(t+4*1,a,!0),Hn().setInt32(t+4*0,o,!0)},n.wbg.__wbg_toString_d8f537919ef401d6=function(t){return t.toString()},n.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},n.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1=function(t,e){const r=e,i=typeof r=="bigint"?r:void 0;Hn().setBigInt64(t+8*1,Ui(i)?BigInt(0):i,!0),Hn().setInt32(t+4*0,!Ui(i),!0)},n.wbg.__wbg_wbindgenbitand_24bfc92ff26d44cb=function(t,e){return t&e},n.wbg.__wbg_wbindgenbitor_87169f71f306a104=function(t,e){return t|e},n.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(t,e){const r=Qu(e),i=na(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;Hn().setInt32(t+4*1,o,!0),Hn().setInt32(t+4*0,i,!0)},n.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74=function(t){return typeof t=="function"},n.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(t){return typeof t=="string"},n.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(t){return t===void 0},n.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58=function(t,e){return t===e},n.wbg.__wbg_wbindgenlt_544155a2b3097bd5=function(t,e){return t<e},n.wbg.__wbg_wbindgenmemory_d84da70f7c42d172=function(){return s.memory},n.wbg.__wbg_wbindgenmodule_7e59019f6366ff9c=function(){return Xs.__wbindgen_wasm_module},n.wbg.__wbg_wbindgenneg_3577d8a6fd6fd98b=function(t){return-t},n.wbg.__wbg_wbindgenshl_54c6fe049ff902f0=function(t,e){return t<<e},n.wbg.__wbg_wbindgenshr_7d2aae6044c0dab1=function(t,e){return t>>e},n.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=Ui(i)?0:na(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;Hn().setInt32(t+4*1,a,!0),Hn().setInt32(t+4*0,o,!0)},n.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(t,e){throw new Error(Ys(t,e))},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(t,e){return Ys(t,e)},n.wbg.__wbindgen_cast_2ddd8a25ff58642a=function(t,e){return BigInt.asUintN(64,t)|e<<BigInt(64)},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(t){return BigInt.asUintN(64,t)},n.wbg.__wbindgen_cast_9ae0607507abb057=function(t){return t},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(t,e){return Q(t,e)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(t){return t},n.wbg.__wbindgen_cast_e7b45dd881f38ce3=function(t,e){return BigInt.asUintN(64,t)|BigInt.asUintN(64,e)<<BigInt(64)},n.wbg.__wbindgen_init_externref_table=function(){const t=s.__wbindgen_export_2,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n}function D2(n,t){n.wbg.memory=t||new WebAssembly.Memory({initial:21,maximum:16384,shared:!0})}function U2(n,t,e){if(s=n.exports,Xs.__wbindgen_wasm_module=t,Zs=null,$s=null,typeof e<"u"&&(typeof e!="number"||e===0||e%65536!==0))throw"invalid stack size";return s.__wbindgen_start(e),s}async function Xs(n,t){if(s!==void 0)return s;let e;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n,memory:t,thread_stack_size:e}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/tfhe_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const r=L2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n)),D2(r,t);const{instance:i,module:o}=await N2(await n,r);return U2(i,o,e)}var M2=Object.freeze({__proto__:null,CompactCiphertextList:Vn,CompactCiphertextListBuilder:Mi,CompactCiphertextListExpander:di,CompactPkeCrs:Ue,FheBool:sr,FheInt10:or,FheInt1024:ar,FheInt104:cr,FheInt112:ur,FheInt12:_r,FheInt120:fr,FheInt128:lr,FheInt136:hr,FheInt14:pr,FheInt144:dr,FheInt152:wr,FheInt16:gr,FheInt160:yr,FheInt168:br,FheInt176:mr,FheInt184:Ar,FheInt192:Er,FheInt2:vr,FheInt200:xr,FheInt2048:Rr,FheInt208:Sr,FheInt216:zr,FheInt224:Br,FheInt232:kr,FheInt24:Pr,FheInt240:Ir,FheInt248:Fr,FheInt256:Or,FheInt32:Tr,FheInt4:Cr,FheInt40:Nr,FheInt48:Lr,FheInt512:Dr,FheInt56:Ur,FheInt6:Mr,FheInt64:jr,FheInt72:Gr,FheInt8:Hr,FheInt80:Vr,FheInt88:qr,FheInt96:Qr,FheUint10:Kr,FheUint1024:Wr,FheUint104:Jr,FheUint112:$r,FheUint12:Yr,FheUint120:Zr,FheUint128:Xr,FheUint136:tn,FheUint14:en,FheUint144:rn,FheUint152:nn,FheUint16:sn,FheUint160:on,FheUint168:an,FheUint176:cn,FheUint184:un,FheUint192:_n,FheUint2:fn,FheUint200:ln,FheUint2048:hn,FheUint208:pn,FheUint216:dn,FheUint224:wn,FheUint232:gn,FheUint24:yn,FheUint240:bn,FheUint248:mn,FheUint256:An,FheUint32:En,FheUint4:vn,FheUint40:xn,FheUint48:Rn,FheUint512:Sn,FheUint56:zn,FheUint6:Bn,FheUint64:kn,FheUint72:Pn,FheUint8:In,FheUint80:Fn,FheUint88:On,FheUint96:Tn,ProvenCompactCiphertextList:wi,ShortintCompactPublicKeyEncryptionParameters:ji,ShortintNoiseDistribution:ms,TfheClientKey:K,TfheCompactPublicKey:Me,TfheCompressedPublicKey:dt,TfheConfig:gi,TfhePublicKey:ht,ZkComputeLoad:Id,default:Xs,initThreadPool:Wu,init_panic_hook:Ku,wbg_rayon_PoolBuilder:As,wbg_rayon_start_worker:T2});let tt,ee=0,to=null;function Es(){return(to===null||to.byteLength===0)&&(to=new Uint8Array(tt.memory.buffer)),to}const ia=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},j2=typeof ia.encodeInto=="function"?function(n,t){return ia.encodeInto(n,t)}:function(n,t){const e=ia.encode(n);return t.set(e),{read:n.length,written:e.length}};function Gi(n,t,e){if(e===void 0){const u=ia.encode(n),_=t(u.length,1)>>>0;return Es().subarray(_,_+u.length).set(u),ee=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=Es();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=Es().subarray(i+a,i+r),_=j2(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return ee=a,i}let Hi=null;function Ke(){return(Hi===null||Hi.buffer.detached===!0||Hi.buffer.detached===void 0&&Hi.buffer!==tt.memory.buffer)&&(Hi=new DataView(tt.memory.buffer)),Hi}function vs(n){const t=tt.__externref_table_alloc();return tt.__wbindgen_export_4.set(t,n),t}function Vi(n,t){try{return n.apply(this,t)}catch(e){const r=vs(e);tt.__wbindgen_exn_store(r)}}const bg=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&bg.decode();function eo(n,t){return n=n>>>0,bg.decode(Es().subarray(n,n+t))}function yi(n){return n==null}function $u(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=$u(n[0]));for(let a=1;a<i;a++)o+=", "+$u(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
22
+ ${n.stack}`:r}function qi(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function We(n,t){return n=n>>>0,Es().subarray(n/1,n/1+t)}function Je(n,t){const e=t(n.length*1,1)>>>0;return Es().set(n,e/1),ee=n.length,e}function Qi(n){const t=tt.__wbindgen_export_4.get(n);return tt.__externref_table_dealloc(n),t}function G2(n,t){const e=Gi(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),r=ee,i=tt.new_server_id_addr(n,e,r);if(i[2])throw Qi(i[1]);return Rs.__wrap(i[0])}function mg(n,t){const e=t(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){const i=vs(n[r]);Ke().setUint32(e+4*r,i,!0)}return ee=n.length,e}function H2(n,t,e){const r=mg(n,tt.__wbindgen_malloc),i=ee,o=Gi(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=ee,u=Gi(e,tt.__wbindgen_malloc,tt.__wbindgen_realloc),_=ee,l=tt.new_client(r,i,o,a,u,_);if(l[2])throw Qi(l[1]);return sa.__wrap(l[0])}function Ag(n,t){n=n>>>0;const e=Ke(),r=[];for(let i=n;i<n+4*t;i+=4)r.push(tt.__wbindgen_export_4.get(e.getUint32(i,!0)));return tt.__externref_drop_slice(n,t),r}function V2(){const n=tt.ml_kem_pke_keygen();return Ki.__wrap(n)}function q2(n){qi(n,Ki);const t=tt.ml_kem_pke_get_pk(n.__wbg_ptr);return xs.__wrap(t)}function Q2(n){qi(n,xs);const t=tt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw Qi(t[2]);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function K2(n){qi(n,Ki);const t=tt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw Qi(t[2]);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function W2(n){const t=Je(n,tt.__wbindgen_malloc),e=ee,r=tt.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw Qi(r[1]);return xs.__wrap(r[0])}function J2(n){const t=Je(n,tt.__wbindgen_malloc),e=ee,r=tt.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw Qi(r[1]);return Ki.__wrap(r[0])}function $2(n,t,e,r,i,o,a){qi(n,sa),qi(i,xs),qi(o,Ki);const u=tt.process_user_decryption_resp_from_js(n.__wbg_ptr,t,e,r,i.__wbg_ptr,o.__wbg_ptr,a);if(u[3])throw Qi(u[2]);var _=Ag(u[0],u[1]).slice();return tt.__wbindgen_free(u[0],u[1]*4,4),_}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_ciphertexthandle_free(n>>>0,1));const Eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_client_free(n>>>0,1));class sa{static __wrap(t){t=t>>>0;const e=Object.create(sa.prototype);return e.__wbg_ptr=t,Eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Eg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_client_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_eip712domainmsg_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_parseduserdecryptionrequest_free(n>>>0,1));const vg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_privateenckeymlkem512_free(n>>>0,1));class Ki{static __wrap(t){t=t>>>0;const e=Object.create(Ki.prototype);return e.__wbg_ptr=t,vg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_privateenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_privatesigkey_free(n>>>0,1));const xg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_publicenckeymlkem512_free(n>>>0,1));class xs{static __wrap(t){t=t>>>0;const e=Object.create(xs.prototype);return e.__wbg_ptr=t,xg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_publicenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_publicsigkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_requestid_free(n>>>0,1));const Rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_serveridaddr_free(n>>>0,1));class Rs{static __wrap(t){t=t>>>0;const e=Object.create(Rs.prototype);return e.__wbg_ptr=t,Rg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof Rs?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_serveridaddr_free(t,0)}}const Sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedciphertext_free(n>>>0,1));class ro{static __wrap(t){t=t>>>0;const e=Object.create(ro.prototype);return e.__wbg_ptr=t,Sg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof ro?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedciphertext_free(t,0)}get ciphertext(){const t=tt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get external_handle(){const t=tt.__wbg_get_typedciphertext_external_handle(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get ciphertext_format(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)}set ciphertext_format(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}const zg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedplaintext_free(n>>>0,1));class Yu{static __wrap(t){t=t>>>0;const e=Object.create(Yu.prototype);return e.__wbg_ptr=t,zg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedplaintext_free(t,0)}get bytes(){const t=tt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedplaintext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedplaintext_fhe_type(this.__wbg_ptr,t)}}const Bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class no{static __wrap(t){t=t>>>0;const e=Object.create(no.prototype);return e.__wbg_ptr=t,Bg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof no?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedsigncryptedciphertext_free(t,0)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get signcrypted_ciphertext(){const t=tt.__wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_handle(){const t=tt.__wbg_get_typedsigncryptedciphertext_external_handle(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get packing_factor(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)>>>0}set packing_factor(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_userdecryptionrequest_free(n>>>0,1));const Y2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponse_free(n>>>0,1));class Zu{static __unwrap(t){return t instanceof Zu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Y2.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponse_free(t,0)}get signature(){const t=tt.__wbg_get_userdecryptionresponse_signature(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_signature(){const t=tt.__wbg_get_userdecryptionresponse_external_signature(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get payload(){const t=tt.__wbg_get_userdecryptionresponse_payload(this.__wbg_ptr);return t===0?void 0:oa.__wrap(t)}set payload(t){let e=0;yi(t)||(qi(t,oa),e=t.__destroy_into_raw()),tt.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr,e)}get extra_data(){const t=tt.__wbg_get_userdecryptionresponse_extra_data(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set extra_data(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr,e,r)}}const kg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class oa{static __wrap(t){t=t>>>0;const e=Object.create(oa.prototype);return e.__wbg_ptr=t,kg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=tt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get digest(){const t=tt.__wbg_get_userdecryptionresponsepayload_digest(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get signcrypted_ciphertexts(){const t=tt.__wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);var e=Ag(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*4,4),e}set signcrypted_ciphertexts(t){const e=mg(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr,e,r)}get party_id(){return tt.__wbg_get_userdecryptionresponsepayload_party_id(this.__wbg_ptr)>>>0}set party_id(t){tt.__wbg_set_userdecryptionresponsepayload_party_id(this.__wbg_ptr,t)}get degree(){return tt.__wbg_get_userdecryptionresponsepayload_degree(this.__wbg_ptr)>>>0}set degree(t){tt.__wbg_set_userdecryptionresponsepayload_degree(this.__wbg_ptr,t)}}async function Z2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function X2(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=Gi(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return Vi(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Vi(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_ed58b8e10a292839=function(t){return t.crypto},n.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(eo(t,e))}finally{tt.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return Vi(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return Vi(function(t,e){return Reflect.get(t,e)},arguments)},n.wbg.__wbg_get_b9b93047fe3cf45b=function(t,e){return t[e>>>0]},n.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(t,e){return t[e]},n.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let e;try{e=t instanceof ArrayBuffer}catch{e=!1}return e},n.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let e;try{e=t instanceof Uint8Array}catch{e=!1}return e},n.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},n.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},n.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},n.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},n.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},n.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(t){return t.msCrypto},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(eo(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},n.wbg.__wbg_next_6574e1a8a62d1055=function(){return Vi(function(t){return t.next()},arguments)},n.wbg.__wbg_node_02999533c4ea02e3=function(t){return t.node},n.wbg.__wbg_process_5c1d670bc53614b8=function(t){return t.process},n.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return Vi(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return Vi(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return Rs.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return Rs.__unwrap(t)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=Gi(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof ta>"u"?null:ta;return yi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return yi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return yi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return yi(t)?0:vs(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_typedciphertext_new=function(t){return ro.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return ro.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return Yu.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return no.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return no.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return Zu.__unwrap(t)},n.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},n.wbg.__wbg_versions_c71aa1626a93e0a1=function(t){return t.versions},n.wbg.__wbindgen_as_number=function(t){return+t},n.wbg.__wbindgen_boolean_get=function(t){const e=t;return typeof e=="boolean"?e?1:0:2},n.wbg.__wbindgen_debug_string=function(t,e){const r=$u(e),i=Gi(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(eo(t,e))},n.wbg.__wbindgen_in=function(t,e){return t in e},n.wbg.__wbindgen_init_externref_table=function(){const t=tt.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_null=function(t){return t===null},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_loose_eq=function(t,e){return t==e},n.wbg.__wbindgen_memory=function(){return tt.memory},n.wbg.__wbindgen_number_get=function(t,e){const r=e,i=typeof r=="number"?r:void 0;Ke().setFloat64(t+8*1,yi(i)?0:i,!0),Ke().setInt32(t+4*0,!yi(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=yi(i)?0:Gi(i,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=ee;Ke().setInt32(t+4*1,a,!0),Ke().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return eo(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(eo(t,e))},n}function tA(n,t){return tt=n.exports,Xu.__wbindgen_wasm_module=t,Hi=null,to=null,tt.__wbindgen_start(),tt}async function Xu(n){if(tt!==void 0)return tt;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/kms_lib_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const t=X2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await Z2(await n,t);return tA(e,r)}const eA=BigInt(1024*1024*512),t_=BigInt(1024*1024*512),e_=BigInt(1024*1024*512),io=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",Pg=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},$e=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function qn(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const aa=function(n){if(!n||n?.length===0)return BigInt(0);const t=Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("");return BigInt(`0x${t}`)};function Ig(n){return n.startsWith("0x")?n:`0x${n}`}function rA(n,t){if(t)switch(t.__type){case"BearerToken":n.headers.Authorization=`Bearer ${t.token}`;break;case"ApiKeyHeader":n.headers[t.header||"x-api-key"]=t.value;break;case"ApiKeyCookie":if(typeof window<"u")document.cookie=`${t.cookie||"x-api-key"}=${t.value}; path=/; SameSite=Lax; Secure; HttpOnly;`,n.credentials="include";else{let e=`${t.cookie||"x-api-key"}=${t.value};`;n.headers.Cookie=e}break}return n}function Fg(n){if(n instanceof Error&&typeof n.cause=="object"&&n.cause!==null)return n.cause}function nA(n){const t=Fg(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function iA(n){const t=Fg(n);if(!(!t||!("status"in t)||t.status===void 0)&&typeof t.status=="number")return t.status}async function Og(n,t){let e;if(t.status===429)e="Relayer rate limit exceeded: Please wait and try again later.";else switch(n){case"PUBLIC_DECRYPT":{e=`Public decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"USER_DECRYPT":{e=`User decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"KEY_URL":{e=`HTTP error! status: ${t.status}`;break}default:{const i=await t.text();e=`Relayer didn't response correctly. Bad status ${t.statusText}. Content: ${i}`;break}}const r={code:"RELAYER_FETCH_ERROR",operation:n,status:t.status,statusText:t.statusText,url:t.url};throw new Error(e,{cause:r})}function Tg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't return a JSON";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't return a JSON";break}default:{e="Relayer didn't return a JSON";break}}const r={code:"RELAYER_NO_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Cg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer returned an unexpected JSON response";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer returned an unexpected JSON response";break}default:{e="Relayer returned an unexpected JSON response";break}}const r={code:"RELAYER_UNEXPECTED_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function sA(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Pulbic decrypt failed: the public decryption didn't succeed for an unknown reason";break}case"USER_DECRYPT":{e="User decrypt failed: the user decryption didn't succeed for an unknown reason";break}default:{e="Relayer didn't response correctly.";break}}const r={code:"RELAYER_INTERNAL_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Ng(n,t,e){if(!e)switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't respond";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't respond";break}default:{e="Relayer didn't response correctly. Bad JSON.";break}}const r={code:"RELAYER_UNKNOWN_ERROR",operation:n,error:t};throw new Error(e??"Relayer didn't response correctly.",{cause:r})}function Lg(n){if(!n||typeof n!="object")throw new Error("Unexpected response JSON.");if(!("response"in n&&n.response!==null&&n.response!==void 0))throw new Error("Unexpected response JSON format: missing 'response' property.")}async function r_(n,t,e,r){const i=rA({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},r?.auth);let o,a;try{o=await fetch(t,i)}catch(_){Ng(n,_)}o.ok||await Og(n,o);let u;try{u=await o.json()}catch(_){Tg(n,_)}try{Lg(u),a=u}catch(_){Cg(n,_)}return a}async function oA(n,t){let e,r;try{e=await fetch(t)}catch(o){Ng(n,o)}e.ok||await Og(n,e);let i;try{i=await e.json()}catch(o){Tg(n,o)}try{Lg(i),r=i}catch(o){Cg(n,o)}return r}const n_={},Dg=async(n,t)=>{if(n_[n])return n_[n];const e=await oA("KEY_URL",`${n}/v1/keyurl`);try{let r;if(!t)r=e.response.fhe_key_info[0].fhe_public_key.urls[0],t=e.response.fhe_key_info[0].fhe_public_key.data_id;else{const v=e.response.fhe_key_info.find(I=>I.fhe_public_key.data_id===t);if(!v)throw new Error(`Could not find FHE key info with data_id ${t}`);r=v.fhe_public_key.urls[0]}const i=await fetch(r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status} on ${i.url}`);let o;typeof i.bytes=="function"?o=await i.bytes():o=new Uint8Array(await i.arrayBuffer());const a=e.response.crs[2048].urls[0],u=e.response.crs[2048].data_id,_=await fetch(a);if(!_.ok)throw new Error(`HTTP error! status: ${_.status} on ${_.url}`);let l;typeof _.bytes=="function"?l=await _.bytes():l=new Uint8Array(await _.arrayBuffer());let f;try{f=TFHE.TfheCompactPublicKey.safe_deserialize(o,t_)}catch(v){throw new Error("Invalid public key (deserialization failed)",{cause:v})}let g;try{g=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),e_)}catch(v){throw new Error("Invalid crs (deserialization failed)",{cause:v})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:g,publicParamsId:u}}};return n_[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Ug=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Mg=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],aA=n=>{if(typeof n.network=="string")return new zm(n.network);if(n.network)return new Li(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},cA=async(n,t)=>{if(t.chainId&&typeof t.chainId=="number")return t.chainId;if(t.chainId&&typeof t.chainId!="number")throw new Error("chainId must be a number.");{const e=(await n.getNetwork()).chainId;return Number(e)}},uA=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Dg(io(n.relayerUrl));return{publicKey:t.publicKey,publicKeyId:t.publicKeyId}}else if(n.publicKey&&n.publicKey.data&&n.publicKey.id){const t=n.publicKey.data;try{return{publicKey:TFHE.TfheCompactPublicKey.safe_deserialize(t,t_),publicKeyId:n.publicKey.id}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a public key with its public key ID.")},_A=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Dg(io(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,e_),publicParamsId:n.publicParams[2048].publicParamsId}}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a valid CRS with its CRS ID.")},fA=async(n,t)=>await new ir(t.kmsContractAddress,Ug,n).getKmsSigners(),lA=async(n,t)=>{const r=await new ir(t.kmsContractAddress,Ug,n).getThreshold();return Number(r)},hA=async(n,t)=>await new ir(t.inputVerifierContractAddress,Mg,n).getCoprocessorSigners(),pA=async(n,t)=>{const r=await new ir(t.inputVerifierContractAddress,Mg,n).getThreshold();return Number(r)},i_={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function dA(n){if(n.length!==66)throw new Error(`Handle ${n} is not of valid length`);const t=n.slice(-4,-2).toLowerCase(),e=parseInt(t,16);if(!(e in i_))throw new Error(`Handle ${n} is not of valid type`);return e}function jg(n){let t=0;for(const e of n){if(e.length!==66)throw new Error(`Handle ${e} is not of valid length`);const r=e.slice(-4,-2).toLowerCase(),i=parseInt(r,16);if(!(i in i_))throw new Error(`Handle ${e} is not of valid type`);if(t+=i_[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const ca=n=>Dt(n),wA=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],Gg=10,Hg=BigInt(365);function gA(n,t){if(t===0)return n===BigInt(1);if(t===7)return ca("0x"+n.toString(16).padStart(40,"0"));if(t>8||t==1)throw new Error(`Unsupported handle type ${t}`);return n}function yA(n,t){let e=[];for(const i of n){const o=i.slice(-4,-2).toLowerCase(),a=parseInt(o,16);e.push(a)}const r={};return n.forEach((i,o)=>r[i]=gA(t[o],e[o])),r}function bA(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Hg)throw Error(`durationDays is above max duration of ${Hg}`);const e=BigInt(Math.floor(Date.now()/1e3));if(n>e)throw Error("startTimestamp is set in the future");const r=t*BigInt(86400);if(n+r<e)throw Error("User decrypt request has expired")}const mA=(n,t,e,r,i,o,a,u)=>async(_,l,f,g,y,v,I,k,T)=>{const E="0x00";let R,B;try{R=TKMS.u8vec_to_ml_kem_pke_pk($e(f)),B=TKMS.u8vec_to_ml_kem_pke_sk($e(l))}catch(wt){throw new Error("Invalid public or private key",{cause:wt})}const z=g.replace(/^(0x)/,""),O=f.replace(/^(0x)/,""),C=_.map(wt=>({handle:typeof wt.handle=="string"?qn($e(wt.handle),!0):qn(wt.handle,!0),contractAddress:ca(wt.contractAddress)}));jg(C.map(wt=>wt.handle)),bA(BigInt(I),BigInt(k));const N=new ir(i,wA,a),D=C.map(async({handle:wt,contractAddress:at})=>{const pt=await N.persistAllowed(wt,v),mt=await N.persistAllowed(wt,at);if(!pt)throw new Error(`User ${v} is not authorized to user decrypt handle ${wt}!`);if(!mt)throw new Error(`dapp contract ${at} is not authorized to user decrypt handle ${wt}!`);if(v===at)throw new Error(`userAddress ${v} should not be equal to contractAddress when requesting user decryption!`)}),$=y.length;if($===0)throw Error("contractAddresses is empty");if($>Gg)throw Error(`contractAddresses max length of ${Gg} exceeded`);await Promise.all(D).catch(wt=>{throw wt});const et={handleContractPairs:C,requestValidity:{startTimestamp:I.toString(),durationDays:k.toString()},contractsChainId:e.toString(),contractAddresses:y.map(wt=>ca(wt)),userAddress:ca(v),signature:z,publicKey:O,extraData:E},ft=await r_("USER_DECRYPT",`${o}/v1/user-decrypt`,et,u??T);let L=n.map((wt,at)=>TKMS.new_server_id_addr(at+1,wt));const vt=TKMS.new_client(L,v,"default");try{const wt=new ArrayBuffer(32);new DataView(wt).setUint32(28,t,!1);const mt={name:"Decryption",version:"1",chain_id:new Uint8Array(wt),verifying_contract:r,salt:null},Rt={signature:z,client_address:v,enc_key:O,ciphertext_handles:C.map(W=>W.handle.replace(/^0x/,"")),eip712_verifying_contract:r},Pt=TKMS.process_user_decryption_resp_from_js(vt,Rt,mt,ft.response,R,B,!0).map(W=>aa(W.bytes));return yA(C.map(W=>W.handle),Pt)}catch(wt){throw new Error("An error occured during decryption",{cause:wt})}},Qn=(n,t)=>{if(n==null)throw new Error("Missing value");let e;if(t>=8?e=BigInt(`0x${new Array(t/8).fill(null).reduce(r=>`${r}ff`,"")}`):e=BigInt(2**t-1),typeof n!="number"&&typeof n!="bigint")throw new Error("Value must be a number or a bigint.");if(n>e)throw new Error(`The value exceeds the limit for ${t}bits integer (${e.toString()}).`)},AA=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:o})=>{if(!qe(i))throw new Error("Contract address is not a valid address.");if(!qe(o))throw new Error("User address is not a valid address.");const a=e,u=[],_=TFHE.CompactCiphertextList.builder(a);let l=new Uint8Array;const f=g=>{if(u.reduce((y,v)=>y+Math.max(2,v),0)+g>2048)throw Error("Packing more than 2048 bits in a single input ciphertext is unsupported");if(u.length+1>256)throw Error("Packing more than 256 variables in a single input ciphertext is unsupported")};return{addBool(g){if(g==null)throw new Error("Missing value");if(typeof g!="boolean"&&typeof g!="number"&&typeof g!="bigint")throw new Error("The value must be a boolean, a number or a bigint.");if(Number(g)>1)throw new Error("The value must be 1 or 0.");return Qn(Number(g),1),f(2),_.push_boolean(!!g),u.push(1),this},add8(g){return Qn(g,8),f(8),_.push_u8(Number(g)),u.push(8),this},add16(g){return Qn(g,16),f(16),_.push_u16(Number(g)),u.push(16),this},add32(g){return Qn(g,32),f(32),_.push_u32(Number(g)),u.push(32),this},add64(g){return Qn(g,64),f(64),_.push_u64(BigInt(g)),u.push(64),this},add128(g){return Qn(g,128),f(128),_.push_u128(BigInt(g)),u.push(128),this},addAddress(g){if(!qe(g))throw new Error("The value must be a valid address.");return f(160),_.push_u160(BigInt(g)),u.push(160),this},add256(g){return Qn(g,256),f(256),_.push_u256(BigInt(g)),u.push(256),this},addBytes64(g){if(g.length!==64)throw Error("Uncorrect length of input Uint8Array, should be 64 for an ebytes64");const y=aa(g);return Qn(y,512),f(512),_.push_u512(y),u.push(512),this},addBytes128(g){if(g.length!==128)throw Error("Uncorrect length of input Uint8Array, should be 128 for an ebytes128");const y=aa(g);return Qn(y,1024),f(1024),_.push_u1024(y),u.push(1024),this},addBytes256(g){if(g.length!==256)throw Error("Uncorrect length of input Uint8Array, should be 256 for an ebytes256");const y=aa(g);return Qn(y,2048),f(2048),_.push_u2048(y),u.push(2048),this},getBits(){return u},encrypt(){const y=(()=>{const z=D=>Object.keys(D),O=u.reduce((D,$)=>D+$,0),C=z(r),N=C.find(D=>Number(D)>=O);if(!N)throw new Error(`Too many bits in provided values. Maximum is ${C[C.length-1]}.`);return N})(),v=r[y].publicParams,I=$e(i),k=$e(o),T=$e(n),E=$e(t.toString(16).padStart(64,"0")),R=new Uint8Array(I.length+k.length+T.length+32);return R.set(I,0),R.set(k,20),R.set(T,40),R.set(E,R.length-E.length),l=_.build_with_proof_packed(v,R,TFHE.ZkComputeLoad.Verify).safe_serialize(eA),l}}},Vg={1:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8,512:9,1024:10,2048:11},EA=BigInt("18446744073709551615"),vA="ZK-w_rct",xA="ZK-w_hdl",RA=(n,t,e,r,i)=>{const o=Bd("keccak256").update(Ne.from(vA)).update(Ne.from(n)).digest(),a=Ne.from($e(e)),u=r.toString(16).padStart(64,"0"),_=Ne.from(u,"hex");return t.map((f,g)=>{const y=Vg[f],v=Ne.from([g]),I=Bd("keccak256").update(Ne.from(xA)).update(o).update(v).update(a).update(_).digest(),k=new Uint8Array(32);if(k.set(I,0),BigInt(r)>EA)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const T=$e(u).slice(24,32);return k[21]=g,k.set(T,22),k[30]=y,k[31]=i,k})},qg=n=>Dt(n),SA=()=>0;function zA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate coprocessor signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of coprocessor signers`);return t.length>=e}function BA(n){const t=n.response;return typeof t!="object"||t===null||!("handles"in t&&Array.isArray(t.handles))||!("signatures"in t&&Array.isArray(t.signatures))?!1:t.signatures.every(e=>typeof e=="string")&&t.handles.every(e=>typeof e=="string")}const kA=(n,t,e,r,i,o,a,u,_,l)=>(f,g)=>{if(!qe(f))throw new Error("Contract address is not a valid address.");if(!qe(g))throw new Error("User address is not a valid address.");const y=AA({aclContractAddress:n,chainId:e,tfheCompactPublicKey:o,publicParams:a,contractAddress:f,userAddress:g});return{_input:y,addBool(v){return y.addBool(v),this},add8(v){return y.add8(v),this},add16(v){return y.add16(v),this},add32(v){return y.add32(v),this},add64(v){return y.add64(v),this},add128(v){return y.add128(v),this},add256(v){return y.add256(v),this},addAddress(v){return y.addAddress(v),this},getBits(){return y.getBits()},encrypt:async v=>{const I="0x00",k=y.getBits(),T=y.encrypt(),E={contractAddress:qg(f),userAddress:qg(g),ciphertextWithInputVerification:qn(T),contractChainId:"0x"+e.toString(16),extraData:I},R=await r_("INPUT_PROOF",`${i}/v1/input-proof`,E,v??l);BA(R)||sA("INPUT_PROOF",R);const B=RA(T,k,n,e,SA());if(R.response.handles&&R.response.handles.length>0){const L=R.response.handles.map($e);if(B.length!=L.length)throw new Error(`Incorrect Handles list sizes: (expected) ${B.length} != ${L.length} (received)`);for(let vt=0;vt<B.length;vt+=1){let wt=B[vt],at=L[vt],pt=qn(wt),mt=qn(at);if(pt!==mt)throw new Error(`Incorrect Handle ${vt}: (expected) ${pt} != ${mt} (received)`)}}const z=R.response.signatures,O={name:"InputVerification",version:"1",chainId:r,verifyingContract:t},C={CiphertextVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"userAddress",type:"address"},{name:"contractAddress",type:"address"},{name:"contractChainId",type:"uint256"},{name:"extraData",type:"bytes"}]},N=z.map(L=>{const vt=L.startsWith("0x")?L:`0x${L}`;return Tl(O,C,{ctHandles:B,userAddress:g,contractAddress:f,contractChainId:e,extraData:I},vt)});if(!zA(u,N,_))throw Error("Coprocessor signers threshold is not reached");let $=Pg(B.length);const et=z.length;return $+=Pg(et),B.map(L=>qn(L)).map(L=>$+=L),z.map(L=>$+=L.slice(2)),$+=I.slice(2),{handles:B,inputProof:$e($)}}}},PA=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function IA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate KMS signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of KMS signers`);return t.length>=e}function FA(n){const t=Object.keys(n),e=[],r=[];for(let a=0;a<t.length;++a){const u=t[a],_=dA(u);let l=n[u];typeof l=="boolean"&&(l=l?"0x01":"0x00");const f=BigInt(l);switch(e.push("uint256"),_){case 7:{r.push(`0x${f.toString(16).padStart(40,"0")}`);break}case 0:{if(f!==BigInt(0)&&f!==BigInt(1))throw new Error(`Invalid ebool clear text value ${f}. Expecting 0 or 1.`);r.push(f);break}case 2:case 3:case 4:case 5:case 6:case 7:{r.push(f);break}default:throw new Error(`Unsupported Fhevm primitive type id: ${_}`)}}const o=hi.defaultAbiCoder().encode(e,r);return{abiTypes:e,abiValues:r,abiEncodedClearValues:o}}function OA(n,t){const e=zl(["uint8"],[n.length]),r=zl(Array(n.length).fill("bytes"),n);return te([e,r,t])}const TA={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function CA(n,t){let e=[];for(const l of n){const f=l.slice(-4,-2).toLowerCase(),g=parseInt(f,16);e.push(g)}const r="0x"+"00".repeat(32)+t.slice(2)+"00".repeat(32),i=e.map(l=>TA[l]),u=new hi().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length),_={};return n.forEach((l,f)=>_[l]=u[f]),_}const NA=(n,t,e,r,i,o,a,u)=>async(_,l)=>{const f="0x00",g=new ir(i,PA,a);let y;try{y=await Promise.all(_.map(async et=>{const ft=qn(typeof et=="string"?$e(et):et,!0);if(!await g.isAllowedForDecryption(ft))throw new Error(`Handle ${ft} is not allowed for public decryption!`);return ft}))}catch(et){throw et}jg(y);const v={ciphertextHandles:y,extraData:f},I=await r_("PUBLIC_DECRYPT",`${o}/v1/public-decrypt`,v,l??u),k={name:"Decryption",version:"1",chainId:e,verifyingContract:r},T={PublicDecryptVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"decryptedResult",type:"bytes"},{name:"extraData",type:"bytes"}]},E=I.response[0],R=Ig(E.decrypted_value),B=E.signatures.map(Ig),z="0x",O=B.map(et=>Tl(k,T,{ctHandles:y,decryptedResult:R,extraData:z},et));if(!IA(n,O,t))throw Error("KMS signers threshold is not reached");const N=CA(y,R),D=FA(N),$=OA(B,z);return{clearValues:N,abiEncodedClearValues:D.abiEncodedClearValues,decryptionProof:$}},Qg=(n,t)=>(e,r,i,o,a)=>{const u="0x00";if(a&&!qe(a))throw new Error("Invalid delegated account.");if(!qe(n))throw new Error("Invalid verifying contract address.");if(!r.every(v=>qe(v)))throw new Error("Invalid contract address.");const _=typeof e=="string"?e.startsWith("0x")?e:`0x${e}`:e,l=typeof i=="number"?i.toString():i,f=typeof o=="number"?o.toString():o,g=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],y={name:"Decryption",version:"1",chainId:t,verifyingContract:n};return a?{types:{EIP712Domain:g,DelegatedUserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"},{name:"delegatedAccount",type:"address"}]},primaryType:"DelegatedUserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u,delegatedAccount:a}}:{types:{EIP712Domain:g,UserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"}]},primaryType:"UserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u}}},Kg=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:qn(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:qn(TKMS.ml_kem_pke_sk_to_u8vec(n))}};Ji.fetch=k2(Ji.fetch,{retries:5,retryDelay:500});const LA={aclContractAddress:"0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D",kmsContractAddress:"0xbE0E383937d564D7FF0BC3b46c51f0bF8d5C311A",inputVerifierContractAddress:"0xBBC1fFCdc7C316aAAd72E807D9b0272BE8F84DA0",verifyingContractAddressDecryption:"0x5D8BD78e2ea6bbE41f26dFe9fdaEAa349e077478",verifyingContractAddressInputVerification:"0x483b9dE06E4E4C7D35CCf5837A1668487406D955",chainId:11155111,gatewayChainId:10901,network:"https://eth-sepolia.public.blastapi.io",relayerUrl:"https://relayer.testnet.zama.org"},DA=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:o,gatewayChainId:a,auth:u}=n;if(!i||!qe(i))throw new Error("KMS contract address is not valid or empty");if(!t||!qe(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!qe(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!o||!qe(o))throw new Error("ACL contract address is not valid or empty");if(r&&!(r.data instanceof Uint8Array))throw new Error("publicKey must be a Uint8Array");const _=aA(n);if(!_)throw new Error("No network has been provided!");const l=await cA(_,n),f=await uA(n),g=await _A(n),y=await fA(_,n),v=await lA(_,n),I=await hA(_,n),k=await pA(_,n);return{createEncryptedInput:kA(o,e,l,a,io(n.relayerUrl),f.publicKey,g,I,k),generateKeypair:Kg,createEIP712:Qg(t,l),publicDecrypt:NA(y,v,a,t,o,io(n.relayerUrl),_,u&&{auth:u}),userDecrypt:mA(y,a,l,t,o,io(n.relayerUrl),_,u&&{auth:u}),getPublicKey:()=>f.publicKey?{publicKey:f.publicKey.safe_serialize(t_),publicKeyId:f.publicKeyId}:null,getPublicParams:T=>g[T]?{publicParams:g[T].publicParams.safe_serialize(e_),publicParamsId:g[T].publicParamsId}:null}};let Wg=!1;const UA=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await P2()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
23
23
  `,`'Cross-Origin-Opener-Policy': 'same-origin'
24
- `,"'Cross-Origin-Embedder-Policy': 'require-corp'"),e=void 0),Vg||(await Xs({module_or_path:n}),await Zu({module_or_path:t}),e&&(Qu(),await Ku(e)),Vg=!0),!0);window.TFHE={default:Xs,initThreadPool:Ku,init_panic_hook:Qu,TfheCompactPublicKey:Me,CompactPkeCrs:Ue,CompactCiphertextList:Gn,ZkComputeLoad:zd},window.TKMS={default:Zu,u8vec_to_ml_kem_pke_pk:G2,u8vec_to_ml_kem_pke_sk:H2,new_client:L2,new_server_id_addr:N2,process_user_decryption_resp_from_js:V2,ml_kem_pke_keygen:D2,ml_kem_pke_pk_to_u8vec:M2,ml_kem_pke_sk_to_u8vec:j2,ml_kem_pke_get_pk:U2},Te.ENCRYPTION_TYPES=Mg,Te.SepoliaConfig=BA,Te.createEIP712=Gg,Te.createInstance=kA,Te.generateKeypair=Hg,Te.getErrorCauseCode=Y2,Te.getErrorCauseStatus=Z2,Te.initSDK=PA,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
24
+ `,"'Cross-Origin-Embedder-Policy': 'require-corp'"),e=void 0),Wg||(await Xs({module_or_path:n}),await Xu({module_or_path:t}),e&&(Ku(),await Wu(e)),Wg=!0),!0);window.TFHE={default:Xs,initThreadPool:Wu,init_panic_hook:Ku,TfheCompactPublicKey:Me,CompactPkeCrs:Ue,CompactCiphertextList:Vn,ZkComputeLoad:Id},window.TKMS={default:Xu,u8vec_to_ml_kem_pke_pk:W2,u8vec_to_ml_kem_pke_sk:J2,new_client:H2,new_server_id_addr:G2,process_user_decryption_resp_from_js:$2,ml_kem_pke_keygen:V2,ml_kem_pke_pk_to_u8vec:Q2,ml_kem_pke_sk_to_u8vec:K2,ml_kem_pke_get_pk:q2},Te.ENCRYPTION_TYPES=Vg,Te.SepoliaConfig=LA,Te.createEIP712=Qg,Te.createInstance=DA,Te.generateKeypair=Kg,Te.getErrorCauseCode=nA,Te.getErrorCauseStatus=iA,Te.initSDK=UA,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});