@zama-fhe/relayer-sdk 0.2.0 → 0.3.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/bundle/relayer-sdk-js.js +0 -4
- package/bundle/relayer-sdk-js.umd.cjs +1 -1
- package/lib/node.cjs +0 -4
- package/lib/node.js +0 -4
- package/lib/web.js +0 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<hr/>
|
|
10
10
|
<p align="center">
|
|
11
|
-
|
|
12
|
-
<a href="https://docs.zama.ai/fhevm">📃 Read white paper</a> | <a href="https://docs.zama.ai/fhevm">📒 Read documentation</a> | <a href="https://zama.ai/community">💛 Community support</a>
|
|
11
|
+
<a href="https://docs.zama.ai/protocol/zama-protocol-litepaper">📃 Read white paper</a> | <a href="https://docs.zama.ai/protocol/relayer-sdk-guides">📒 Read documentation</a> | <a href="https://zama.ai/community">💛 Community support</a>
|
|
13
12
|
</p>
|
|
14
13
|
<p align="center">
|
|
15
14
|
<!-- Version badge using shields.io -->
|
package/bundle/relayer-sdk-js.js
CHANGED
|
@@ -32328,7 +32328,6 @@ const zA = (n, t, e, r, i, o, a, u) => async (_, l) => {
|
|
|
32328
32328
|
DelegatedUserDecryptRequestVerification: [
|
|
32329
32329
|
{ name: "publicKey", type: "bytes" },
|
|
32330
32330
|
{ name: "contractAddresses", type: "address[]" },
|
|
32331
|
-
{ name: "contractsChainId", type: "uint256" },
|
|
32332
32331
|
{ name: "startTimestamp", type: "uint256" },
|
|
32333
32332
|
{ name: "durationDays", type: "uint256" },
|
|
32334
32333
|
{ name: "extraData", type: "bytes" },
|
|
@@ -32343,7 +32342,6 @@ const zA = (n, t, e, r, i, o, a, u) => async (_, l) => {
|
|
|
32343
32342
|
message: {
|
|
32344
32343
|
publicKey: _,
|
|
32345
32344
|
contractAddresses: r,
|
|
32346
|
-
contractsChainId: t,
|
|
32347
32345
|
startTimestamp: l,
|
|
32348
32346
|
durationDays: f,
|
|
32349
32347
|
extraData: u,
|
|
@@ -32355,7 +32353,6 @@ const zA = (n, t, e, r, i, o, a, u) => async (_, l) => {
|
|
|
32355
32353
|
UserDecryptRequestVerification: [
|
|
32356
32354
|
{ name: "publicKey", type: "bytes" },
|
|
32357
32355
|
{ name: "contractAddresses", type: "address[]" },
|
|
32358
|
-
{ name: "contractsChainId", type: "uint256" },
|
|
32359
32356
|
{ name: "startTimestamp", type: "uint256" },
|
|
32360
32357
|
{ name: "durationDays", type: "uint256" },
|
|
32361
32358
|
{ name: "extraData", type: "bytes" }
|
|
@@ -32366,7 +32363,6 @@ const zA = (n, t, e, r, i, o, a, u) => async (_, l) => {
|
|
|
32366
32363
|
message: {
|
|
32367
32364
|
publicKey: _,
|
|
32368
32365
|
contractAddresses: r,
|
|
32369
|
-
contractsChainId: t,
|
|
32370
32366
|
startTimestamp: l,
|
|
32371
32367
|
durationDays: f,
|
|
32372
32368
|
extraData: u
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
`)+" "+W.join(`,
|
|
20
20
|
`)+" "+rt[1]:rt[0]+Z+" "+W.join(", ")+" "+rt[1]}n.types=n2();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 S(W){return W==null}n.isNullOrUndefined=S;function B(W){return typeof W=="number"}n.isNumber=B;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)&&dt(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)&&dt(W)==="[object Date]"}n.isDate=nt,n.types.isDate=nt;function ht(W){return J(W)&&(dt(W)==="[object Error]"||W instanceof Error)}n.isError=ht,n.types.isNativeError=ht;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=i2();function dt(W){return Object.prototype.toString.call(W)}function at(W){return W<10?"0"+W.toString(10):W.toString(10)}var lt=["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(),lt[W.getMonth()],Z].join(" ")}n.log=function(){console.log("%s - %s",mt(),n.format.apply(n,arguments))},n.inherits=_s(),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}(yc)),yc}var mu,qp;function s2(){if(qp)return mu;qp=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 _=Qo(),l=_.Buffer,f=Vp(),g=f.inspect,y=g&&g.custom||"inspect";function v(F,k,T){l.prototype.copy.call(F,k,T)}return mu=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,S=0;R;)v(R.data,E,S),S+=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,S=E.data;for(T-=S.length;E=E.next;){var B=E.data,O=T>B.length?B.length:T;if(O===B.length?S+=B:S+=B.slice(0,T),T-=O,T===0){O===B.length?(++R,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=B.slice(O));break}++R}return this.length-=R,S}},{key:"_getBuffer",value:function(T){var E=l.allocUnsafe(T),R=this.head,S=1;for(R.data.copy(E),T-=R.data.length;R=R.next;){var B=R.data,O=T>B.length?B.length:T;if(B.copy(E,E.length-T,0,O),T-=O,T===0){O===B.length?(++S,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=B.slice(O));break}++S}return this.length-=S,E}},{key:y,value:function(T,E){return g(this,t(t({},E),{},{depth:0,customInspect:!1}))}}]),F}(),mu}var Au,Qp;function Kp(){if(Qp)return Au;Qp=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 Au={destroy:n,undestroy:r,errorOrDestroy:o},Au}var Eu={},Wp;function fs(){if(Wp)return Eu;Wp=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"),Eu.codes=t,Eu}var vu,Jp;function $p(){if(Jp)return vu;Jp=1;var n=fs().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 vu={getHighWaterMark:e},vu}var xu,Yp;function o2(){if(Yp)return xu;Yp=1,xu=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(!li.localStorage)return!1}catch{return!1}var r=li.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}return xu}var Ru,Zp;function Xp(){if(Zp)return Ru;Zp=1,Ru=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:o2()},r=Oh(),i=Qo().Buffer,o=(typeof li<"u"?li: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 _=Kp(),l=$p(),f=l.getHighWaterMark,g=fs().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,S=g.ERR_UNKNOWN_ENCODING,B=_.errorOrDestroy;_s()(L,r);function O(){}function C(G,M,X){t=t||ls(),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){lt(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||ls();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(){B(this,new k)};function J(G,M){var X=new R;B(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?(B(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 S(M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ht(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 z=ht(M,ct,_t);ct!==z&&(X=!0,_t="buffer",ct=z)}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 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(G,M,!1,et,ct,_t,x);return ft}function vt(G,M,X,ct,_t,x,z){M.writelen=ct,M.writecb=z,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 dt(G,M,X,ct,_t){--M.pendingcb,X?(Ct.nextTick(_t,ct),Ct.nextTick(Z,G,M),G._writableState.errorEmitted=!0,B(G,ct)):(_t(ct),G._writableState.errorEmitted=!0,B(G,ct),Z(G,M))}function at(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}function lt(G,M){var X=G._writableState,ct=X.sync,_t=X.writecb;if(typeof _t!="function")throw new F;if(at(X),M)dt(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 z=0,et=!0;X;)_t[z]=X,X.isBuf||(et=!1),X=X.next,z+=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,Bt=X.encoding,bt=X.callback,St=M.objectMode?1:ft.length;if(vt(G,M,!1,St,ft,Bt,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&&B(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)},Ru}var zu,tw;function ls(){if(tw)return zu;tw=1;var n=Object.keys||function(l){var f=[];for(var g in l)f.push(g);return f};zu=a;var t=cw(),e=Xp();_s()(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)}}),zu}var Bu={},$o={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ew;function a2(){return ew||(ew=1,function(n,t){var e=Qo(),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)}}($o,$o.exports)),$o.exports}var rw;function nw(){if(rw)return Bu;rw=1;var n=a2().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}Bu.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,S;if(this.lastNeed){if(R=this.fillLast(E),R===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<E.length?R?R+this.text(E,S):this.text(E,S):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,S){var B=R.length-1;if(B<S)return 0;var O=o(R[B]);return O>=0?(O>0&&(E.lastNeed=O-1),O):--B<S||O===-2?0:(O=o(R[B]),O>=0?(O>0&&(E.lastNeed=O-2),O):--B<S||O===-2?0:(O=o(R[B]),O>=0?(O>0&&(O===2?O=0:E.lastNeed=O-3),O):0))}function u(E,R,S){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,S=u(this,E);if(S!==void 0)return S;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 S=a(this,E,R);if(!this.lastNeed)return E.toString("utf8",R);this.lastTotal=S;var B=E.length-(S-this.lastNeed);return E.copy(this.lastChar,0,B),E.toString("utf8",R,B)}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 S=E.toString("utf16le",R);if(S){var B=S.charCodeAt(S.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],S.slice(0,-1)}return S}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 S=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,S)}return R}function v(E,R){var S=(E.length-R)%3;return S===0?E.toString("base64",R):(this.lastNeed=3-S,this.lastTotal=3,S===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-S))}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 Bu}var Su,iw;function ku(){if(iw)return Su;iw=1;var n=fs().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(S){u.call(o,S)},T=function(){var S;if(_&&!v)return(!o._readableState||!o._readableState.ended)&&(S=new n),u.call(o,S);if(l&&!g)return(!o._writableState||!o._writableState.ended)&&(S=new n),u.call(o,S)},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 Su=i,Su}var Pu,sw;function c2(){if(sw)return Pu;sw=1;var n;function t(S,B,O){return B=e(B),B in S?Object.defineProperty(S,B,{value:O,enumerable:!0,configurable:!0,writable:!0}):S[B]=O,S}function e(S){var B=r(S,"string");return typeof B=="symbol"?B:String(B)}function r(S,B){if(typeof S!="object"||S===null)return S;var O=S[Symbol.toPrimitive];if(O!==void 0){var C=O.call(S,B);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(S)}var i=ku(),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),_=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),g=Symbol("stream");function y(S,B){return{value:S,done:B}}function v(S){var B=S[o];if(B!==null){var O=S[g].read();O!==null&&(S[l]=null,S[o]=null,S[a]=null,B(y(O,!1)))}}function F(S){Ct.nextTick(v,S)}function k(S,B){return function(O,C){S.then(function(){if(B[_]){O(y(void 0,!0));return}B[f](O,C)},C)}}var T=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((n={get stream(){return this[g]},next:function(){var B=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(){B[u]?nt(B[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 B=this;return new Promise(function(O,C){B[g].destroy(null,function(N){if(N){C(N);return}O(y(void 0,!0))})})}),n),T),R=function(B){var O,C=Object.create(E,(O={},t(O,g,{value:B,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:B._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(B,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}),B.on("readable",F.bind(null,C)),C};return Pu=R,Pu}var Fu,ow;function u2(){return ow||(ow=1,Fu=function(){throw new Error("Readable.from is not available in the browser")}),Fu}var Iu,aw;function cw(){if(aw)return Iu;aw=1,Iu=J;var n;J.ReadableState=L,Fh().EventEmitter;var t=function(z,et){return z.listeners(et).length},e=Oh(),r=Qo().Buffer,i=(typeof li<"u"?li: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=Vp(),_;u&&u.debuglog?_=u.debuglog("stream"):_=function(){};var l=s2(),f=Kp(),g=$p(),y=g.getHighWaterMark,v=fs().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,S,B;_s()(J,e);var O=f.errorOrDestroy,C=["error","close","destroy","pause","resume"];function N(x,z,et){if(typeof x.prependListener=="function")return x.prependListener(z,et);!x._events||!x._events[z]?x.on(z,et):Array.isArray(x._events[z])?x._events[z].unshift(et):x._events[z]=[et,x._events[z]]}function L(x,z,et){n=n||ls(),x=x||{},typeof et!="boolean"&&(et=z 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=nw().StringDecoder),this.decoder=new R(x.encoding),this.encoding=x.encoding)}function J(x){if(n=n||ls(),!(this instanceof J))return new J(x);var z=this instanceof n;this._readableState=new L(x,this,z),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(z){this._readableState&&(this._readableState.destroyed=z)}}),J.prototype.destroy=f.destroy,J.prototype._undestroy=f.undestroy,J.prototype._destroy=function(x,z){z(x)},J.prototype.push=function(x,z){var et=this._readableState,ft;return et.objectMode?ft=!0:typeof x=="string"&&(z=z||et.defaultEncoding,z!==et.encoding&&(x=r.from(x,z),z=""),ft=!0),nt(this,x,z,!1,ft)},J.prototype.unshift=function(x){return nt(this,x,null,!0,!1)};function nt(x,z,et,ft,Bt){_("readableAddChunk",z);var bt=x._readableState;if(z===null)bt.reading=!1,lt(x,bt);else{var St;if(Bt||(St=D(bt,z)),St)O(x,St);else if(bt.objectMode||z&&z.length>0)if(typeof z!="string"&&!bt.objectMode&&Object.getPrototypeOf(z)!==r.prototype&&(z=o(z)),ft)bt.endEmitted?O(x,new E):ht(x,bt,z,!0);else if(bt.ended)O(x,new k);else{if(bt.destroyed)return!1;bt.reading=!1,bt.decoder&&!et?(z=bt.decoder.write(z),bt.objectMode||z.length!==0?ht(x,bt,z,!1):xt(x,bt)):ht(x,bt,z,!1)}else ft||(bt.reading=!1,xt(x,bt))}return!bt.ended&&(bt.length<bt.highWaterMark||bt.length===0)}function ht(x,z,et,ft){z.flowing&&z.length===0&&!z.sync?(z.awaitDrain=0,x.emit("data",et)):(z.length+=z.objectMode?1:et.length,ft?z.buffer.unshift(et):z.buffer.push(et),z.needReadable&&mt(x)),xt(x,z)}function D(x,z){var et;return!a(z)&&typeof z!="string"&&z!==void 0&&!x.objectMode&&(et=new F("chunk",["string","Buffer","Uint8Array"],z)),et}J.prototype.isPaused=function(){return this._readableState.flowing===!1},J.prototype.setEncoding=function(x){R||(R=nw().StringDecoder);var z=new R(x);this._readableState.decoder=z,this._readableState.encoding=this._readableState.decoder.encoding;for(var et=this._readableState.buffer.head,ft="";et!==null;)ft+=z.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 dt(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,z){return x<=0||z.length===0&&z.ended?0:z.objectMode?1:x!==x?z.flowing&&z.length?z.buffer.head.data.length:z.length:(x>z.highWaterMark&&(z.highWaterMark=dt(x)),x<=z.length?x:z.ended?z.length:(z.needReadable=!0,0))}J.prototype.read=function(x){_("read",x),x=parseInt(x,10);var z=this._readableState,et=x;if(x!==0&&(z.emittedReadable=!1),x===0&&z.needReadable&&((z.highWaterMark!==0?z.length>=z.highWaterMark:z.length>0)||z.ended))return _("read: emitReadable",z.length,z.ended),z.length===0&&z.ended?X(this):mt(this),null;if(x=at(x,z),x===0&&z.ended)return z.length===0&&X(this),null;var ft=z.needReadable;_("need readable",ft),(z.length===0||z.length-x<z.highWaterMark)&&(ft=!0,_("length less than watermark",ft)),z.ended||z.reading?(ft=!1,_("reading or ended",ft)):ft&&(_("do read"),z.reading=!0,z.sync=!0,z.length===0&&(z.needReadable=!0),this._read(z.highWaterMark),z.sync=!1,z.reading||(x=at(et,z)));var Bt;return x>0?Bt=M(x,z):Bt=null,Bt===null?(z.needReadable=z.length<=z.highWaterMark,x=0):(z.length-=x,z.awaitDrain=0),z.length===0&&(z.ended||(z.needReadable=!0),et!==x&&z.ended&&X(this)),Bt!==null&&this.emit("data",Bt),Bt};function lt(x,z){if(_("onEofChunk"),!z.ended){if(z.decoder){var et=z.decoder.end();et&&et.length&&(z.buffer.push(et),z.length+=z.objectMode?1:et.length)}z.ended=!0,z.sync?mt(x):(z.needReadable=!1,z.emittedReadable||(z.emittedReadable=!0,Rt(x)))}}function mt(x){var z=x._readableState;_("emitReadable",z.needReadable,z.emittedReadable),z.needReadable=!1,z.emittedReadable||(_("emitReadable",z.flowing),z.emittedReadable=!0,Ct.nextTick(Rt,x))}function Rt(x){var z=x._readableState;_("emitReadable_",z.destroyed,z.length,z.ended),!z.destroyed&&(z.length||z.ended)&&(x.emit("readable"),z.emittedReadable=!1),z.needReadable=!z.flowing&&!z.ended&&z.length<=z.highWaterMark,G(x)}function xt(x,z){z.readingMore||(z.readingMore=!0,Ct.nextTick(kt,x,z))}function kt(x,z){for(;!z.reading&&!z.ended&&(z.length<z.highWaterMark||z.flowing&&z.length===0);){var et=z.length;if(_("maybeReadMore read 0"),x.read(0),et===z.length)break}z.readingMore=!1}J.prototype._read=function(x){O(this,new T("_read()"))},J.prototype.pipe=function(x,z){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,z);var Bt=(!z||z.end!==!1)&&x!==Ct.stdout&&x!==Ct.stderr,bt=Bt?pe:Be;ft.endEmitted?Ct.nextTick(bt):et.once("end",bt),x.on("unpipe",St);function St(Ie,_e){_("onunpipe"),Ie===et&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,de())}function pe(){_("onend"),x.end()}var it=jt(et);x.on("drain",it);var we=!1;function de(){_("cleanup"),x.removeListener("close",ge),x.removeListener("finish",le),x.removeListener("drain",it),x.removeListener("error",Qt),x.removeListener("unpipe",St),et.removeListener("end",pe),et.removeListener("end",Be),et.removeListener("data",Gt),we=!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)&&!we&&(_("false write response, pause",ft.awaitDrain),ft.awaitDrain++),et.pause())}function Qt(Ie){_("onerror",Ie),Be(),x.removeListener("error",Qt),t(x,"error")===0&&O(x,Ie)}N(x,"error",Qt);function ge(){x.removeListener("finish",le),Be()}x.once("close",ge);function le(){_("onfinish"),x.removeListener("close",ge),Be()}x.once("finish",le);function Be(){_("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 z=this._readableState,et={hasUnpiped:!1};if(z.pipesCount===0)return this;if(z.pipesCount===1)return x&&x!==z.pipes?this:(x||(x=z.pipes),z.pipes=null,z.pipesCount=0,z.flowing=!1,x&&x.emit("unpipe",this,et),this);if(!x){var ft=z.pipes,Bt=z.pipesCount;z.pipes=null,z.pipesCount=0,z.flowing=!1;for(var bt=0;bt<Bt;bt++)ft[bt].emit("unpipe",this,{hasUnpiped:!1});return this}var St=_t(z.pipes,x);return St===-1?this:(z.pipes.splice(St,1),z.pipesCount-=1,z.pipesCount===1&&(z.pipes=z.pipes[0]),x.emit("unpipe",this,et),this)},J.prototype.on=function(x,z){var et=e.prototype.on.call(this,x,z),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,z){var et=e.prototype.removeListener.call(this,x,z);return x==="readable"&&Ct.nextTick(W,this),et},J.prototype.removeAllListeners=function(x){var z=e.prototype.removeAllListeners.apply(this,arguments);return(x==="readable"||x===void 0)&&Ct.nextTick(W,this),z};function W(x){var z=x._readableState;z.readableListening=x.listenerCount("readable")>0,z.resumeScheduled&&!z.paused?z.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,z){z.resumeScheduled||(z.resumeScheduled=!0,Ct.nextTick(gt,x,z))}function gt(x,z){_("resume",z.reading),z.reading||x.read(0),z.resumeScheduled=!1,x.emit("resume"),G(x),z.flowing&&!z.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 z=x._readableState;for(_("flow",z.flowing);z.flowing&&x.read()!==null;);}J.prototype.wrap=function(x){var z=this,et=this._readableState,ft=!1;x.on("end",function(){if(_("wrapped end"),et.decoder&&!et.ended){var St=et.decoder.end();St&&St.length&&z.push(St)}z.push(null)}),x.on("data",function(St){if(_("wrapped data"),et.decoder&&(St=et.decoder.write(St)),!(et.objectMode&&St==null)&&!(!et.objectMode&&(!St||!St.length))){var pe=z.push(St);pe||(ft=!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(St){_("wrapped _read",St),ft&&(ft=!1,x.resume())},this},typeof Symbol=="function"&&(J.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=c2()),S(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(z){this._readableState&&(this._readableState.flowing=z)}}),J._fromList=M,Object.defineProperty(J.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function M(x,z){if(z.length===0)return null;var et;return z.objectMode?et=z.buffer.shift():!x||x>=z.length?(z.decoder?et=z.buffer.join(""):z.buffer.length===1?et=z.buffer.first():et=z.buffer.concat(z.length),z.buffer.clear()):et=z.buffer.consume(x,z.decoder),et}function X(x){var z=x._readableState;_("endReadable",z.endEmitted),z.endEmitted||(z.ended=!0,Ct.nextTick(ct,z,x))}function ct(x,z){if(_("endReadableNT",x.endEmitted,x.length),!x.endEmitted&&x.length===0&&(x.endEmitted=!0,z.readable=!1,z.emit("end"),x.autoDestroy)){var et=z._writableState;(!et||et.autoDestroy&&et.finished)&&z.destroy()}}typeof Symbol=="function"&&(J.from=function(x,z){return B===void 0&&(B=u2()),B(J,x,z)});function _t(x,z){for(var et=0,ft=x.length;et<ft;et++)if(x[et]===z)return et;return-1}return Iu}var Ou,uw;function _w(){if(uw)return Ou;uw=1,Ou=u;var n=fs().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=ls();_s()(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 Ou}var Tu,fw;function _2(){if(fw)return Tu;fw=1,Tu=t;var n=_w();_s()(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)},Tu}var Cu,lw;function f2(){if(lw)return Cu;lw=1;var n;function t(y){var v=!1;return function(){v||(v=!0,y.apply(void 0,arguments))}}var e=fs().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=ku()),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,S){var B=S<v.length-1,O=S>0;return u(R,B,O,function(C){T||(T=C),C&&E.forEach(_),!B&&(E.forEach(_),k(T))})});return v.reduce(l)}return Cu=g,Cu}var hw;function pw(){return hw||(hw=1,function(n,t){t=n.exports=cw(),t.Stream=t,t.Readable=t,t.Writable=Xp(),t.Duplex=ls(),t.Transform=_w(),t.PassThrough=_2(),t.finished=ku(),t.pipeline=f2()}(Ho,Ho.exports)),Ho.exports}var Nu,ww;function l2(){if(ww)return Nu;ww=1;const{Transform:n}=pw();return Nu=t=>class Vg 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(!Je.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 Je.isBuffer(r)||(r=Je.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 Vg(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Nu}var Lu,dw;function h2(){if(dw)return Lu;dw=1;const{Transform:n}=pw();return Lu=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(!Je.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 Je.isBuffer(r)||(r=Je.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}},Lu}var Du,gw;function p2(){if(gw)return Du;gw=1;const n=l2(),t=h2();return Du=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)}}},Du}var Uu={},yw;function w2(){if(yw)return Uu;yw=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 Uu.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,S=t[20]^v,B=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,ht=t[12]^v,D=t[13]^F,vt=t[22]^v,dt=t[23]^F,at=t[32]^v,lt=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,z=t[17]^F,et=t[26]^v,ft=t[27]^F,Bt=t[36]^v,bt=t[37]^F,St=t[46]^v,pe=t[47]^F;v=l^(r<<1|i>>>31),F=f^(i<<1|r>>>31);const it=t[8]^v,we=t[9]^F,de=t[18]^v,Gt=t[19]^F,Qt=t[28]^v,ge=t[29]^F,le=t[38]^v,Be=t[39]^F,Ie=t[48]^v,_e=t[49]^F,Ke=k,b=T,h=R<<4|E>>>28,w=E<<4|R>>>28,P=S<<3|B>>>29,U=B<<3|S>>>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|ht>>>20,wi=ht<<12|D>>>20,Oe=vt<<10|dt>>>22,Gi=dt<<10|vt>>>22,no=lt<<13|at>>>19,We=at<<13|lt>>>19,io=mt<<2|Rt>>>30,m=Rt<<2|mt>>>30,p=kt<<30|xt>>>2,d=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,t_=_t<<28|ct>>>4,e_=z<<23|x>>>9,r_=x<<23|z>>>9,n_=et<<25|ft>>>7,i_=ft<<25|et>>>7,s_=Bt<<21|bt>>>11,o_=bt<<21|Bt>>>11,a_=pe<<24|St>>>8,c_=St<<24|pe>>>8,u_=it<<27|we>>>5,__=we<<27|it>>>5,f_=de<<20|Gt>>>12,l_=Gt<<20|de>>>12,h_=ge<<7|Qt>>>25,p_=Qt<<7|ge>>>25,w_=le<<8|Be>>>24,d_=Be<<8|le>>>24,g_=Ie<<14|_e>>>18,y_=_e<<14|Ie>>>18;t[0]=Ke^~Dt&Y,t[1]=b^~wi&ot,t[10]=Ht^~f_&P,t[11]=t_^~l_&U,t[20]=qt^~I&n_,t[21]=Wt^~H&i_,t[30]=u_^~h&Oe,t[31]=__^~w&Gi,t[40]=p^~e_&h_,t[41]=d^~r_&p_,t[2]=Dt^~Y&s_,t[3]=wi^~ot&o_,t[12]=f_^~P&no,t[13]=l_^~U&We,t[22]=I^~n_&w_,t[23]=H^~i_&d_,t[32]=h^~Oe&Ft,t[33]=w^~Gi&Zt,t[42]=e_^~h_&$,t[43]=r_^~p_&st,t[4]=Y^~s_&g_,t[5]=ot^~o_&y_,t[14]=P^~no&Jt,t[15]=U^~We&Xt,t[24]=n_^~w_&Pt,t[25]=i_^~d_&Vt,t[34]=Oe^~Ft&a_,t[35]=Gi^~Zt&c_,t[44]=h_^~$&io,t[45]=p_^~st&m,t[6]=s_^~g_&Ke,t[7]=o_^~y_&b,t[16]=no^~Jt&Ht,t[17]=We^~Xt&t_,t[26]=w_^~Pt&qt,t[27]=d_^~Vt&Wt,t[36]=Ft^~a_&u_,t[37]=Zt^~c_&__,t[46]=$^~io&p,t[47]=st^~m&d,t[8]=g_^~Ke&Dt,t[9]=y_^~b&wi,t[18]=Jt^~Ht&f_,t[19]=Xt^~t_&l_,t[28]=Pt^~qt&I,t[29]=Vt^~Wt&H,t[38]=a_^~u_&h,t[39]=c_^~__&w,t[48]=io^~p&e_,t[49]=m^~d&r_,t[0]^=n[e*2],t[1]^=n[e*2+1]}},Uu}var Mu,bw;function d2(){if(bw)return Mu;bw=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=Je.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},Mu=t,Mu}var ju,mw;function g2(){return mw||(mw=1,ju=p2()(d2())),ju}var y2=g2();const Aw=Rh(y2);var Yo={exports:{}},b2=Yo.exports,Ew;function m2(){return Ew||(Ew=1,function(n,t){(function(e,r){n.exports=r()})(b2,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 S=typeof Request<"u"&&l instanceof Request?l.clone():l;o(S,f).then(function(B){if(Array.isArray(v)&&v.indexOf(B.status)===-1)F(B);else if(typeof v=="function")try{return Promise.resolve(v(R,null,B)).then(function(O){O?E(R,null,B):F(B)}).catch(k)}catch(O){k(O)}else R<g?E(R,null,B):F(B)}).catch(function(B){if(typeof v=="function")try{Promise.resolve(v(R,B,null)).then(function(O){O?E(R,B,null):k(B)}).catch(function(O){k(O)})}catch(O){k(O)}else R<g?E(R,B,null):k(B)})};function E(R,S,B){var O=typeof y=="function"?y(R,S,B):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})}(Yo)),Yo.exports}var A2=m2();const E2=Rh(A2),v2=()=>(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 Zo=typeof Hi<"u"?Hi:typeof self<"u"?self:typeof window<"u"?window:{};function vw(n,t){return new Promise(e=>{n.addEventListener("message",function r({data:i}){i?.type===t&&(n.removeEventListener("message",r),e(i))})})}vw(self,"wasm_bindgen_worker_init").then(async({init:n,receiver:t})=>{const e=await Promise.resolve().then(function(){return F2});await e.default(n),postMessage({type:"wasm_bindgen_worker_ready"}),e.wbg_rayon_start_worker(t)});async function x2(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 vw(i,"wasm_bindgen_worker_ready"),i})),e.build()}let s;function qs(n){const t=s.__externref_table_alloc();return s.__wbindgen_export_2.set(t,n),t}function hs(n,t){try{return n.apply(this,t)}catch(e){const r=qs(e);s.__wbindgen_exn_store(r)}}const xw=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&xw.decode();let Qs=null;function ps(){return(Qs===null||Qs.buffer!==s.memory.buffer)&&(Qs=new Uint8Array(s.memory.buffer)),Qs}function Ks(n,t){return n=n>>>0,xw.decode(ps().slice(n,n+t))}let j=0;const Rw=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},R2=function(n,t){const e=Rw.encode(n);return t.set(e),{read:n.length,written:e.length}};function Xo(n,t,e){if(e===void 0){const u=Rw.encode(n),_=t(u.length,1)>>>0;return ps().subarray(_,_+u.length).set(u),j=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=ps();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=ps().subarray(i+a,i+r),_=R2(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return j=a,i}let Ws=null;function fr(){return(Ws===null||Ws.buffer!==s.memory.buffer)&&(Ws=new DataView(s.memory.buffer)),Ws}function Ci(n){return n==null}function Gu(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+=Gu(n[0]));for(let a=1;a<i;a++)o+=", "+Gu(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
21
|
${n.stack}`:r}function A(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function c(n){const t=s.__wbindgen_export_2.get(n);return s.__externref_table_dealloc(n),t}function Q(n,t){return n=n>>>0,ps().subarray(n/1,n/1+t)}function q(n,t){const e=t(n.length*1,1)>>>0;return ps().set(n,e/1),j=n.length,e}function Hu(){s.init_panic_hook()}function Vu(n){return s.initThreadPool(n)}function z2(n){s.wbg_rayon_start_worker(n)}const zw=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 Bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlist_free(n>>>0,1));class hi{static __wrap(t){t=t>>>0;const e=Object.create(hi.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_compactciphertextlist_free(t,0)}static builder(t){A(t,nr);const e=s.compactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Js.__wrap(e[0])}len(){return s.compactciphertextlist_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlist_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.compactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}expand(){const t=s.compactciphertextlist_expand(this.__wbg_ptr);if(t[2])throw c(t[1]);return ws.__wrap(t[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}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 hi.__wrap(i[0])}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 hi.__wrap(o[0])}}const Sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistbuilder_free(n>>>0,1));class Js{static __wrap(t){t=t>>>0;const e=Object.create(Js.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_compactciphertextlistbuilder_free(t,0)}push_u24(t){const e=s.compactciphertextlistbuilder_push_u24(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_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_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_u32(t){const e=s.compactciphertextlistbuilder_push_u32(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_i24(t){const e=s.compactciphertextlistbuilder_push_i24(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_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_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_i32(t){const e=s.compactciphertextlistbuilder_push_i32(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_u128(t){const e=s.compactciphertextlistbuilder_push_u128(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_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])}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])}push_i128(t){const e=s.compactciphertextlistbuilder_push_i128(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_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_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_boolean(t){const e=s.compactciphertextlistbuilder_push_boolean(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build(){const t=s.compactciphertextlistbuilder_build(this.__wbg_ptr);if(t[2])throw c(t[1]);return hi.__wrap(t[0])}build_packed(){const t=s.compactciphertextlistbuilder_build_packed(this.__wbg_ptr);if(t[2])throw c(t[1]);return hi.__wrap(t[0])}build_with_proof_packed(t,e,r){A(t,rr);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 ds.__wrap(a[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_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_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_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_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_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_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_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])}}const kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistexpander_free(n>>>0,1));class ws{static __wrap(t){t=t>>>0;const e=Object.create(ws.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_compactciphertextlistexpander_free(t,0)}get_uint24(t){const e=s.compactciphertextlistexpander_get_uint24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Mn.__wrap(e[0])}get_uint40(t){const e=s.compactciphertextlistexpander_get_uint40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Qn.__wrap(e[0])}get_uint48(t){const e=s.compactciphertextlistexpander_get_uint48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Kn.__wrap(e[0])}get_uint56(t){const e=s.compactciphertextlistexpander_get_uint56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Jn.__wrap(e[0])}get_uint72(t){const e=s.compactciphertextlistexpander_get_uint72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Zn.__wrap(e[0])}get_uint80(t){const e=s.compactciphertextlistexpander_get_uint80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ti.__wrap(e[0])}get_uint88(t){const e=s.compactciphertextlistexpander_get_uint88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ei.__wrap(e[0])}get_uint96(t){const e=s.compactciphertextlistexpander_get_uint96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ri.__wrap(e[0])}get_uint104(t){const e=s.compactciphertextlistexpander_get_uint104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yn.__wrap(e[0])}get_uint112(t){const e=s.compactciphertextlistexpander_get_uint112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return bn.__wrap(e[0])}get_uint120(t){const e=s.compactciphertextlistexpander_get_uint120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return An.__wrap(e[0])}get_uint136(t){const e=s.compactciphertextlistexpander_get_uint136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vn.__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 zn.__wrap(e[0])}get_uint168(t){const e=s.compactciphertextlistexpander_get_uint168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kn.__wrap(e[0])}get_uint176(t){const e=s.compactciphertextlistexpander_get_uint176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pn.__wrap(e[0])}get_uint184(t){const e=s.compactciphertextlistexpander_get_uint184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fn.__wrap(e[0])}get_uint192(t){const e=s.compactciphertextlistexpander_get_uint192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return In.__wrap(e[0])}get_uint200(t){const e=s.compactciphertextlistexpander_get_uint200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tn.__wrap(e[0])}get_uint208(t){const e=s.compactciphertextlistexpander_get_uint208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Nn.__wrap(e[0])}get_uint216(t){const e=s.compactciphertextlistexpander_get_uint216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ln.__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 Un.__wrap(e[0])}get_uint240(t){const e=s.compactciphertextlistexpander_get_uint240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return jn.__wrap(e[0])}get_uint248(t){const e=s.compactciphertextlistexpander_get_uint248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Gn.__wrap(e[0])}get_uint256(t){const e=s.compactciphertextlistexpander_get_uint256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Hn.__wrap(e[0])}get_uint2(t){const e=s.compactciphertextlistexpander_get_uint2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return On.__wrap(e[0])}get_uint4(t){const e=s.compactciphertextlistexpander_get_uint4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return qn.__wrap(e[0])}get_uint6(t){const e=s.compactciphertextlistexpander_get_uint6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return $n.__wrap(e[0])}get_uint8(t){const e=s.compactciphertextlistexpander_get_uint8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Xn.__wrap(e[0])}get_uint10(t){const e=s.compactciphertextlistexpander_get_uint10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dn.__wrap(e[0])}get_uint12(t){const e=s.compactciphertextlistexpander_get_uint12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mn.__wrap(e[0])}get_uint14(t){const e=s.compactciphertextlistexpander_get_uint14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xn.__wrap(e[0])}get_uint16(t){const e=s.compactciphertextlistexpander_get_uint16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Bn.__wrap(e[0])}get_uint32(t){const e=s.compactciphertextlistexpander_get_uint32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Vn.__wrap(e[0])}get_uint64(t){const e=s.compactciphertextlistexpander_get_uint64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Yn.__wrap(e[0])}get_uint128(t){const e=s.compactciphertextlistexpander_get_uint128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return En.__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_uint512(t){const e=s.compactciphertextlistexpander_get_uint512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Wn.__wrap(e[0])}get_uint1024(t){const e=s.compactciphertextlistexpander_get_uint1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gn.__wrap(e[0])}get_uint2048(t){const e=s.compactciphertextlistexpander_get_uint2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Cn.__wrap(e[0])}get_int24(t){const e=s.compactciphertextlistexpander_get_int24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Zr.__wrap(e[0])}get_int40(t){const e=s.compactciphertextlistexpander_get_int40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sn.__wrap(e[0])}get_int48(t){const e=s.compactciphertextlistexpander_get_int48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return on.__wrap(e[0])}get_int56(t){const e=s.compactciphertextlistexpander_get_int56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cn.__wrap(e[0])}get_int72(t){const e=s.compactciphertextlistexpander_get_int72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fn.__wrap(e[0])}get_int80(t){const e=s.compactciphertextlistexpander_get_int80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hn.__wrap(e[0])}get_int88(t){const e=s.compactciphertextlistexpander_get_int88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pn.__wrap(e[0])}get_int96(t){const e=s.compactciphertextlistexpander_get_int96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wn.__wrap(e[0])}get_int104(t){const e=s.compactciphertextlistexpander_get_int104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pr.__wrap(e[0])}get_int112(t){const e=s.compactciphertextlistexpander_get_int112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fr.__wrap(e[0])}get_int120(t){const e=s.compactciphertextlistexpander_get_int120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Or.__wrap(e[0])}get_int136(t){const e=s.compactciphertextlistexpander_get_int136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Cr.__wrap(e[0])}get_int144(t){const e=s.compactciphertextlistexpander_get_int144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Lr.__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_int168(t){const e=s.compactciphertextlistexpander_get_int168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return jr.__wrap(e[0])}get_int176(t){const e=s.compactciphertextlistexpander_get_int176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Gr.__wrap(e[0])}get_int184(t){const e=s.compactciphertextlistexpander_get_int184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Hr.__wrap(e[0])}get_int192(t){const e=s.compactciphertextlistexpander_get_int192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Vr.__wrap(e[0])}get_int200(t){const e=s.compactciphertextlistexpander_get_int200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Qr.__wrap(e[0])}get_int208(t){const e=s.compactciphertextlistexpander_get_int208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Wr.__wrap(e[0])}get_int216(t){const e=s.compactciphertextlistexpander_get_int216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Jr.__wrap(e[0])}get_int224(t){const e=s.compactciphertextlistexpander_get_int224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return $r.__wrap(e[0])}get_int232(t){const e=s.compactciphertextlistexpander_get_int232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Yr.__wrap(e[0])}get_int240(t){const e=s.compactciphertextlistexpander_get_int240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Xr.__wrap(e[0])}get_int248(t){const e=s.compactciphertextlistexpander_get_int248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return tn.__wrap(e[0])}get_int2(t){const e=s.compactciphertextlistexpander_get_int2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return qr.__wrap(e[0])}get_int4(t){const e=s.compactciphertextlistexpander_get_int4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return nn.__wrap(e[0])}get_int6(t){const e=s.compactciphertextlistexpander_get_int6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return un.__wrap(e[0])}get_int8(t){const e=s.compactciphertextlistexpander_get_int8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ln.__wrap(e[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 Ir.__wrap(e[0])}get_int14(t){const e=s.compactciphertextlistexpander_get_int14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Nr.__wrap(e[0])}get_int16(t){const e=s.compactciphertextlistexpander_get_int16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ur.__wrap(e[0])}get_int32(t){const e=s.compactciphertextlistexpander_get_int32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return rn.__wrap(e[0])}get_int64(t){const e=s.compactciphertextlistexpander_get_int64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _n.__wrap(e[0])}get_int128(t){const e=s.compactciphertextlistexpander_get_int128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tr.__wrap(e[0])}get_int160(t){const e=s.compactciphertextlistexpander_get_int160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Mr.__wrap(e[0])}get_int256(t){const e=s.compactciphertextlistexpander_get_int256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return en.__wrap(e[0])}get_int512(t){const e=s.compactciphertextlistexpander_get_int512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return an.__wrap(e[0])}get_int1024(t){const e=s.compactciphertextlistexpander_get_int1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kr.__wrap(e[0])}get_int2048(t){const e=s.compactciphertextlistexpander_get_int2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Kr.__wrap(e[0])}get_bool(t){const e=s.compactciphertextlistexpander_get_bool(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Br.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.compactciphertextlistexpander_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}}const Pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactpkecrs_free(n>>>0,1));class rr{static __wrap(t){t=t>>>0;const e=Object.create(rr.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_compactpkecrs_free(t,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}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 rr.__wrap(i[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 rr.__wrap(o[0])}static from_config(t,e){A(t,gs);const r=s.compactpkecrs_from_config(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return rr.__wrap(r[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 rr.__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 rr.__wrap(o[0])}}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 Fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fhebool_free(n>>>0,1));class Br{static __wrap(t){t=t>>>0;const e=Object.create(Br.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_fhebool_free(t,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 Br.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fhebool_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,wt);const r=s.fhebool_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.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}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 Br.__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 Br.__wrap(o[0])}}const Iw=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,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_fheint10_free(t,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,pt);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,wt);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}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])}}const Ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint1024_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_fheint1024_free(t,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 kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint1024_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,wt);const r=s.fheint1024_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.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}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 kr.__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 kr.__wrap(o[0])}}const Tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint104_free(n>>>0,1));class Pr{static __wrap(t){t=t>>>0;const e=Object.create(Pr.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_fheint104_free(t,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 Pr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint104_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,wt);const r=s.fheint104_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.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}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 Pr.__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 Pr.__wrap(o[0])}}const Cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint112_free(n>>>0,1));class Fr{static __wrap(t){t=t>>>0;const e=Object.create(Fr.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_fheint112_free(t,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 Fr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint112_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,wt);const r=s.fheint112_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.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}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 Fr.__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 Fr.__wrap(o[0])}}const Nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint12_free(n>>>0,1));class Ir{static __wrap(t){t=t>>>0;const e=Object.create(Ir.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_fheint12_free(t,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 Ir.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint12_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,wt);const r=s.fheint12_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.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}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 Ir.__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 Ir.__wrap(o[0])}}const Lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint120_free(n>>>0,1));class Or{static __wrap(t){t=t>>>0;const e=Object.create(Or.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_fheint120_free(t,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 Or.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint120_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,wt);const r=s.fheint120_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.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}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 Or.__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 Or.__wrap(o[0])}}const Dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint128_free(n>>>0,1));class Tr{static __wrap(t){t=t>>>0;const e=Object.create(Tr.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_fheint128_free(t,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 Tr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint128_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,wt);const r=s.fheint128_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.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}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 Tr.__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 Tr.__wrap(o[0])}}const Uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint136_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_fheint136_free(t,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 Cr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint136_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,wt);const r=s.fheint136_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.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}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 Cr.__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 Cr.__wrap(o[0])}}const Mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint14_free(n>>>0,1));class Nr{static __wrap(t){t=t>>>0;const e=Object.create(Nr.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_fheint14_free(t,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 Nr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint14_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,wt);const r=s.fheint14_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.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}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 Nr.__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 Nr.__wrap(o[0])}}const jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint144_free(n>>>0,1));class Lr{static __wrap(t){t=t>>>0;const e=Object.create(Lr.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_fheint144_free(t,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 Lr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint144_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,wt);const r=s.fheint144_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.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}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 Lr.__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 Lr.__wrap(o[0])}}const Gw=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,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_fheint152_free(t,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,pt);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,wt);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}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])}}const Hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint16_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_fheint16_free(t,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 Ur.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint16_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,wt);const r=s.fheint16_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.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}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 Ur.__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 Ur.__wrap(o[0])}}const Vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint160_free(n>>>0,1));class Mr{static __wrap(t){t=t>>>0;const e=Object.create(Mr.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_fheint160_free(t,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 Mr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint160_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,wt);const r=s.fheint160_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.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}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 Mr.__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 Mr.__wrap(o[0])}}const qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint168_free(n>>>0,1));class jr{static __wrap(t){t=t>>>0;const e=Object.create(jr.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_fheint168_free(t,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 jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint168_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,wt);const r=s.fheint168_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.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}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 jr.__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 jr.__wrap(o[0])}}const Qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint176_free(n>>>0,1));class Gr{static __wrap(t){t=t>>>0;const e=Object.create(Gr.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_fheint176_free(t,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 Gr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint176_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,wt);const r=s.fheint176_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.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}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 Gr.__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 Gr.__wrap(o[0])}}const Kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint184_free(n>>>0,1));class Hr{static __wrap(t){t=t>>>0;const e=Object.create(Hr.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_fheint184_free(t,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 Hr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint184_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,wt);const r=s.fheint184_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.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}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 Hr.__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 Hr.__wrap(o[0])}}const Ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint192_free(n>>>0,1));class Vr{static __wrap(t){t=t>>>0;const e=Object.create(Vr.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_fheint192_free(t,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 Vr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint192_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,wt);const r=s.fheint192_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.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}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 Vr.__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 Vr.__wrap(o[0])}}const Jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2_free(n>>>0,1));class qr{static __wrap(t){t=t>>>0;const e=Object.create(qr.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_fheint2_free(t,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 qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint2_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,wt);const r=s.fheint2_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.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}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 qr.__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 qr.__wrap(o[0])}}const $w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint200_free(n>>>0,1));class Qr{static __wrap(t){t=t>>>0;const e=Object.create(Qr.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_fheint200_free(t,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 Qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint200_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,wt);const r=s.fheint200_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.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}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 Qr.__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 Qr.__wrap(o[0])}}const Yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2048_free(n>>>0,1));class Kr{static __wrap(t){t=t>>>0;const e=Object.create(Kr.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_fheint2048_free(t,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 Kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint2048_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,wt);const r=s.fheint2048_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.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}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 Kr.__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 Kr.__wrap(o[0])}}const Zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint208_free(n>>>0,1));class Wr{static __wrap(t){t=t>>>0;const e=Object.create(Wr.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_fheint208_free(t,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 Wr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint208_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,wt);const r=s.fheint208_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.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}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 Wr.__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 Wr.__wrap(o[0])}}const Xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint216_free(n>>>0,1));class Jr{static __wrap(t){t=t>>>0;const e=Object.create(Jr.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_fheint216_free(t,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 Jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint216_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,wt);const r=s.fheint216_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.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}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 Jr.__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 Jr.__wrap(o[0])}}const td=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint224_free(n>>>0,1));class $r{static __wrap(t){t=t>>>0;const e=Object.create($r.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_fheint224_free(t,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 $r.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint224_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,wt);const r=s.fheint224_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.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}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 $r.__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 $r.__wrap(o[0])}}const ed=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint232_free(n>>>0,1));class Yr{static __wrap(t){t=t>>>0;const e=Object.create(Yr.prototype);return e.__wbg_ptr=t,ed.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ed.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint232_free(t,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 Yr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint232_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,wt);const r=s.fheint232_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.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}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 Yr.__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 Yr.__wrap(o[0])}}const rd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint24_free(n>>>0,1));class Zr{static __wrap(t){t=t>>>0;const e=Object.create(Zr.prototype);return e.__wbg_ptr=t,rd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint24_free(t,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 Zr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint24_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,wt);const r=s.fheint24_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.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}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 Zr.__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 Zr.__wrap(o[0])}}const nd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint240_free(n>>>0,1));class Xr{static __wrap(t){t=t>>>0;const e=Object.create(Xr.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_fheint240_free(t,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 Xr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint240_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,wt);const r=s.fheint240_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.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}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 Xr.__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 Xr.__wrap(o[0])}}const id=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint248_free(n>>>0,1));class tn{static __wrap(t){t=t>>>0;const e=Object.create(tn.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_fheint248_free(t,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 tn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint248_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,wt);const r=s.fheint248_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.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}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 tn.__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 tn.__wrap(o[0])}}const sd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint256_free(n>>>0,1));class en{static __wrap(t){t=t>>>0;const e=Object.create(en.prototype);return e.__wbg_ptr=t,sd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint256_free(t,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 en.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint256_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,wt);const r=s.fheint256_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.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}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 en.__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 en.__wrap(o[0])}}const od=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint32_free(n>>>0,1));class rn{static __wrap(t){t=t>>>0;const e=Object.create(rn.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_fheint32_free(t,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 rn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint32_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,wt);const r=s.fheint32_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.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}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 rn.__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 rn.__wrap(o[0])}}const ad=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint4_free(n>>>0,1));class nn{static __wrap(t){t=t>>>0;const e=Object.create(nn.prototype);return e.__wbg_ptr=t,ad.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ad.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint4_free(t,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 nn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint4_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,wt);const r=s.fheint4_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.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}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 nn.__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 nn.__wrap(o[0])}}const cd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint40_free(n>>>0,1));class sn{static __wrap(t){t=t>>>0;const e=Object.create(sn.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_fheint40_free(t,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 sn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint40_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,wt);const r=s.fheint40_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.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}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 sn.__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 sn.__wrap(o[0])}}const ud=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint48_free(n>>>0,1));class on{static __wrap(t){t=t>>>0;const e=Object.create(on.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_fheint48_free(t,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 on.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint48_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,wt);const r=s.fheint48_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.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}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 on.__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 on.__wrap(o[0])}}const _d=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint512_free(n>>>0,1));class an{static __wrap(t){t=t>>>0;const e=Object.create(an.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_fheint512_free(t,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 an.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint512_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,wt);const r=s.fheint512_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.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}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 an.__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 an.__wrap(o[0])}}const fd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint56_free(n>>>0,1));class cn{static __wrap(t){t=t>>>0;const e=Object.create(cn.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_fheint56_free(t,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 cn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint56_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,wt);const r=s.fheint56_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.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}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 cn.__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 cn.__wrap(o[0])}}const ld=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint6_free(n>>>0,1));class un{static __wrap(t){t=t>>>0;const e=Object.create(un.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_fheint6_free(t,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 un.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint6_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,wt);const r=s.fheint6_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.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}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 un.__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 un.__wrap(o[0])}}const hd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint64_free(n>>>0,1));class _n{static __wrap(t){t=t>>>0;const e=Object.create(_n.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_fheint64_free(t,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 _n.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint64_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,wt);const r=s.fheint64_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.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}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 _n.__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 _n.__wrap(o[0])}}const pd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint72_free(n>>>0,1));class fn{static __wrap(t){t=t>>>0;const e=Object.create(fn.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_fheint72_free(t,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 fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint72_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,wt);const r=s.fheint72_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.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}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 fn.__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 fn.__wrap(o[0])}}const wd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint8_free(n>>>0,1));class ln{static __wrap(t){t=t>>>0;const e=Object.create(ln.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_fheint8_free(t,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 ln.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint8_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,wt);const r=s.fheint8_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.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}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 ln.__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 ln.__wrap(o[0])}}const dd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint80_free(n>>>0,1));class hn{static __wrap(t){t=t>>>0;const e=Object.create(hn.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_fheint80_free(t,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 hn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint80_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,wt);const r=s.fheint80_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.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}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 hn.__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 hn.__wrap(o[0])}}const gd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint88_free(n>>>0,1));class pn{static __wrap(t){t=t>>>0;const e=Object.create(pn.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_fheint88_free(t,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 pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint88_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,wt);const r=s.fheint88_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.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}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 pn.__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 pn.__wrap(o[0])}}const yd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint96_free(n>>>0,1));class wn{static __wrap(t){t=t>>>0;const e=Object.create(wn.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_fheint96_free(t,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 wn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheint96_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,wt);const r=s.fheint96_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.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}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 wn.__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 wn.__wrap(o[0])}}const bd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint10_free(n>>>0,1));class dn{static __wrap(t){t=t>>>0;const e=Object.create(dn.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_fheuint10_free(t,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 dn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint10_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,wt);const r=s.fheuint10_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.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}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 dn.__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 dn.__wrap(o[0])}}const md=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint1024_free(n>>>0,1));class gn{static __wrap(t){t=t>>>0;const e=Object.create(gn.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_fheuint1024_free(t,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 gn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint1024_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,wt);const r=s.fheuint1024_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.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}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 gn.__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 gn.__wrap(o[0])}}const Ad=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint104_free(n>>>0,1));class yn{static __wrap(t){t=t>>>0;const e=Object.create(yn.prototype);return e.__wbg_ptr=t,Ad.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ad.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint104_free(t,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 yn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint104_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,wt);const r=s.fheuint104_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.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}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 yn.__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 yn.__wrap(o[0])}}const Ed=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint112_free(n>>>0,1));class bn{static __wrap(t){t=t>>>0;const e=Object.create(bn.prototype);return e.__wbg_ptr=t,Ed.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ed.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint112_free(t,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 bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint112_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,wt);const r=s.fheuint112_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.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}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 bn.__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 bn.__wrap(o[0])}}const vd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint12_free(n>>>0,1));class mn{static __wrap(t){t=t>>>0;const e=Object.create(mn.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_fheuint12_free(t,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 mn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint12_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,wt);const r=s.fheuint12_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.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}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 mn.__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 mn.__wrap(o[0])}}const xd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint120_free(n>>>0,1));class An{static __wrap(t){t=t>>>0;const e=Object.create(An.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_fheuint120_free(t,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 An.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint120_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,wt);const r=s.fheuint120_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.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}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 An.__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 An.__wrap(o[0])}}const Rd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint128_free(n>>>0,1));class En{static __wrap(t){t=t>>>0;const e=Object.create(En.prototype);return e.__wbg_ptr=t,Rd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint128_free(t,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 En.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint128_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,wt);const r=s.fheuint128_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.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}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 En.__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 En.__wrap(o[0])}}const zd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint136_free(n>>>0,1));class vn{static __wrap(t){t=t>>>0;const e=Object.create(vn.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_fheuint136_free(t,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 vn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint136_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,wt);const r=s.fheuint136_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.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}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 vn.__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 vn.__wrap(o[0])}}const Bd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint14_free(n>>>0,1));class xn{static __wrap(t){t=t>>>0;const e=Object.create(xn.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_fheuint14_free(t,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 xn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint14_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,wt);const r=s.fheuint14_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.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}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 xn.__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 xn.__wrap(o[0])}}const Sd=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,Sd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint144_free(t,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,pt);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,wt);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}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])}}const kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint152_free(n>>>0,1));class zn{static __wrap(t){t=t>>>0;const e=Object.create(zn.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_fheuint152_free(t,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 zn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint152_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,wt);const r=s.fheuint152_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.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}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 zn.__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 zn.__wrap(o[0])}}const Pd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint16_free(n>>>0,1));class Bn{static __wrap(t){t=t>>>0;const e=Object.create(Bn.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_fheuint16_free(t,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 Bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint16_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,wt);const r=s.fheuint16_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.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}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 Bn.__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 Bn.__wrap(o[0])}}const Fd=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,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_fheuint160_free(t,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,pt);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,wt);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}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])}}const Id=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint168_free(n>>>0,1));class kn{static __wrap(t){t=t>>>0;const e=Object.create(kn.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_fheuint168_free(t,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 kn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint168_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,wt);const r=s.fheuint168_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.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}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 kn.__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 kn.__wrap(o[0])}}const Od=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint176_free(n>>>0,1));class Pn{static __wrap(t){t=t>>>0;const e=Object.create(Pn.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_fheuint176_free(t,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 Pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint176_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,wt);const r=s.fheuint176_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.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}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 Pn.__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 Pn.__wrap(o[0])}}const Td=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint184_free(n>>>0,1));class Fn{static __wrap(t){t=t>>>0;const e=Object.create(Fn.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_fheuint184_free(t,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 Fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint184_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,wt);const r=s.fheuint184_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.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}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 Fn.__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 Fn.__wrap(o[0])}}const Cd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint192_free(n>>>0,1));class In{static __wrap(t){t=t>>>0;const e=Object.create(In.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_fheuint192_free(t,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 In.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint192_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,wt);const r=s.fheuint192_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.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}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 In.__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 In.__wrap(o[0])}}const Nd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2_free(n>>>0,1));class On{static __wrap(t){t=t>>>0;const e=Object.create(On.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_fheuint2_free(t,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 On.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint2_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,wt);const r=s.fheuint2_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.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}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 On.__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 On.__wrap(o[0])}}const Ld=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint200_free(n>>>0,1));class Tn{static __wrap(t){t=t>>>0;const e=Object.create(Tn.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_fheuint200_free(t,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 Tn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint200_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,wt);const r=s.fheuint200_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.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}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 Tn.__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 Tn.__wrap(o[0])}}const Dd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2048_free(n>>>0,1));class Cn{static __wrap(t){t=t>>>0;const e=Object.create(Cn.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_fheuint2048_free(t,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 Cn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint2048_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,wt);const r=s.fheuint2048_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.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}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 Cn.__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 Cn.__wrap(o[0])}}const Ud=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint208_free(n>>>0,1));class Nn{static __wrap(t){t=t>>>0;const e=Object.create(Nn.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_fheuint208_free(t,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 Nn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint208_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,wt);const r=s.fheuint208_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.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}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 Nn.__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 Nn.__wrap(o[0])}}const Md=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint216_free(n>>>0,1));class Ln{static __wrap(t){t=t>>>0;const e=Object.create(Ln.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_fheuint216_free(t,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 Ln.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint216_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,wt);const r=s.fheuint216_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.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}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 Ln.__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 Ln.__wrap(o[0])}}const jd=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,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_fheuint224_free(t,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,pt);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,wt);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}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])}}const Gd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint232_free(n>>>0,1));class Un{static __wrap(t){t=t>>>0;const e=Object.create(Un.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_fheuint232_free(t,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 Un.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint232_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,wt);const r=s.fheuint232_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.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}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 Un.__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 Un.__wrap(o[0])}}const Hd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint24_free(n>>>0,1));class Mn{static __wrap(t){t=t>>>0;const e=Object.create(Mn.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_fheuint24_free(t,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 Mn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint24_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,wt);const r=s.fheuint24_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.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}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 Mn.__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 Mn.__wrap(o[0])}}const Vd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint240_free(n>>>0,1));class jn{static __wrap(t){t=t>>>0;const e=Object.create(jn.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_fheuint240_free(t,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 jn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,wt);const r=s.fheuint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jn.__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}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 jn.__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 jn.__wrap(o[0])}}const qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint248_free(n>>>0,1));class Gn{static __wrap(t){t=t>>>0;const e=Object.create(Gn.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_fheuint248_free(t,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 Gn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint248_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,wt);const r=s.fheuint248_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.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}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 Gn.__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 Gn.__wrap(o[0])}}const Qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint256_free(n>>>0,1));class Hn{static __wrap(t){t=t>>>0;const e=Object.create(Hn.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_fheuint256_free(t,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 Hn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint256_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,wt);const r=s.fheuint256_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.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}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 Hn.__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 Hn.__wrap(o[0])}}const Kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint32_free(n>>>0,1));class Vn{static __wrap(t){t=t>>>0;const e=Object.create(Vn.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_fheuint32_free(t,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 Vn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint32_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,wt);const r=s.fheuint32_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.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}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 Vn.__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 Vn.__wrap(o[0])}}const Wd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint4_free(n>>>0,1));class qn{static __wrap(t){t=t>>>0;const e=Object.create(qn.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_fheuint4_free(t,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 qn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,wt);const r=s.fheuint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qn.__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}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 qn.__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 qn.__wrap(o[0])}}const Jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint40_free(n>>>0,1));class Qn{static __wrap(t){t=t>>>0;const e=Object.create(Qn.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_fheuint40_free(t,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 Qn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,wt);const r=s.fheuint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qn.__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}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 Qn.__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 Qn.__wrap(o[0])}}const $d=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint48_free(n>>>0,1));class Kn{static __wrap(t){t=t>>>0;const e=Object.create(Kn.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_fheuint48_free(t,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 Kn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint48_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,wt);const r=s.fheuint48_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.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}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 Kn.__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 Kn.__wrap(o[0])}}const Yd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint512_free(n>>>0,1));class Wn{static __wrap(t){t=t>>>0;const e=Object.create(Wn.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_fheuint512_free(t,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 Wn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint512_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,wt);const r=s.fheuint512_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.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}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 Wn.__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 Wn.__wrap(o[0])}}const Zd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint56_free(n>>>0,1));class Jn{static __wrap(t){t=t>>>0;const e=Object.create(Jn.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_fheuint56_free(t,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 Jn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,wt);const r=s.fheuint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jn.__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}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 Jn.__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 Jn.__wrap(o[0])}}const Xd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint6_free(n>>>0,1));class $n{static __wrap(t){t=t>>>0;const e=Object.create($n.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_fheuint6_free(t,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 $n.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint6_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,wt);const r=s.fheuint6_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.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}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 $n.__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 $n.__wrap(o[0])}}const tg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint64_free(n>>>0,1));class Yn{static __wrap(t){t=t>>>0;const e=Object.create(Yn.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_fheuint64_free(t,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 Yn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint64_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,wt);const r=s.fheuint64_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.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}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 Yn.__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 Yn.__wrap(o[0])}}const eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint72_free(n>>>0,1));class Zn{static __wrap(t){t=t>>>0;const e=Object.create(Zn.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_fheuint72_free(t,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 Zn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint72_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,wt);const r=s.fheuint72_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.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}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 Zn.__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 Zn.__wrap(o[0])}}const rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint8_free(n>>>0,1));class Xn{static __wrap(t){t=t>>>0;const e=Object.create(Xn.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_fheuint8_free(t,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 Xn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint8_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,wt);const r=s.fheuint8_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.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}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 Xn.__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 Xn.__wrap(o[0])}}const ng=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint80_free(n>>>0,1));class ti{static __wrap(t){t=t>>>0;const e=Object.create(ti.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_fheuint80_free(t,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 ti.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ti.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,wt);const r=s.fheuint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ti.__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}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 ti.__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 ti.__wrap(o[0])}}const ig=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint88_free(n>>>0,1));class ei{static __wrap(t){t=t>>>0;const e=Object.create(ei.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_fheuint88_free(t,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 ei.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ei.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,wt);const r=s.fheuint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ei.__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}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 ei.__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 ei.__wrap(o[0])}}const sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint96_free(n>>>0,1));class ri{static __wrap(t){t=t>>>0;const e=Object.create(ri.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_fheuint96_free(t,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 ri.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,pt);const r=s.fheuint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ri.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,wt);const r=s.fheuint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ri.__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}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 ri.__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 ri.__wrap(o[0])}}const og=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_provencompactciphertextlist_free(n>>>0,1));class ds{static __wrap(t){t=t>>>0;const e=Object.create(ds.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_provencompactciphertextlist_free(t,0)}static builder(t){A(t,nr);const e=s.provencompactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Js.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.provencompactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}verify_and_expand(t,e,r){A(t,rr),A(e,nr);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 ws.__wrap(a[0])}expand_without_verification(){const t=s.provencompactciphertextlist_expand_without_verification(this.__wbg_ptr);if(t[2])throw c(t[1]);return ws.__wrap(t[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}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 ds.__wrap(i[0])}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 ds.__wrap(o[0])}}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 qu=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompactpublickeyencryptionparameters_free(n>>>0,1));class $s{static __wrap(t){t=t>>>0;const e=Object.create($s.prototype);return e.__wbg_ptr=t,qu.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qu.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompactpublickeyencryptionparameters_free(t,0)}constructor(t){const e=s.shortintcompactpublickeyencryptionparameters_new(t);return this.__wbg_ptr=e>>>0,qu.register(this,this.__wbg_ptr,this),this}static new_parameters(t,e,r,i,o,a,u,_){A(e,ta);const l=s.shortintcompactpublickeyencryptionparameters_new_parameters(t,e.__wbg_ptr,r,i,o,a,u,_);if(l[2])throw c(l[1]);return $s.__wrap(l[0])}}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 ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintnoisedistribution_free(n>>>0,1));class ta{static __wrap(t){t=t>>>0;const e=Object.create(ta.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_shortintnoisedistribution_free(t,0)}}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 cg=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,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_tfheclientkey_free(t,0)}static generate(t){A(t,gs);const e=s.tfheclientkey_generate(t.__wbg_ptr);if(e[2])throw c(e[1]);return K.__wrap(e[0])}static generate_with_seed(t,e){A(t,gs);const r=s.tfheclientkey_generate_with_seed(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return K.__wrap(r[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}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])}}const ug=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompactpublickey_free(n>>>0,1));class nr{static __wrap(t){t=t>>>0;const e=Object.create(nr.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_tfhecompactpublickey_free(t,0)}static new(t){A(t,K);const e=s.tfhecompactpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return nr.__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}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 nr.__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 nr.__wrap(o[0])}static safe_deserialize_conformant(t,e,r){const i=q(t,s.__wbindgen_malloc),o=j;A(r,$s);const a=s.tfhecompactpublickey_safe_deserialize_conformant(i,o,e,r.__wbg_ptr);if(a[2])throw c(a[1]);return nr.__wrap(a[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedcompactpublickey_free(n>>>0,1));const _g=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedpublickey_free(n>>>0,1));class wt{static __wrap(t){t=t>>>0;const e=Object.create(wt.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_tfhecompressedpublickey_free(t,0)}static new(t){A(t,K);const e=s.tfhecompressedpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return wt.__wrap(e[0])}decompress(){const t=s.tfhecompressedpublickey_decompress(this.__wbg_ptr);if(t[2])throw c(t[1]);return pt.__wrap(t[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}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 wt.__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 wt.__wrap(o[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedserverkey_free(n>>>0,1));const fg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheconfig_free(n>>>0,1));class gs{static __wrap(t){t=t>>>0;const e=Object.create(gs.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_tfheconfig_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheconfigbuilder_free(n>>>0,1));const lg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhepublickey_free(n>>>0,1));class pt{static __wrap(t){t=t>>>0;const e=Object.create(pt.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_tfhepublickey_free(t,0)}static new(t){A(t,K);const e=s.tfhepublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return pt.__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}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 pt.__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 pt.__wrap(o[0])}}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 hg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_wbg_rayon_poolbuilder_free(n>>>0,1));class ea{static __wrap(t){t=t>>>0;const e=Object.create(ea.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_wbg_rayon_poolbuilder_free(t,0)}numThreads(){return s.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}receiver(){return s.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}build(){s.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}}async function B2(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 S2(){const n={};return n.wbg={},n.wbg.__wbg_BigInt_470dd987b8190f8e=function(t){return BigInt(t)},n.wbg.__wbg_BigInt_ddea6d2f55558acb=function(){return hs(function(t){return BigInt(t)},arguments)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return hs(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return hs(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(Ks(t,e))}finally{s.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return hs(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_getTime_46267b1c24877e30=function(t){return t.getTime()},n.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(t){let e;try{e=t instanceof Window}catch{e=!1}return e},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},n.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},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(Ks(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_node_905d3e251edff8a2=function(t){return t.node},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return hs(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return hs(function(){return module.require},arguments)},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=Xo(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;fr().setInt32(t+4*1,o,!0),fr().setInt32(t+4*0,i,!0)},n.wbg.__wbg_startWorkers_2ca11761e08ff5d5=function(t,e,r){return x2(t,e,ea.__wrap(r))},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof Zo>"u"?null:Zo;return Ci(t)?0:qs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return Ci(t)?0:qs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return Ci(t)?0:qs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return Ci(t)?0:qs(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_toString_2f76f493957b63da=function(t,e,r){const i=e.toString(r),o=Xo(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;fr().setInt32(t+4*1,a,!0),fr().setInt32(t+4*0,o,!0)},n.wbg.__wbg_toString_c813bbd34d063839=function(t){return t.toString()},n.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},n.wbg.__wbindgen_bigint_from_i128=function(t,e){return t<<BigInt(64)|BigInt.asUintN(64,e)},n.wbg.__wbindgen_bigint_from_i64=function(t){return t},n.wbg.__wbindgen_bigint_from_u128=function(t,e){return BigInt.asUintN(64,t)<<BigInt(64)|BigInt.asUintN(64,e)},n.wbg.__wbindgen_bigint_from_u64=function(t){return BigInt.asUintN(64,t)},n.wbg.__wbindgen_bigint_get_as_i64=function(t,e){const r=e,i=typeof r=="bigint"?r:void 0;fr().setBigInt64(t+8*1,Ci(i)?BigInt(0):i,!0),fr().setInt32(t+4*0,!Ci(i),!0)},n.wbg.__wbindgen_bit_and=function(t,e){return t&e},n.wbg.__wbindgen_bit_or=function(t,e){return t|e},n.wbg.__wbindgen_debug_string=function(t,e){const r=Gu(e),i=Xo(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;fr().setInt32(t+4*1,o,!0),fr().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(Ks(t,e))},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.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},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_eq=function(t,e){return t===e},n.wbg.__wbindgen_lt=function(t,e){return t<e},n.wbg.__wbindgen_memory=function(){return s.memory},n.wbg.__wbindgen_module=function(){return Ys.__wbindgen_wasm_module},n.wbg.__wbindgen_neg=function(t){return-t},n.wbg.__wbindgen_number_new=function(t){return t},n.wbg.__wbindgen_shl=function(t,e){return t<<e},n.wbg.__wbindgen_shr=function(t,e){return t>>e},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=Ci(i)?0:Xo(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;fr().setInt32(t+4*1,a,!0),fr().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return Ks(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(Ks(t,e))},n}function k2(n,t){n.wbg.memory=t||new WebAssembly.Memory({initial:21,maximum:16384,shared:!0})}function P2(n,t,e){if(s=n.exports,Ys.__wbindgen_wasm_module=t,Ws=null,Qs=null,typeof e<"u"&&(typeof e!="number"||e===0||e%65536!==0))throw"invalid stack size";return s.__wbindgen_start(e),s}async function Ys(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=S2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n)),k2(r,t);const{instance:i,module:o}=await B2(await n,r);return P2(i,o,e)}var F2=Object.freeze({__proto__:null,CompactCiphertextList:hi,CompactCiphertextListBuilder:Js,CompactCiphertextListExpander:ws,CompactPkeCrs:rr,FheBool:Br,FheInt10:Sr,FheInt1024:kr,FheInt104:Pr,FheInt112:Fr,FheInt12:Ir,FheInt120:Or,FheInt128:Tr,FheInt136:Cr,FheInt14:Nr,FheInt144:Lr,FheInt152:Dr,FheInt16:Ur,FheInt160:Mr,FheInt168:jr,FheInt176:Gr,FheInt184:Hr,FheInt192:Vr,FheInt2:qr,FheInt200:Qr,FheInt2048:Kr,FheInt208:Wr,FheInt216:Jr,FheInt224:$r,FheInt232:Yr,FheInt24:Zr,FheInt240:Xr,FheInt248:tn,FheInt256:en,FheInt32:rn,FheInt4:nn,FheInt40:sn,FheInt48:on,FheInt512:an,FheInt56:cn,FheInt6:un,FheInt64:_n,FheInt72:fn,FheInt8:ln,FheInt80:hn,FheInt88:pn,FheInt96:wn,FheUint10:dn,FheUint1024:gn,FheUint104:yn,FheUint112:bn,FheUint12:mn,FheUint120:An,FheUint128:En,FheUint136:vn,FheUint14:xn,FheUint144:Rn,FheUint152:zn,FheUint16:Bn,FheUint160:Sn,FheUint168:kn,FheUint176:Pn,FheUint184:Fn,FheUint192:In,FheUint2:On,FheUint200:Tn,FheUint2048:Cn,FheUint208:Nn,FheUint216:Ln,FheUint224:Dn,FheUint232:Un,FheUint24:Mn,FheUint240:jn,FheUint248:Gn,FheUint256:Hn,FheUint32:Vn,FheUint4:qn,FheUint40:Qn,FheUint48:Kn,FheUint512:Wn,FheUint56:Jn,FheUint6:$n,FheUint64:Yn,FheUint72:Zn,FheUint8:Xn,FheUint80:ti,FheUint88:ei,FheUint96:ri,ProvenCompactCiphertextList:ds,ShortintCompactPublicKeyEncryptionParameters:$s,ShortintNoiseDistribution:ta,TfheClientKey:K,TfheCompactPublicKey:nr,TfheCompressedPublicKey:wt,TfheConfig:gs,TfhePublicKey:pt,ZkComputeLoad:zw,default:Ys,initThreadPool:Vu,init_panic_hook:Hu,wbg_rayon_PoolBuilder:ea,wbg_rayon_start_worker:z2});let tt,te=0,Zs=null;function ys(){return(Zs===null||Zs.byteLength===0)&&(Zs=new Uint8Array(tt.memory.buffer)),Zs}const ra=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},I2=typeof ra.encodeInto=="function"?function(n,t){return ra.encodeInto(n,t)}:function(n,t){const e=ra.encode(n);return t.set(e),{read:n.length,written:e.length}};function Ni(n,t,e){if(e===void 0){const u=ra.encode(n),_=t(u.length,1)>>>0;return ys().subarray(_,_+u.length).set(u),te=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=ys();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=ys().subarray(i+a,i+r),_=I2(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return te=a,i}let Li=null;function He(){return(Li===null||Li.buffer.detached===!0||Li.buffer.detached===void 0&&Li.buffer!==tt.memory.buffer)&&(Li=new DataView(tt.memory.buffer)),Li}function bs(n){const t=tt.__externref_table_alloc();return tt.__wbindgen_export_4.set(t,n),t}function Di(n,t){try{return n.apply(this,t)}catch(e){const r=bs(e);tt.__wbindgen_exn_store(r)}}const pg=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&pg.decode();function Xs(n,t){return n=n>>>0,pg.decode(ys().subarray(n,n+t))}function pi(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}
|
|
22
|
-
${n.stack}`:r}function Ui(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function Ve(n,t){return n=n>>>0,ys().subarray(n/1,n/1+t)}function qe(n,t){const e=t(n.length*1,1)>>>0;return ys().set(n,e/1),te=n.length,e}function Mi(n){const t=tt.__wbindgen_export_4.get(n);return tt.__externref_table_dealloc(n),t}function O2(n,t){const e=Ni(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),r=te,i=tt.new_server_id_addr(n,e,r);if(i[2])throw Mi(i[1]);return As.__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=bs(n[r]);He().setUint32(e+4*r,i,!0)}return te=n.length,e}function T2(n,t,e){const r=wg(n,tt.__wbindgen_malloc),i=te,o=Ni(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=te,u=Ni(e,tt.__wbindgen_malloc,tt.__wbindgen_realloc),_=te,l=tt.new_client(r,i,o,a,u,_);if(l[2])throw Mi(l[1]);return na.__wrap(l[0])}function dg(n,t){n=n>>>0;const e=He(),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 C2(){const n=tt.ml_kem_pke_keygen();return ji.__wrap(n)}function N2(n){Ui(n,ji);const t=tt.ml_kem_pke_get_pk(n.__wbg_ptr);return ms.__wrap(t)}function L2(n){Ui(n,ms);const t=tt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw Mi(t[2]);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function D2(n){Ui(n,ji);const t=tt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw Mi(t[2]);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function U2(n){const t=qe(n,tt.__wbindgen_malloc),e=te,r=tt.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw Mi(r[1]);return ms.__wrap(r[0])}function M2(n){const t=qe(n,tt.__wbindgen_malloc),e=te,r=tt.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw Mi(r[1]);return ji.__wrap(r[0])}function j2(n,t,e,r,i,o,a){Ui(n,na),Ui(i,ms),Ui(o,ji);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 Mi(u[2]);var _=dg(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 gg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_client_free(n>>>0,1));class na{static __wrap(t){t=t>>>0;const e=Object.create(na.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();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 yg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_privateenckeymlkem512_free(n>>>0,1));class ji{static __wrap(t){t=t>>>0;const e=Object.create(ji.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_privateenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_privatesigkey_free(n>>>0,1));const bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_publicenckeymlkem512_free(n>>>0,1));class ms{static __wrap(t){t=t>>>0;const e=Object.create(ms.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_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 mg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_serveridaddr_free(n>>>0,1));class As{static __wrap(t){t=t>>>0;const e=Object.create(As.prototype);return e.__wbg_ptr=t,mg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof As?t.__destroy_into_raw():0}__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_serveridaddr_free(t,0)}}const Ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedciphertext_free(n>>>0,1));class to{static __wrap(t){t=t>>>0;const e=Object.create(to.prototype);return e.__wbg_ptr=t,Ag.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof to?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_typedciphertext_free(t,0)}get ciphertext(){const t=tt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=qe(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 Eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedplaintext_free(n>>>0,1));class Ku{static __wrap(t){t=t>>>0;const e=Object.create(Ku.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_typedplaintext_free(t,0)}get bytes(){const t=tt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=qe(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 vg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class eo{static __wrap(t){t=t>>>0;const e=Object.create(eo.prototype);return e.__wbg_ptr=t,vg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof eo?t.__destroy_into_raw():0}__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_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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=qe(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 G2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponse_free(n>>>0,1));class Wu{static __unwrap(t){return t instanceof Wu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,G2.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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=qe(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:ia.__wrap(t)}set payload(t){let e=0;pi(t)||(Ui(t,ia),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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set extra_data(t){const e=qe(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr,e,r)}}const xg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class ia{static __wrap(t){t=t>>>0;const e=Object.create(ia.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_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=tt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=qe(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=dg(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 H2(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 V2(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=Ni(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return Di(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Di(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(Xs(t,e))}finally{tt.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return Di(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return Di(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(Xs(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 Di(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 Di(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return Di(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return As.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return As.__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=Ni(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof Zo>"u"?null:Zo;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return pi(t)?0:bs(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 to.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return to.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return Ku.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return eo.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return eo.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return Wu.__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=Qu(e),i=Ni(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(Xs(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;He().setFloat64(t+8*1,pi(i)?0:i,!0),He().setInt32(t+4*0,!pi(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=pi(i)?0:Ni(i,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=te;He().setInt32(t+4*1,a,!0),He().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return Xs(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(Xs(t,e))},n}function q2(n,t){return tt=n.exports,Ju.__wbindgen_wasm_module=t,Li=null,Zs=null,tt.__wbindgen_start(),tt}async function Ju(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=V2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await H2(await n,t);return q2(e,r)}const Q2=BigInt(1024*1024*512),$u=BigInt(1024*1024*512),Yu=BigInt(1024*1024*512),ro=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",Rg=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},Qe=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function lr(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const sa=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 K2(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 W2(n){const t=zg(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function J2(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 Sg(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 kg(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 $2(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 Pg(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 Fg(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 Zu(n,t,e,r){const i=K2({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},r?.auth);let o,a;try{o=await fetch(t,i)}catch(_){Pg(n,_)}o.ok||await Bg(n,o);let u;try{u=await o.json()}catch(_){Sg(n,_)}try{Fg(u),a=u}catch(_){kg(n,_)}return a}async function Y2(n,t){let e,r;try{e=await fetch(t)}catch(o){Pg(n,o)}e.ok||await Bg(n,e);let i;try{i=await e.json()}catch(o){Sg(n,o)}try{Fg(i),r=i}catch(o){kg(n,o)}return r}const Xu={},Ig=async(n,t)=>{if(Xu[n])return Xu[n];const e=await Y2("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,$u)}catch(v){throw new Error("Invalid public key (deserialization failed)",{cause:v})}let g;try{g=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),Yu)}catch(v){throw new Error("Invalid crs (deserialization failed)",{cause:v})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:g,publicParamsId:u}}};return Xu[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Og=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Tg=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Z2=n=>{if(typeof n.network=="string")return new mm(n.network);if(n.network)return new Oi(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},X2=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)}},tA=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Ig(ro(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,$u),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.")},eA=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Ig(ro(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,Yu),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.")},rA=async(n,t)=>await new er(t.kmsContractAddress,Og,n).getKmsSigners(),nA=async(n,t)=>{const r=await new er(t.kmsContractAddress,Og,n).getThreshold();return Number(r)},iA=async(n,t)=>await new er(t.inputVerifierContractAddress,Tg,n).getCoprocessorSigners(),sA=async(n,t)=>{const r=await new er(t.inputVerifierContractAddress,Tg,n).getThreshold();return Number(r)},Cg={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function Ng(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 Cg))throw new Error(`Handle ${e} is not of valid type`);if(t+=Cg[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const oa=n=>Ut(n),oA=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],Lg=10,Dg=BigInt(365);function aA(n,t){return t===0?n===BigInt(1):t===7?oa("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 cA(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]=aA(t[o],e[o])),r}function uA(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Dg)throw Error(`durationDays is above max duration of ${Dg}`);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 _A=(n,t,e,r,i,o,a,u)=>async(_,l,f,g,y,v,F,k,T)=>{const E="0x00";let R,S;try{R=TKMS.u8vec_to_ml_kem_pke_pk(Qe(f)),S=TKMS.u8vec_to_ml_kem_pke_sk(Qe(l))}catch(dt){throw new Error("Invalid public or private key",{cause:dt})}const B=g.replace(/^(0x)/,""),O=f.replace(/^(0x)/,""),C=_.map(dt=>({handle:typeof dt.handle=="string"?lr(Qe(dt.handle),!0):lr(dt.handle,!0),contractAddress:oa(dt.contractAddress)}));Ng(C.map(dt=>dt.handle)),uA(BigInt(F),BigInt(k));const N=new er(i,oA,a),L=C.map(async({handle:dt,contractAddress:at})=>{const lt=await N.persistAllowed(dt,v),mt=await N.persistAllowed(dt,at);if(!lt)throw new Error(`User ${v} is not authorized to user decrypt handle ${dt}!`);if(!mt)throw new Error(`dapp contract ${at} is not authorized to user decrypt handle ${dt}!`);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>Lg)throw Error(`contractAddresses max length of ${Lg} exceeded`);await Promise.all(L).catch(dt=>{throw dt});const nt={handleContractPairs:C,requestValidity:{startTimestamp:F.toString(),durationDays:k.toString()},contractsChainId:e.toString(),contractAddresses:y.map(dt=>oa(dt)),userAddress:oa(v),signature:B,publicKey:O,extraData:E},ht=await Zu("USER_DECRYPT",`${o}/v1/user-decrypt`,nt,u??T);let D=n.map((dt,at)=>TKMS.new_server_id_addr(at+1,dt));const vt=TKMS.new_client(D,v,"default");try{const dt=new ArrayBuffer(32);new DataView(dt).setUint32(28,t,!1);const mt={name:"Decryption",version:"1",chain_id:new Uint8Array(dt),verifying_contract:r,salt:null},Rt={signature:B,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,ht.response,R,S,!0).map(W=>sa(W.bytes));return cA(C.map(W=>W.handle),kt)}catch(dt){throw new Error("An error occured during decryption",{cause:dt})}},hr=(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()}).`)},fA=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:o})=>{if(!je(i))throw new Error("Contract address is not a valid address.");if(!je(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 hr(Number(g),1),f(2),_.push_boolean(!!g),u.push(1),this},add8(g){return hr(g,8),f(8),_.push_u8(Number(g)),u.push(8),this},add16(g){return hr(g,16),f(16),_.push_u16(Number(g)),u.push(16),this},add32(g){return hr(g,32),f(32),_.push_u32(Number(g)),u.push(32),this},add64(g){return hr(g,64),f(64),_.push_u64(BigInt(g)),u.push(64),this},add128(g){return hr(g,128),f(128),_.push_u128(BigInt(g)),u.push(128),this},addAddress(g){if(!je(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 hr(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=sa(g);return hr(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=sa(g);return hr(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=sa(g);return hr(y,2048),f(2048),_.push_u2048(y),u.push(2048),this},getBits(){return u},encrypt(){const y=(()=>{const B=L=>Object.keys(L),O=u.reduce((L,J)=>L+J,0),C=B(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=Qe(i),k=Qe(o),T=Qe(n),E=Qe(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(Q2),l}}},Ug={1:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8,512:9,1024:10,2048:11},lA=BigInt("18446744073709551615"),hA=(n,t,e,r,i)=>{const o=Aw("keccak256").update(Je.from(n)).digest(),a=Je.from(Qe(e)),u=r.toString(16).padStart(64,"0"),_=Je.from(u,"hex");return t.map((f,g)=>{const y=Ug[f],v=Je.from([g]),F=Aw("keccak256").update(o).update(v).update(a).update(_).digest(),k=new Uint8Array(32);if(k.set(F,0),BigInt(r)>lA)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const T=Qe(u).slice(24,32);return k[21]=g,k.set(T,22),k[30]=y,k[31]=i,k})},Mg=n=>Ut(n),pA=()=>0;function wA(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 dA(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 gA=(n,t,e,r,i,o,a,u,_,l)=>(f,g)=>{if(!je(f))throw new Error("Contract address is not a valid address.");if(!je(g))throw new Error("User address is not a valid address.");const y=fA({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:Mg(f),userAddress:Mg(g),ciphertextWithInputVerification:lr(T),contractChainId:"0x"+e.toString(16),extraData:F},R=await Zu("INPUT_PROOF",`${i}/v1/input-proof`,E,v??l);dA(R)||$2("INPUT_PROOF",R);const S=hA(T,k,n,e,pA());if(R.response.handles&&R.response.handles.length>0){const D=R.response.handles.map(Qe);if(S.length!=D.length)throw new Error(`Incorrect Handles list sizes: (expected) ${S.length} != ${D.length} (received)`);for(let vt=0;vt<S.length;vt+=1){let dt=S[vt],at=D[vt],lt=lr(dt),mt=lr(at);if(lt!==mt)throw new Error(`Incorrect Handle ${vt}: (expected) ${lt} != ${mt} (received)`)}}const B=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=B.map(D=>{const vt=D.startsWith("0x")?D:`0x${D}`;return Bl(O,C,{ctHandles:S,userAddress:g,contractAddress:f,contractChainId:e,extraData:F},vt)});if(!wA(u,N,_))throw Error("Coprocessor signers threshold is not reached");let J=Rg(S.length);const nt=B.length;return J+=Rg(nt),S.map(D=>lr(D)).map(D=>J+=D),B.map(D=>J+=D.slice(2)),J+=F.slice(2),{handles:S,inputProof:Qe(J)}}}},yA=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function bA(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 mA={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function AA(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=>mA[l]),u=new Si().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length);let _={};return n.forEach((l,f)=>_[l]=u[f]),_}const EA=(n,t,e,r,i,o,a,u)=>async(_,l)=>{const f="0x00",g=new er(i,yA,a);let y;try{y=await Promise.all(_.map(async L=>{const J=lr(typeof L=="string"?Qe(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}Ng(y);const v={ciphertextHandles:y,extraData:f},F=await Zu("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}`,S=E.signatures,B="0x",O=S.map(L=>{const J=L.startsWith("0x")?L:`0x${L}`;return Bl(k,T,{ctHandles:y,decryptedResult:R,extraData:B},J)});if(!bA(n,O,t))throw Error("KMS signers threshold is not reached");return AA(y,R)},jg=(n,t)=>(e,r,i,o,a)=>{const u="0x00";if(a&&!je(a))throw new Error("Invalid delegated account.");if(!je(n))throw new Error("Invalid verifying contract address.");if(!r.every(v=>je(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:"contractsChainId",type:"uint256"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"},{name:"delegatedAccount",type:"address"}]},primaryType:"DelegatedUserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,contractsChainId:t,startTimestamp:l,durationDays:f,extraData:u,delegatedAccount:a}}:{types:{EIP712Domain:g,UserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"contractsChainId",type:"uint256"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"}]},primaryType:"UserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,contractsChainId:t,startTimestamp:l,durationDays:f,extraData:u}}},Gg=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:lr(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:lr(TKMS.ml_kem_pke_sk_to_u8vec(n))}};Hi.fetch=E2(Hi.fetch,{retries:5,retryDelay:500});const vA={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"},xA=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:o,gatewayChainId:a,auth:u}=n;if(!i||!je(i))throw new Error("KMS contract address is not valid or empty");if(!t||!je(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!je(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!o||!je(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 _=Z2(n);if(!_)throw new Error("No network has been provided!");const l=await X2(_,n),f=await tA(n),g=await eA(n),y=await rA(_,n),v=await nA(_,n),F=await iA(_,n),k=await sA(_,n);return{createEncryptedInput:gA(o,e,l,a,ro(n.relayerUrl),f.publicKey,g,F,k),generateKeypair:Gg,createEIP712:jg(t,l),publicDecrypt:EA(y,v,a,t,o,ro(n.relayerUrl),_,u&&{auth:u}),userDecrypt:_A(y,a,l,t,o,ro(n.relayerUrl),_,u&&{auth:u}),getPublicKey:()=>f.publicKey?{publicKey:f.publicKey.safe_serialize($u),publicKeyId:f.publicKeyId}:null,getPublicParams:T=>g[T]?{publicParams:g[T].publicParams.safe_serialize(Yu),publicParamsId:g[T].publicParamsId}:null}};let Hg=!1;const RA=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await v2()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
|
|
22
|
+
${n.stack}`:r}function Ui(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function Ve(n,t){return n=n>>>0,ys().subarray(n/1,n/1+t)}function qe(n,t){const e=t(n.length*1,1)>>>0;return ys().set(n,e/1),te=n.length,e}function Mi(n){const t=tt.__wbindgen_export_4.get(n);return tt.__externref_table_dealloc(n),t}function O2(n,t){const e=Ni(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),r=te,i=tt.new_server_id_addr(n,e,r);if(i[2])throw Mi(i[1]);return As.__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=bs(n[r]);He().setUint32(e+4*r,i,!0)}return te=n.length,e}function T2(n,t,e){const r=wg(n,tt.__wbindgen_malloc),i=te,o=Ni(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=te,u=Ni(e,tt.__wbindgen_malloc,tt.__wbindgen_realloc),_=te,l=tt.new_client(r,i,o,a,u,_);if(l[2])throw Mi(l[1]);return na.__wrap(l[0])}function dg(n,t){n=n>>>0;const e=He(),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 C2(){const n=tt.ml_kem_pke_keygen();return ji.__wrap(n)}function N2(n){Ui(n,ji);const t=tt.ml_kem_pke_get_pk(n.__wbg_ptr);return ms.__wrap(t)}function L2(n){Ui(n,ms);const t=tt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw Mi(t[2]);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function D2(n){Ui(n,ji);const t=tt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw Mi(t[2]);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function U2(n){const t=qe(n,tt.__wbindgen_malloc),e=te,r=tt.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw Mi(r[1]);return ms.__wrap(r[0])}function M2(n){const t=qe(n,tt.__wbindgen_malloc),e=te,r=tt.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw Mi(r[1]);return ji.__wrap(r[0])}function j2(n,t,e,r,i,o,a){Ui(n,na),Ui(i,ms),Ui(o,ji);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 Mi(u[2]);var _=dg(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 gg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_client_free(n>>>0,1));class na{static __wrap(t){t=t>>>0;const e=Object.create(na.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();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 yg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_privateenckeymlkem512_free(n>>>0,1));class ji{static __wrap(t){t=t>>>0;const e=Object.create(ji.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_privateenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_privatesigkey_free(n>>>0,1));const bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_publicenckeymlkem512_free(n>>>0,1));class ms{static __wrap(t){t=t>>>0;const e=Object.create(ms.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_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 mg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_serveridaddr_free(n>>>0,1));class As{static __wrap(t){t=t>>>0;const e=Object.create(As.prototype);return e.__wbg_ptr=t,mg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof As?t.__destroy_into_raw():0}__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_serveridaddr_free(t,0)}}const Ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedciphertext_free(n>>>0,1));class to{static __wrap(t){t=t>>>0;const e=Object.create(to.prototype);return e.__wbg_ptr=t,Ag.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof to?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_typedciphertext_free(t,0)}get ciphertext(){const t=tt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=qe(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 Eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedplaintext_free(n>>>0,1));class Ku{static __wrap(t){t=t>>>0;const e=Object.create(Ku.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_typedplaintext_free(t,0)}get bytes(){const t=tt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=qe(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 vg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class eo{static __wrap(t){t=t>>>0;const e=Object.create(eo.prototype);return e.__wbg_ptr=t,vg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof eo?t.__destroy_into_raw():0}__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_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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=qe(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 G2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponse_free(n>>>0,1));class Wu{static __unwrap(t){return t instanceof Wu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,G2.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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=qe(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:ia.__wrap(t)}set payload(t){let e=0;pi(t)||(Ui(t,ia),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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set extra_data(t){const e=qe(t,tt.__wbindgen_malloc),r=te;tt.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr,e,r)}}const xg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class ia{static __wrap(t){t=t>>>0;const e=Object.create(ia.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_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=tt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=qe(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=Ve(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=qe(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=dg(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 H2(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 V2(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=Ni(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return Di(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Di(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(Xs(t,e))}finally{tt.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return Di(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return Di(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(Xs(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 Di(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 Di(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return Di(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return As.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return As.__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=Ni(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof Zo>"u"?null:Zo;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return pi(t)?0:bs(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 to.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return to.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return Ku.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return eo.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return eo.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return Wu.__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=Qu(e),i=Ni(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=te;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(Xs(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;He().setFloat64(t+8*1,pi(i)?0:i,!0),He().setInt32(t+4*0,!pi(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=pi(i)?0:Ni(i,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=te;He().setInt32(t+4*1,a,!0),He().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return Xs(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(Xs(t,e))},n}function q2(n,t){return tt=n.exports,Ju.__wbindgen_wasm_module=t,Li=null,Zs=null,tt.__wbindgen_start(),tt}async function Ju(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=V2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await H2(await n,t);return q2(e,r)}const Q2=BigInt(1024*1024*512),$u=BigInt(1024*1024*512),Yu=BigInt(1024*1024*512),ro=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",Rg=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},Qe=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function lr(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const sa=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 K2(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 W2(n){const t=zg(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function J2(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 Sg(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 kg(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 $2(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 Pg(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 Fg(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 Zu(n,t,e,r){const i=K2({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},r?.auth);let o,a;try{o=await fetch(t,i)}catch(_){Pg(n,_)}o.ok||await Bg(n,o);let u;try{u=await o.json()}catch(_){Sg(n,_)}try{Fg(u),a=u}catch(_){kg(n,_)}return a}async function Y2(n,t){let e,r;try{e=await fetch(t)}catch(o){Pg(n,o)}e.ok||await Bg(n,e);let i;try{i=await e.json()}catch(o){Sg(n,o)}try{Fg(i),r=i}catch(o){kg(n,o)}return r}const Xu={},Ig=async(n,t)=>{if(Xu[n])return Xu[n];const e=await Y2("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,$u)}catch(v){throw new Error("Invalid public key (deserialization failed)",{cause:v})}let g;try{g=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),Yu)}catch(v){throw new Error("Invalid crs (deserialization failed)",{cause:v})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:g,publicParamsId:u}}};return Xu[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Og=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Tg=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Z2=n=>{if(typeof n.network=="string")return new mm(n.network);if(n.network)return new Oi(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},X2=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)}},tA=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Ig(ro(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,$u),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.")},eA=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Ig(ro(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,Yu),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.")},rA=async(n,t)=>await new er(t.kmsContractAddress,Og,n).getKmsSigners(),nA=async(n,t)=>{const r=await new er(t.kmsContractAddress,Og,n).getThreshold();return Number(r)},iA=async(n,t)=>await new er(t.inputVerifierContractAddress,Tg,n).getCoprocessorSigners(),sA=async(n,t)=>{const r=await new er(t.inputVerifierContractAddress,Tg,n).getThreshold();return Number(r)},Cg={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function Ng(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 Cg))throw new Error(`Handle ${e} is not of valid type`);if(t+=Cg[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const oa=n=>Ut(n),oA=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],Lg=10,Dg=BigInt(365);function aA(n,t){return t===0?n===BigInt(1):t===7?oa("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 cA(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]=aA(t[o],e[o])),r}function uA(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Dg)throw Error(`durationDays is above max duration of ${Dg}`);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 _A=(n,t,e,r,i,o,a,u)=>async(_,l,f,g,y,v,F,k,T)=>{const E="0x00";let R,S;try{R=TKMS.u8vec_to_ml_kem_pke_pk(Qe(f)),S=TKMS.u8vec_to_ml_kem_pke_sk(Qe(l))}catch(dt){throw new Error("Invalid public or private key",{cause:dt})}const B=g.replace(/^(0x)/,""),O=f.replace(/^(0x)/,""),C=_.map(dt=>({handle:typeof dt.handle=="string"?lr(Qe(dt.handle),!0):lr(dt.handle,!0),contractAddress:oa(dt.contractAddress)}));Ng(C.map(dt=>dt.handle)),uA(BigInt(F),BigInt(k));const N=new er(i,oA,a),L=C.map(async({handle:dt,contractAddress:at})=>{const lt=await N.persistAllowed(dt,v),mt=await N.persistAllowed(dt,at);if(!lt)throw new Error(`User ${v} is not authorized to user decrypt handle ${dt}!`);if(!mt)throw new Error(`dapp contract ${at} is not authorized to user decrypt handle ${dt}!`);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>Lg)throw Error(`contractAddresses max length of ${Lg} exceeded`);await Promise.all(L).catch(dt=>{throw dt});const nt={handleContractPairs:C,requestValidity:{startTimestamp:F.toString(),durationDays:k.toString()},contractsChainId:e.toString(),contractAddresses:y.map(dt=>oa(dt)),userAddress:oa(v),signature:B,publicKey:O,extraData:E},ht=await Zu("USER_DECRYPT",`${o}/v1/user-decrypt`,nt,u??T);let D=n.map((dt,at)=>TKMS.new_server_id_addr(at+1,dt));const vt=TKMS.new_client(D,v,"default");try{const dt=new ArrayBuffer(32);new DataView(dt).setUint32(28,t,!1);const mt={name:"Decryption",version:"1",chain_id:new Uint8Array(dt),verifying_contract:r,salt:null},Rt={signature:B,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,ht.response,R,S,!0).map(W=>sa(W.bytes));return cA(C.map(W=>W.handle),kt)}catch(dt){throw new Error("An error occured during decryption",{cause:dt})}},hr=(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()}).`)},fA=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:o})=>{if(!je(i))throw new Error("Contract address is not a valid address.");if(!je(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 hr(Number(g),1),f(2),_.push_boolean(!!g),u.push(1),this},add8(g){return hr(g,8),f(8),_.push_u8(Number(g)),u.push(8),this},add16(g){return hr(g,16),f(16),_.push_u16(Number(g)),u.push(16),this},add32(g){return hr(g,32),f(32),_.push_u32(Number(g)),u.push(32),this},add64(g){return hr(g,64),f(64),_.push_u64(BigInt(g)),u.push(64),this},add128(g){return hr(g,128),f(128),_.push_u128(BigInt(g)),u.push(128),this},addAddress(g){if(!je(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 hr(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=sa(g);return hr(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=sa(g);return hr(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=sa(g);return hr(y,2048),f(2048),_.push_u2048(y),u.push(2048),this},getBits(){return u},encrypt(){const y=(()=>{const B=L=>Object.keys(L),O=u.reduce((L,J)=>L+J,0),C=B(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=Qe(i),k=Qe(o),T=Qe(n),E=Qe(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(Q2),l}}},Ug={1:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8,512:9,1024:10,2048:11},lA=BigInt("18446744073709551615"),hA=(n,t,e,r,i)=>{const o=Aw("keccak256").update(Je.from(n)).digest(),a=Je.from(Qe(e)),u=r.toString(16).padStart(64,"0"),_=Je.from(u,"hex");return t.map((f,g)=>{const y=Ug[f],v=Je.from([g]),F=Aw("keccak256").update(o).update(v).update(a).update(_).digest(),k=new Uint8Array(32);if(k.set(F,0),BigInt(r)>lA)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const T=Qe(u).slice(24,32);return k[21]=g,k.set(T,22),k[30]=y,k[31]=i,k})},Mg=n=>Ut(n),pA=()=>0;function wA(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 dA(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 gA=(n,t,e,r,i,o,a,u,_,l)=>(f,g)=>{if(!je(f))throw new Error("Contract address is not a valid address.");if(!je(g))throw new Error("User address is not a valid address.");const y=fA({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:Mg(f),userAddress:Mg(g),ciphertextWithInputVerification:lr(T),contractChainId:"0x"+e.toString(16),extraData:F},R=await Zu("INPUT_PROOF",`${i}/v1/input-proof`,E,v??l);dA(R)||$2("INPUT_PROOF",R);const S=hA(T,k,n,e,pA());if(R.response.handles&&R.response.handles.length>0){const D=R.response.handles.map(Qe);if(S.length!=D.length)throw new Error(`Incorrect Handles list sizes: (expected) ${S.length} != ${D.length} (received)`);for(let vt=0;vt<S.length;vt+=1){let dt=S[vt],at=D[vt],lt=lr(dt),mt=lr(at);if(lt!==mt)throw new Error(`Incorrect Handle ${vt}: (expected) ${lt} != ${mt} (received)`)}}const B=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=B.map(D=>{const vt=D.startsWith("0x")?D:`0x${D}`;return Bl(O,C,{ctHandles:S,userAddress:g,contractAddress:f,contractChainId:e,extraData:F},vt)});if(!wA(u,N,_))throw Error("Coprocessor signers threshold is not reached");let J=Rg(S.length);const nt=B.length;return J+=Rg(nt),S.map(D=>lr(D)).map(D=>J+=D),B.map(D=>J+=D.slice(2)),J+=F.slice(2),{handles:S,inputProof:Qe(J)}}}},yA=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function bA(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 mA={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function AA(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=>mA[l]),u=new Si().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length);let _={};return n.forEach((l,f)=>_[l]=u[f]),_}const EA=(n,t,e,r,i,o,a,u)=>async(_,l)=>{const f="0x00",g=new er(i,yA,a);let y;try{y=await Promise.all(_.map(async L=>{const J=lr(typeof L=="string"?Qe(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}Ng(y);const v={ciphertextHandles:y,extraData:f},F=await Zu("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}`,S=E.signatures,B="0x",O=S.map(L=>{const J=L.startsWith("0x")?L:`0x${L}`;return Bl(k,T,{ctHandles:y,decryptedResult:R,extraData:B},J)});if(!bA(n,O,t))throw Error("KMS signers threshold is not reached");return AA(y,R)},jg=(n,t)=>(e,r,i,o,a)=>{const u="0x00";if(a&&!je(a))throw new Error("Invalid delegated account.");if(!je(n))throw new Error("Invalid verifying contract address.");if(!r.every(v=>je(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}}},Gg=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:lr(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:lr(TKMS.ml_kem_pke_sk_to_u8vec(n))}};Hi.fetch=E2(Hi.fetch,{retries:5,retryDelay:500});const vA={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"},xA=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:o,gatewayChainId:a,auth:u}=n;if(!i||!je(i))throw new Error("KMS contract address is not valid or empty");if(!t||!je(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!je(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!o||!je(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 _=Z2(n);if(!_)throw new Error("No network has been provided!");const l=await X2(_,n),f=await tA(n),g=await eA(n),y=await rA(_,n),v=await nA(_,n),F=await iA(_,n),k=await sA(_,n);return{createEncryptedInput:gA(o,e,l,a,ro(n.relayerUrl),f.publicKey,g,F,k),generateKeypair:Gg,createEIP712:jg(t,l),publicDecrypt:EA(y,v,a,t,o,ro(n.relayerUrl),_,u&&{auth:u}),userDecrypt:_A(y,a,l,t,o,ro(n.relayerUrl),_,u&&{auth:u}),getPublicKey:()=>f.publicKey?{publicKey:f.publicKey.safe_serialize($u),publicKeyId:f.publicKeyId}:null,getPublicParams:T=>g[T]?{publicParams:g[T].publicParams.safe_serialize(Yu),publicParamsId:g[T].publicParamsId}:null}};let Hg=!1;const RA=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await v2()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
|
|
23
23
|
`,`'Cross-Origin-Opener-Policy': 'same-origin'
|
|
24
24
|
`,"'Cross-Origin-Embedder-Policy': 'require-corp'"),e=void 0),Hg||(await Ys({module_or_path:n}),await Ju({module_or_path:t}),e&&(Hu(),await Vu(e)),Hg=!0),!0);window.TFHE={default:Ys,initThreadPool:Vu,init_panic_hook:Hu,TfheCompactPublicKey:nr,CompactPkeCrs:rr,CompactCiphertextList:hi,ZkComputeLoad:zw},window.TKMS={default:Ju,u8vec_to_ml_kem_pke_pk:U2,u8vec_to_ml_kem_pke_sk:M2,new_client:T2,new_server_id_addr:O2,process_user_decryption_resp_from_js:j2,ml_kem_pke_keygen:C2,ml_kem_pke_pk_to_u8vec:L2,ml_kem_pke_sk_to_u8vec:D2,ml_kem_pke_get_pk:N2},Te.ENCRYPTION_TYPES=Ug,Te.SepoliaConfig=vA,Te.createEIP712=jg,Te.createInstance=xA,Te.generateKeypair=Gg,Te.getErrorCauseCode=W2,Te.getErrorCauseStatus=J2,Te.initSDK=RA,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
|
package/lib/node.cjs
CHANGED
|
@@ -1278,7 +1278,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1278
1278
|
DelegatedUserDecryptRequestVerification: [
|
|
1279
1279
|
{ name: 'publicKey', type: 'bytes' },
|
|
1280
1280
|
{ name: 'contractAddresses', type: 'address[]' },
|
|
1281
|
-
{ name: 'contractsChainId', type: 'uint256' },
|
|
1282
1281
|
{ name: 'startTimestamp', type: 'uint256' },
|
|
1283
1282
|
{ name: 'durationDays', type: 'uint256' },
|
|
1284
1283
|
{ name: 'extraData', type: 'bytes' },
|
|
@@ -1293,7 +1292,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1293
1292
|
message: {
|
|
1294
1293
|
publicKey: formattedPublicKey,
|
|
1295
1294
|
contractAddresses,
|
|
1296
|
-
contractsChainId,
|
|
1297
1295
|
startTimestamp: formattedStartTimestamp,
|
|
1298
1296
|
durationDays: formattedDurationDays,
|
|
1299
1297
|
extraData,
|
|
@@ -1307,7 +1305,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1307
1305
|
UserDecryptRequestVerification: [
|
|
1308
1306
|
{ name: 'publicKey', type: 'bytes' },
|
|
1309
1307
|
{ name: 'contractAddresses', type: 'address[]' },
|
|
1310
|
-
{ name: 'contractsChainId', type: 'uint256' },
|
|
1311
1308
|
{ name: 'startTimestamp', type: 'uint256' },
|
|
1312
1309
|
{ name: 'durationDays', type: 'uint256' },
|
|
1313
1310
|
{ name: 'extraData', type: 'bytes' },
|
|
@@ -1318,7 +1315,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1318
1315
|
message: {
|
|
1319
1316
|
publicKey: formattedPublicKey,
|
|
1320
1317
|
contractAddresses,
|
|
1321
|
-
contractsChainId,
|
|
1322
1318
|
startTimestamp: formattedStartTimestamp,
|
|
1323
1319
|
durationDays: formattedDurationDays,
|
|
1324
1320
|
extraData,
|
package/lib/node.js
CHANGED
|
@@ -1257,7 +1257,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1257
1257
|
DelegatedUserDecryptRequestVerification: [
|
|
1258
1258
|
{ name: 'publicKey', type: 'bytes' },
|
|
1259
1259
|
{ name: 'contractAddresses', type: 'address[]' },
|
|
1260
|
-
{ name: 'contractsChainId', type: 'uint256' },
|
|
1261
1260
|
{ name: 'startTimestamp', type: 'uint256' },
|
|
1262
1261
|
{ name: 'durationDays', type: 'uint256' },
|
|
1263
1262
|
{ name: 'extraData', type: 'bytes' },
|
|
@@ -1272,7 +1271,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1272
1271
|
message: {
|
|
1273
1272
|
publicKey: formattedPublicKey,
|
|
1274
1273
|
contractAddresses,
|
|
1275
|
-
contractsChainId,
|
|
1276
1274
|
startTimestamp: formattedStartTimestamp,
|
|
1277
1275
|
durationDays: formattedDurationDays,
|
|
1278
1276
|
extraData,
|
|
@@ -1286,7 +1284,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1286
1284
|
UserDecryptRequestVerification: [
|
|
1287
1285
|
{ name: 'publicKey', type: 'bytes' },
|
|
1288
1286
|
{ name: 'contractAddresses', type: 'address[]' },
|
|
1289
|
-
{ name: 'contractsChainId', type: 'uint256' },
|
|
1290
1287
|
{ name: 'startTimestamp', type: 'uint256' },
|
|
1291
1288
|
{ name: 'durationDays', type: 'uint256' },
|
|
1292
1289
|
{ name: 'extraData', type: 'bytes' },
|
|
@@ -1297,7 +1294,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
1297
1294
|
message: {
|
|
1298
1295
|
publicKey: formattedPublicKey,
|
|
1299
1296
|
contractAddresses,
|
|
1300
|
-
contractsChainId,
|
|
1301
1297
|
startTimestamp: formattedStartTimestamp,
|
|
1302
1298
|
durationDays: formattedDurationDays,
|
|
1303
1299
|
extraData,
|
package/lib/web.js
CHANGED
|
@@ -17388,7 +17388,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
17388
17388
|
DelegatedUserDecryptRequestVerification: [
|
|
17389
17389
|
{ name: 'publicKey', type: 'bytes' },
|
|
17390
17390
|
{ name: 'contractAddresses', type: 'address[]' },
|
|
17391
|
-
{ name: 'contractsChainId', type: 'uint256' },
|
|
17392
17391
|
{ name: 'startTimestamp', type: 'uint256' },
|
|
17393
17392
|
{ name: 'durationDays', type: 'uint256' },
|
|
17394
17393
|
{ name: 'extraData', type: 'bytes' },
|
|
@@ -17403,7 +17402,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
17403
17402
|
message: {
|
|
17404
17403
|
publicKey: formattedPublicKey,
|
|
17405
17404
|
contractAddresses,
|
|
17406
|
-
contractsChainId,
|
|
17407
17405
|
startTimestamp: formattedStartTimestamp,
|
|
17408
17406
|
durationDays: formattedDurationDays,
|
|
17409
17407
|
extraData,
|
|
@@ -17417,7 +17415,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
17417
17415
|
UserDecryptRequestVerification: [
|
|
17418
17416
|
{ name: 'publicKey', type: 'bytes' },
|
|
17419
17417
|
{ name: 'contractAddresses', type: 'address[]' },
|
|
17420
|
-
{ name: 'contractsChainId', type: 'uint256' },
|
|
17421
17418
|
{ name: 'startTimestamp', type: 'uint256' },
|
|
17422
17419
|
{ name: 'durationDays', type: 'uint256' },
|
|
17423
17420
|
{ name: 'extraData', type: 'bytes' },
|
|
@@ -17428,7 +17425,6 @@ const createEIP712 = (verifyingContract, contractsChainId) => (publicKey, contra
|
|
|
17428
17425
|
message: {
|
|
17429
17426
|
publicKey: formattedPublicKey,
|
|
17430
17427
|
contractAddresses,
|
|
17431
|
-
contractsChainId,
|
|
17432
17428
|
startTimestamp: formattedStartTimestamp,
|
|
17433
17429
|
durationDays: formattedDurationDays,
|
|
17434
17430
|
extraData,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zama-fhe/relayer-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-0",
|
|
4
4
|
"description": "fhevm Relayer SDK",
|
|
5
5
|
"main": "lib/node.js",
|
|
6
6
|
"types": "lib/node.d.ts",
|
|
@@ -26,9 +26,6 @@
|
|
|
26
26
|
"types": "./lib/node.d.ts"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"engines": {
|
|
30
|
-
"node": ">=20"
|
|
31
|
-
},
|
|
32
29
|
"scripts": {
|
|
33
30
|
"lint": "eslint src/",
|
|
34
31
|
"generateKeys": "./generateKeys.js",
|
|
@@ -103,5 +100,8 @@
|
|
|
103
100
|
"vite": "7.0.5",
|
|
104
101
|
"vite-plugin-node-polyfills": "0.24.0",
|
|
105
102
|
"vite-plugin-static-copy": "^3.1.2"
|
|
103
|
+
},
|
|
104
|
+
"engines": {
|
|
105
|
+
"node": ">=22"
|
|
106
106
|
}
|
|
107
107
|
}
|