@sentio/sdk-bundle 2.44.2-rc.1 → 2.44.2-rc.2
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/lib/aptos/builtin/0x1.js +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/index.js +1 -1
- package/lib/aptos/ext/index.js +1 -1
- package/lib/aptos/index.js +1 -1
- package/lib/btc/index.js +1 -1
- package/lib/{chunk-4WDJVFCT.js → chunk-4MFZRYCX.js} +2 -2
- package/lib/{chunk-PNVZOHKE.js → chunk-5MSYUYPI.js} +2 -2
- package/lib/chunk-AYDIUTOB.js +5 -0
- package/lib/chunk-AYDIUTOB.js.map +1 -0
- package/lib/{chunk-7U2L6S24.js → chunk-D7FQ4Y4M.js} +2 -2
- package/lib/{chunk-SKCEVA75.js → chunk-DJMQHR3M.js} +2 -2
- package/lib/{chunk-UJ4VVXPL.js → chunk-GBDIVT34.js} +2 -2
- package/lib/{chunk-RVQA7LMH.js → chunk-GC6A2XT6.js} +2 -2
- package/lib/{chunk-CGNU33OD.js → chunk-H5O7SNUY.js} +2 -2
- package/lib/{chunk-UPELIPCN.js → chunk-IAICSOJ4.js} +2 -2
- package/lib/chunk-KCSKNUVW.js +943 -0
- package/lib/chunk-KCSKNUVW.js.map +1 -0
- package/lib/{chunk-4AW2JS23.js → chunk-KTTAMLWK.js} +2 -2
- package/lib/{chunk-ALU3XXNT.js → chunk-LBNDEGPJ.js} +2 -2
- package/lib/{chunk-P47UBUIP.js → chunk-SJDMVS3T.js} +2 -2
- package/lib/{chunk-ARF3CNRW.js → chunk-TSGE2F43.js} +2 -2
- package/lib/{chunk-CIL76VDH.js → chunk-U6J55JCD.js} +2 -2
- package/lib/{chunk-2U75NKG7.js → chunk-VO4S7Q4P.js} +2 -2
- package/lib/{chunk-S2Q6XTBC.js → chunk-XJOCMTJY.js} +2 -2
- package/lib/{chunk-E74OKQE6.js → chunk-YJ64AKDD.js} +2 -2
- package/lib/{chunk-YNF6DPGW.js → chunk-ZVKPIFWH.js} +2 -2
- package/lib/core/index.js +1 -1
- package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
- package/lib/eth/builtin/erc1155.js +1 -1
- package/lib/eth/builtin/erc20.js +1 -1
- package/lib/eth/builtin/erc721.js +1 -1
- package/lib/eth/builtin/index.js +1 -1
- package/lib/eth/builtin/weth9.js +1 -1
- package/lib/eth/codegen/index.js +1 -1
- package/lib/eth/index.js +1 -1
- package/lib/fuel/codegen/index.js +2 -2
- package/lib/fuel/codegen/index.js.map +1 -1
- package/lib/fuel/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/move/index.js +1 -1
- package/lib/solana/builtin/index.js +1 -1
- package/lib/solana/index.js +1 -1
- package/lib/stark/index.js +1 -1
- package/lib/store/index.js +1 -1
- package/lib/sui/builtin/0x1.js +1 -1
- package/lib/sui/builtin/0x2.js +1 -1
- package/lib/sui/builtin/0x3.js +1 -1
- package/lib/sui/builtin/index.js +1 -1
- package/lib/sui/ext/index.js +1 -1
- package/lib/sui/index.js +1 -1
- package/lib/testing/index.js +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +2 -2
- package/lib/chunk-6TCLX2EB.js +0 -5
- package/lib/chunk-6TCLX2EB.js.map +0 -1
- package/lib/chunk-HD2PF2IU.js +0 -1057
- package/lib/chunk-HD2PF2IU.js.map +0 -1
- /package/lib/{chunk-4WDJVFCT.js.map → chunk-4MFZRYCX.js.map} +0 -0
- /package/lib/{chunk-PNVZOHKE.js.map → chunk-5MSYUYPI.js.map} +0 -0
- /package/lib/{chunk-7U2L6S24.js.map → chunk-D7FQ4Y4M.js.map} +0 -0
- /package/lib/{chunk-SKCEVA75.js.map → chunk-DJMQHR3M.js.map} +0 -0
- /package/lib/{chunk-UJ4VVXPL.js.map → chunk-GBDIVT34.js.map} +0 -0
- /package/lib/{chunk-RVQA7LMH.js.map → chunk-GC6A2XT6.js.map} +0 -0
- /package/lib/{chunk-CGNU33OD.js.map → chunk-H5O7SNUY.js.map} +0 -0
- /package/lib/{chunk-UPELIPCN.js.map → chunk-IAICSOJ4.js.map} +0 -0
- /package/lib/{chunk-4AW2JS23.js.map → chunk-KTTAMLWK.js.map} +0 -0
- /package/lib/{chunk-ALU3XXNT.js.map → chunk-LBNDEGPJ.js.map} +0 -0
- /package/lib/{chunk-P47UBUIP.js.map → chunk-SJDMVS3T.js.map} +0 -0
- /package/lib/{chunk-ARF3CNRW.js.map → chunk-TSGE2F43.js.map} +0 -0
- /package/lib/{chunk-CIL76VDH.js.map → chunk-U6J55JCD.js.map} +0 -0
- /package/lib/{chunk-2U75NKG7.js.map → chunk-VO4S7Q4P.js.map} +0 -0
- /package/lib/{chunk-S2Q6XTBC.js.map → chunk-XJOCMTJY.js.map} +0 -0
- /package/lib/{chunk-E74OKQE6.js.map → chunk-YJ64AKDD.js.map} +0 -0
- /package/lib/{chunk-YNF6DPGW.js.map → chunk-ZVKPIFWH.js.map} +0 -0
|
@@ -0,0 +1,943 @@
|
|
|
1
|
+
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
+
import{A as Xe,a as qw,b as Vw,c as T,d as y,f as sr,g as C,h as Ln,i as Fs,j as un,k as Xh,l as D,m as Ls,n as re,o as M,q as _d,r as Jw,s as Un,t as Ad,u as zw,v as Xu,w as Ur,x as Us,z as Gw}from"./chunk-AYDIUTOB.js";import{r as gP,t as _P,u as Hw,v as Ww}from"./chunk-PLLN42GP.js";import{b as hP,c as mP}from"./chunk-NMFPLO65.js";import{a as Jt}from"./chunk-FC546GTB.js";import{a as ye,b as jt,c as N,d as gd,e as Cn,f as ar,g as cn}from"./chunk-LLHU72AA.js";var X0=N(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.bech32m=eo.bech32=void 0;var Rd="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Z0={};for(let e=0;e<Rd.length;e++){let t=Rd.charAt(e);Z0[t]=e}function js(e){let t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function W0(e){let t=1;for(let n=0;n<e.length;++n){let r=e.charCodeAt(n);if(r<33||r>126)return"Invalid prefix ("+e+")";t=js(t)^r>>5}t=js(t);for(let n=0;n<e.length;++n){let r=e.charCodeAt(n);t=js(t)^r&31}return t}function _m(e,t,n,r){let i=0,a=0,s=(1<<n)-1,o=[];for(let c=0;c<e.length;++c)for(i=i<<t|e[c],a+=t;a>=n;)a-=n,o.push(i>>a&s);if(r)a>0&&o.push(i<<n-a&s);else{if(a>=t)return"Excess padding";if(i<<n-a&s)return"Non-zero padding"}return o}function JD(e){return _m(e,8,5,!0)}function zD(e){let t=_m(e,5,8,!1);if(Array.isArray(t))return t}function GD(e){let t=_m(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function Y0(e){let t;e==="bech32"?t=1:t=734539939;function n(s,o,c){if(c=c||90,s.length+7+o.length>c)throw new TypeError("Exceeds length limit");s=s.toLowerCase();let u=W0(s);if(typeof u=="string")throw new Error(u);let d=s+"1";for(let p=0;p<o.length;++p){let h=o[p];if(h>>5)throw new Error("Non 5-bit word");u=js(u)^h,d+=Rd.charAt(h)}for(let p=0;p<6;++p)u=js(u);u^=t;for(let p=0;p<6;++p){let h=u>>(5-p)*5&31;d+=Rd.charAt(h)}return d}function r(s,o){if(o=o||90,s.length<8)return s+" too short";if(s.length>o)return"Exceeds length limit";let c=s.toLowerCase(),u=s.toUpperCase();if(s!==c&&s!==u)return"Mixed-case string "+s;s=c;let d=s.lastIndexOf("1");if(d===-1)return"No separator character for "+s;if(d===0)return"Missing prefix for "+s;let p=s.slice(0,d),h=s.slice(d+1);if(h.length<6)return"Data too short";let _=W0(p);if(typeof _=="string")return _;let I=[];for(let v=0;v<h.length;++v){let b=h.charAt(v),w=Z0[b];if(w===void 0)return"Unknown character "+b;_=js(_)^w,!(v+6>=h.length)&&I.push(w)}return _!==t?"Invalid checksum for "+s:{prefix:p,words:I}}function i(s,o){let c=r(s,o);if(typeof c=="object")return c}function a(s,o){let c=r(s,o);if(typeof c=="object")return c;throw new Error(c)}return{decodeUnsafe:i,decode:a,encode:n,toWords:JD,fromWordsUnsafe:zD,fromWords:GD}}eo.bech32=Y0("bech32");eo.bech32m=Y0("bech32m")});var mE=N((ts,hE)=>{var il=(mP(),ar(hP)),sM=il.default||il,qd=function(e,t){return/^\/\//.test(e)&&(e="https:"+e),sM.call(this,e,t)};qd.ponyfill=!0;hE.exports=ts=qd;ts.fetch=qd;ts.Headers=il.Headers;ts.Request=il.Request;ts.Response=il.Response;ts.default=qd});var Rm=N((Ej,gE)=>{"use strict";gE.exports=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i}});var km=N((Cj,_E)=>{"use strict";var oM=Rm();_E.exports=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof oM}});var yE=N((Ij,AE)=>{"use strict";var cM=km();AE.exports=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=cM);var i,a=new Map;function s(d,p){var h=a.get(p);h?h.push.apply(h,d):a.set(p,d)}if(r(t))i=null,s([n],t);else{var o=n?n+".":"";if(typeof FileList<"u"&&t instanceof FileList)i=Array.prototype.map.call(t,function(d,p){return s([""+o+p],d),null});else if(Array.isArray(t))i=t.map(function(d,p){var h=e(d,""+o+p,r);return h.files.forEach(s),h.clone});else if(t&&t.constructor===Object){i={};for(var c in t){var u=e(t[c],""+o+c,r);u.files.forEach(s),i[c]=u.clone}}else i=t}return{clone:i,files:a}}});var bE=N(Vd=>{"use strict";Vd.ReactNativeFile=Rm();Vd.extractFiles=yE();Vd.isExtractableFile=km()});var EE=N((xj,wE)=>{var vE=ye("stream").Stream,uM=ye("util");wE.exports=dr;function dr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}uM.inherits(dr,vE);dr.create=function(e,t){var n=new this;t=t||{};for(var r in t)n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n};Object.defineProperty(dr.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});dr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};dr.prototype.resume=function(){this._released||this.release(),this.source.resume()};dr.prototype.pause=function(){this.source.pause()};dr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};dr.prototype.pipe=function(){var e=vE.prototype.pipe.apply(this,arguments);return this.resume(),e};dr.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};dr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var xE=N((Tj,SE)=>{var lM=ye("util"),IE=ye("stream").Stream,CE=EE();SE.exports=ct;function ct(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}lM.inherits(ct,IE);ct.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};ct.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};ct.prototype.append=function(e){var t=ct.isStreamLike(e);if(t){if(!(e instanceof CE)){var n=CE.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=n}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};ct.prototype.pipe=function(e,t){return IE.prototype.pipe.call(this,e,t),this.resume(),e};ct.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ct.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(n){var r=ct.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};ct.prototype._pipeNext=function(e){this._currentStream=e;var t=ct.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var n=e;this.write(n),this._getNext()};ct.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};ct.prototype.write=function(e){this.emit("data",e)};ct.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ct.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ct.prototype.end=function(){this._reset(),this.emit("end")};ct.prototype.destroy=function(){this._reset(),this.emit("close")};ct.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ct.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};ct.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ct.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var TE=N((Nj,dM)=>{dM.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var RE=N((Rj,NE)=>{NE.exports=TE()});var OE=N(dn=>{"use strict";var Jd=RE(),fM=ye("path").extname,kE=/^\s*([^;\s]*)(?:;|\s|$)/,pM=/^text\//i;dn.charset=BE;dn.charsets={lookup:BE};dn.contentType=hM;dn.extension=mM;dn.extensions=Object.create(null);dn.lookup=gM;dn.types=Object.create(null);_M(dn.extensions,dn.types);function BE(e){if(!e||typeof e!="string")return!1;var t=kE.exec(e),n=t&&Jd[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&pM.test(t[1])?"UTF-8":!1}function hM(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?dn.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=dn.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}function mM(e){if(!e||typeof e!="string")return!1;var t=kE.exec(e),n=t&&dn.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}function gM(e){if(!e||typeof e!="string")return!1;var t=fM("x."+e).toLowerCase().substr(1);return t&&dn.types[t]||!1}function _M(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(Jd).forEach(function(i){var a=Jd[i],s=a.extensions;if(!(!s||!s.length)){e[i]=s;for(var o=0;o<s.length;o++){var c=s[o];if(t[c]){var u=n.indexOf(Jd[t[c]].source),d=n.indexOf(a.source);if(t[c]!=="application/octet-stream"&&(u>d||u===d&&t[c].substr(0,12)==="application/"))continue}t[c]=i}}})}});var DE=N((Bj,PE)=>{PE.exports=AM;function AM(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var Bm=N((Oj,FE)=>{var ME=DE();FE.exports=yM;function yM(e){var t=!1;return ME(function(){t=!0}),function(r,i){t?e(r,i):ME(function(){e(r,i)})}}});var Om=N((Pj,LE)=>{LE.exports=bM;function bM(e){Object.keys(e.jobs).forEach(vM.bind(e)),e.jobs={}}function vM(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var Pm=N((Dj,QE)=>{var UE=Bm(),wM=Om();QE.exports=EM;function EM(e,t,n,r){var i=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[i]=CM(t,i,e[i],function(a,s){i in n.jobs&&(delete n.jobs[i],a?wM(n):n.results[i]=s,r(a,n.results))})}function CM(e,t,n,r){var i;return e.length==2?i=e(n,UE(r)):i=e(n,t,UE(r)),i}});var Dm=N((Mj,qE)=>{qE.exports=IM;function IM(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&r.keyedList.sort(n?t:function(i,a){return t(e[i],e[a])}),r}});var Mm=N((Fj,VE)=>{var SM=Om(),xM=Bm();VE.exports=TM;function TM(e){Object.keys(this.jobs).length&&(this.index=this.size,SM(this),xM(e)(null,this.results))}});var zE=N((Lj,JE)=>{var NM=Pm(),RM=Dm(),kM=Mm();JE.exports=BM;function BM(e,t,n){for(var r=RM(e);r.index<(r.keyedList||e).length;)NM(e,t,r,function(i,a){if(i){n(i,a);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return kM.bind(r,n)}});var Fm=N((Uj,zd)=>{var GE=Pm(),OM=Dm(),PM=Mm();zd.exports=DM;zd.exports.ascending=HE;zd.exports.descending=MM;function DM(e,t,n,r){var i=OM(e,n);return GE(e,t,i,function a(s,o){if(s){r(s,o);return}if(i.index++,i.index<(i.keyedList||e).length){GE(e,t,i,a);return}r(null,i.results)}),PM.bind(i,r)}function HE(e,t){return e<t?-1:e>t?1:0}function MM(e,t){return-1*HE(e,t)}});var ZE=N((Qj,WE)=>{var FM=Fm();WE.exports=LM;function LM(e,t,n){return FM(e,t,null,n)}});var XE=N((qj,YE)=>{YE.exports={parallel:zE(),serial:ZE(),serialOrdered:Fm()}});var KE=N((Vj,$E)=>{$E.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var tC=N((Jj,eC)=>{var qm=xE(),jE=ye("util"),Lm=ye("path"),UM=ye("http"),QM=ye("https"),qM=ye("url").parse,VM=ye("fs"),Um=OE(),JM=XE(),Qm=KE();eC.exports=Pe;jE.inherits(Pe,qm);function Pe(e){if(!(this instanceof Pe))return new Pe(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],qm.call(this),e=e||{};for(var t in e)this[t]=e[t]}Pe.LINE_BREAK=`\r
|
|
3
|
+
`;Pe.DEFAULT_CONTENT_TYPE="application/octet-stream";Pe.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=qm.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),jE.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,n),a=this._multiPartFooter();r(i),r(t),r(a),this._trackLength(i,t,n)};Pe.prototype._trackLength=function(e,t,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:typeof t=="string"&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+Pe.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion")))&&(n.knownLength||this._valuesToMeasure.push(t))};Pe.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):VM.stat(e.path,function(n,r){var i;if(n){t(n);return}i=r.size-(e.start?e.start:0),t(null,i)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(n){e.pause(),t(null,+n.headers["content-length"])}),e.resume()):t("Unknown stream")};Pe.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(t,n),i=this._getContentType(t,n),a="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&Qm(s,n.header);var o;for(var c in s)s.hasOwnProperty(c)&&(o=s[c],o!=null&&(Array.isArray(o)||(o=[o]),o.length&&(a+=c+": "+o.join("; ")+Pe.LINE_BREAK)));return"--"+this.getBoundary()+Pe.LINE_BREAK+a+Pe.LINE_BREAK};Pe.prototype._getContentDisposition=function(e,t){var n,r;return typeof t.filepath=="string"?n=Lm.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=Lm.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(n=Lm.basename(e.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};Pe.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=Um.lookup(e.name)),!n&&e.path&&(n=Um.lookup(e.path)),!n&&e.readable&&e.hasOwnProperty("httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=Um.lookup(t.filepath||t.filename)),!n&&typeof e=="object"&&(n=Pe.DEFAULT_CONTENT_TYPE),n};Pe.prototype._multiPartFooter=function(){return function(e){var t=Pe.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};Pe.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Pe.LINE_BREAK};Pe.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(n[t.toLowerCase()]=e[t]);return n};Pe.prototype.setBoundary=function(e){this._boundary=e};Pe.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Pe.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?e=Buffer.concat([e,this._streams[n]]):e=Buffer.concat([e,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(Pe.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Pe.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};Pe.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};Pe.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Pe.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}JM.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){e(n);return}r.forEach(function(i){t+=i}),e(null,t)})};Pe.prototype.submit=function(e,t){var n,r,i={method:"post"};return typeof e=="string"?(e=qM(e),r=Qm({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=Qm(e,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(e.headers),r.protocol=="https:"?n=QM.request(r):n=UM.request(r),this.getLength(function(a,s){if(a){this._error(a);return}if(n.setHeader("Content-Length",s),this.pipe(n),t){var o,c=function(u,d){return n.removeListener("error",c),n.removeListener("response",o),t.call(this,u,d)};o=c.bind(this,null),n.on("error",c),n.on("response",o)}}.bind(this)),n};Pe.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Pe.prototype.toString=function(){return"[object FormData]"}});var Vm=N(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.defaultJsonSerializer=void 0;Gd.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify}});var rC=N(al=>{"use strict";var zM=al&&al.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(al,"__esModule",{value:!0});var nC=bE(),GM=zM(tC()),HM=Vm(),WM=function(e){return nC.isExtractableFile(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function ZM(e,t,n,r){r===void 0&&(r=HM.defaultJsonSerializer);var i=nC.extractFiles({query:e,variables:t,operationName:n},"",WM),a=i.clone,s=i.files;if(s.size===0){if(!Array.isArray(e))return r.stringify(a);if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var o=e.reduce(function(h,_,I){return h.push({query:_,variables:t?t[I]:void 0}),h},[]);return r.stringify(o)}var c=typeof FormData>"u"?GM.default:FormData,u=new c;u.append("operations",r.stringify(a));var d={},p=0;return s.forEach(function(h){d[++p]=h}),u.append("map",r.stringify(d)),p=0,s.forEach(function(h,_){u.append(""+ ++p,_)}),u}al.default=ZM});var iC=N(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.parseBatchRequestsExtendedArgs=fn.parseRawRequestExtendedArgs=fn.parseRequestExtendedArgs=fn.parseBatchRequestArgs=fn.parseRawRequestArgs=fn.parseRequestArgs=void 0;function YM(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}fn.parseRequestArgs=YM;function XM(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}fn.parseRawRequestArgs=XM;function $M(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}fn.parseBatchRequestArgs=$M;function KM(e,t,n,r){return e.document?e:{url:e,document:t,variables:n,requestHeaders:r,signal:void 0}}fn.parseRequestExtendedArgs=KM;function jM(e,t,n,r){return e.query?e:{url:e,query:t,variables:n,requestHeaders:r,signal:void 0}}fn.parseRawRequestExtendedArgs=jM;function eF(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}fn.parseBatchRequestsExtendedArgs=eF});var Jm=N(io=>{"use strict";var tF=io&&io.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(io,"__esModule",{value:!0});io.ClientError=void 0;var nF=function(e){tF(t,e);function t(n,r){var i=this,a=t.extractMessage(n)+": "+JSON.stringify({response:n,request:r});return i=e.call(this,a)||this,Object.setPrototypeOf(i,t.prototype),i.response=n,i.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t.extractMessage=function(n){try{return n.errors[0].message}catch{return"GraphQL Error (Code: "+n.status+")"}},t}(Error);io.ClientError=nF});var lC=N(Hr=>{"use strict";var Hd=Hr&&Hr.__assign||function(){return Hd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Hd.apply(this,arguments)},rF=Hr&&Hr.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?a(d.value):i(d.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},iF=Hr&&Hr.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.GraphQLWebSocketClient=void 0;var aC=Jm(),aF=zm(),sF="connection_init",oF="connection_ack",oC="ping",cC="pong",cF="subscribe",uF="next",lF="error",uC="complete",ao=function(){function e(t,n,r){this._type=t,this._payload=n,this._id=r}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){var t={type:this.type};return this.id!=null&&this.id!=null&&(t.id=this.id),this.payload!=null&&this.payload!=null&&(t.payload=this.payload),JSON.stringify(t)},enumerable:!1,configurable:!0}),e.parse=function(t,n){var r=JSON.parse(t),i=r.type,a=r.payload,s=r.id;return new e(i,n(a),s)},e}(),dF=function(){function e(t,n){var r=this,i=n.onInit,a=n.onAcknowledged,s=n.onPing,o=n.onPong;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=t,t.onopen=function(c){return rF(r,void 0,void 0,function(){var u,d,p,h;return iF(this,function(_){switch(_.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},d=(u=t).send,p=pF,i?[4,i()]:[3,2];case 1:return h=_.sent(),[3,3];case 2:h=null,_.label=3;case 3:return d.apply(u,[p.apply(void 0,[h]).text]),[2]}})})},t.onclose=function(c){r.socketState.acknowledged=!1,r.socketState.subscriptions={}},t.onerror=function(c){console.error(c)},t.onmessage=function(c){try{var u=fF(c.data);switch(u.type){case oF:{r.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(r.socketState.acknowledged=!0,a&&a(u.payload));return}case oC:{s?s(u.payload).then(function(I){return t.send(sC(I).text)}):t.send(sC(null).text);return}case cC:{o&&o(u.payload);return}}if(!r.socketState.acknowledged||u.id===void 0||u.id===null||!r.socketState.subscriptions[u.id])return;var d=r.socketState.subscriptions[u.id],p=d.query,h=d.variables,_=d.subscriber;switch(u.type){case uF:{!u.payload.errors&&u.payload.data&&_.next&&_.next(u.payload.data),u.payload.errors&&_.error&&_.error(new aC.ClientError(Hd(Hd({},u.payload),{status:200}),{query:p,variables:h}));return}case lF:{_.error&&_.error(new aC.ClientError({errors:u.payload,status:200},{query:p,variables:h}));return}case uC:{_.complete&&_.complete(),delete r.socketState.subscriptions[u.id];return}}}catch(I){console.error(I),t.close(1006)}t.close(4400,"Unknown graphql-ws message.")}}return e.prototype.makeSubscribe=function(t,n,r,i){var a=this,s=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[s]={query:t,variables:r,subscriber:i},this.socket.send(mF(s,{query:t,operationName:n,variables:r}).text),function(){a.socket.send(gF(s).text),delete a.socketState.subscriptions[s]}},e.prototype.rawRequest=function(t,n){var r=this;return new Promise(function(i,a){var s;r.rawSubscribe(t,{next:function(o,c){return s={data:o,extensions:c}},error:a,complete:function(){return i(s)}},n)})},e.prototype.request=function(t,n){var r=this;return new Promise(function(i,a){var s;r.subscribe(t,{next:function(o){return s=o},error:a,complete:function(){return i(s)}},n)})},e.prototype.subscribe=function(t,n,r){var i=aF.resolveRequestDocument(t),a=i.query,s=i.operationName;return this.makeSubscribe(a,s,r,n)},e.prototype.rawSubscribe=function(t,n,r){return this.makeSubscribe(t,void 0,r,n)},e.prototype.ping=function(t){this.socket.send(hF(t).text)},e.prototype.close=function(){this.socket.close(1e3)},e.PROTOCOL="graphql-transport-ws",e}();Hr.GraphQLWebSocketClient=dF;function fF(e,t){t===void 0&&(t=function(r){return r});var n=ao.parse(e,t);return n}function pF(e){return new ao(sF,e)}function hF(e){return new ao(oC,e,void 0)}function sC(e){return new ao(cC,e,void 0)}function mF(e,t){return new ao(cF,t,e)}function gF(e){return new ao(uC,void 0,e)}});var zm=N(Re=>{"use strict";var At=Re&&Re.__assign||function(){return At=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},At.apply(this,arguments)},_F=Re&&Re.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),AF=Re&&Re.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),yF=Re&&Re.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&_F(t,e,n);return AF(t,e),t},ta=Re&&Re.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?a(d.value):i(d.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},na=Re&&Re.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Wd=Re&&Re.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},bF=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.GraphQLWebSocketClient=Re.gql=Re.resolveRequestDocument=Re.batchRequests=Re.request=Re.rawRequest=Re.GraphQLClient=Re.ClientError=void 0;var Zd=yF(mE()),Gm=Zd,vF=gP(),wF=_P(),EF=bF(rC()),CF=Vm(),oo=iC(),pC=Jm();Object.defineProperty(Re,"ClientError",{enumerable:!0,get:function(){return pC.ClientError}});var so=function(e){var t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Gm&&Gm.Headers&&e instanceof Gm.Headers?t=BF(e):Array.isArray(e)?e.forEach(function(n){var r=n[0],i=n[1];t[r]=i}):t=e),t},dC=function(e){return e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},IF=function(e){var t=e.query,n=e.variables,r=e.operationName,i=e.jsonSerializer;if(!Array.isArray(t)){var a=["query="+encodeURIComponent(dC(t))];return n&&a.push("variables="+encodeURIComponent(i.stringify(n))),r&&a.push("operationName="+encodeURIComponent(r)),a.join("&")}if(typeof n<"u"&&!Array.isArray(n))throw new Error("Cannot create query with given variable type, array expected");var s=t.reduce(function(o,c,u){return o.push({query:dC(c),variables:n?i.stringify(n[u]):void 0}),o},[]);return"query="+encodeURIComponent(i.stringify(s))},SF=function(e){var t=e.url,n=e.query,r=e.variables,i=e.operationName,a=e.headers,s=e.fetch,o=e.fetchOptions,c=e.middleware;return ta(void 0,void 0,void 0,function(){var u,d;return na(this,function(p){switch(p.label){case 0:return u=EF.default(n,r,i,o.jsonSerializer),d=At({method:"POST",headers:At(At({},typeof u=="string"?{"Content-Type":"application/json"}:{}),a),body:u},o),c?[4,Promise.resolve(c(d))]:[3,2];case 1:d=p.sent(),p.label=2;case 2:return[4,s(t,d)];case 3:return[2,p.sent()]}})})},xF=function(e){var t=e.url,n=e.query,r=e.variables,i=e.operationName,a=e.headers,s=e.fetch,o=e.fetchOptions,c=e.middleware;return ta(void 0,void 0,void 0,function(){var u,d;return na(this,function(p){switch(p.label){case 0:return u=IF({query:n,variables:r,operationName:i,jsonSerializer:o.jsonSerializer}),d=At({method:"GET",headers:a},o),c?[4,Promise.resolve(c(d))]:[3,2];case 1:d=p.sent(),p.label=2;case 2:return[4,s(t+"?"+u,d)];case 3:return[2,p.sent()]}})})},Xd=function(){function e(t,n){n===void 0&&(n={}),this.url=t,this.options=n}return e.prototype.rawRequest=function(t,n,r){return ta(this,void 0,void 0,function(){var i,a,s,o,c,u,d,p,h,_,I,v;return na(this,function(b){return i=oo.parseRawRequestArgs(t,n,r),a=this.options,s=a.headers,o=a.fetch,c=o===void 0?Zd.default:o,u=a.method,d=u===void 0?"POST":u,p=a.requestMiddleware,h=a.responseMiddleware,_=Wd(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),I=this.url,i.signal!==void 0&&(_.signal=i.signal),v=Yd(i.query).operationName,[2,Hm({url:I,query:i.query,variables:i.variables,headers:At(At({},so(Wm(s))),so(i.requestHeaders)),operationName:v,fetch:c,method:d,fetchOptions:_,middleware:p}).then(function(w){return h&&h(w),w}).catch(function(w){throw h&&h(w),w})]})})},e.prototype.request=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=n[0],a=n[1],s=oo.parseRequestArgs(t,i,a),o=this.options,c=o.headers,u=o.fetch,d=u===void 0?Zd.default:u,p=o.method,h=p===void 0?"POST":p,_=o.requestMiddleware,I=o.responseMiddleware,v=Wd(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),b=this.url;s.signal!==void 0&&(v.signal=s.signal);var w=Yd(s.document),x=w.query,R=w.operationName;return Hm({url:b,query:x,variables:s.variables,headers:At(At({},so(Wm(c))),so(s.requestHeaders)),operationName:R,fetch:d,method:h,fetchOptions:v,middleware:_}).then(function(k){return I&&I(k),k.data}).catch(function(k){throw I&&I(k),k})},e.prototype.batchRequests=function(t,n){var r=oo.parseBatchRequestArgs(t,n),i=this.options,a=i.headers,s=i.fetch,o=s===void 0?Zd.default:s,c=i.method,u=c===void 0?"POST":c,d=i.requestMiddleware,p=i.responseMiddleware,h=Wd(i,["headers","fetch","method","requestMiddleware","responseMiddleware"]),_=this.url;r.signal!==void 0&&(h.signal=r.signal);var I=r.documents.map(function(b){var w=b.document;return Yd(w).query}),v=r.documents.map(function(b){var w=b.variables;return w});return Hm({url:_,query:I,variables:v,headers:At(At({},so(Wm(a))),so(r.requestHeaders)),operationName:void 0,fetch:o,method:u,fetchOptions:h,middleware:d}).then(function(b){return p&&p(b),b.data}).catch(function(b){throw p&&p(b),b})},e.prototype.setHeaders=function(t){return this.options.headers=t,this},e.prototype.setHeader=function(t,n){var r,i=this.options.headers;return i?i[t]=n:this.options.headers=(r={},r[t]=n,r),this},e.prototype.setEndpoint=function(t){return this.url=t,this},e}();Re.GraphQLClient=Xd;function Hm(e){var t=e.url,n=e.query,r=e.variables,i=e.headers,a=e.operationName,s=e.fetch,o=e.method,c=o===void 0?"POST":o,u=e.fetchOptions,d=e.middleware;return ta(this,void 0,void 0,function(){var p,h,_,I,v,b,w,x,R,k,q,U;return na(this,function(V){switch(V.label){case 0:return p=c.toUpperCase()==="POST"?SF:xF,h=Array.isArray(n),[4,p({url:t,query:n,variables:r,operationName:a,headers:i,fetch:s,fetchOptions:u,middleware:d})];case 1:return _=V.sent(),[4,RF(_,u.jsonSerializer)];case 2:if(I=V.sent(),v=h&&Array.isArray(I)?!I.some(function(Z){var X=Z.data;return!X}):!!I.data,b=!I.errors||u.errorPolicy==="all"||u.errorPolicy==="ignore",_.ok&&b&&v)return w=_.headers,x=_.status,R=I.errors,k=Wd(I,["errors"]),q=u.errorPolicy==="ignore"?k:I,[2,At(At({},h?{data:q}:q),{headers:w,status:x})];throw U=typeof I=="string"?{error:I}:I,new pC.ClientError(At(At({},U),{status:_.status,headers:_.headers}),{query:n,variables:r})}})})}function TF(e,t,n,r){return ta(this,void 0,void 0,function(){var i,a;return na(this,function(s){return i=oo.parseRawRequestExtendedArgs(e,t,n,r),a=new Xd(i.url),[2,a.rawRequest(At({},i))]})})}Re.rawRequest=TF;function hC(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ta(this,void 0,void 0,function(){var i,a,s,o;return na(this,function(c){return i=n[0],a=n[1],s=oo.parseRequestExtendedArgs(e,t,i,a),o=new Xd(s.url),[2,o.request(At({},s))]})})}Re.request=hC;function NF(e,t,n){return ta(this,void 0,void 0,function(){var r,i;return na(this,function(a){return r=oo.parseBatchRequestsExtendedArgs(e,t,n),i=new Xd(r.url),[2,i.batchRequests(At({},r))]})})}Re.batchRequests=NF;Re.default=hC;function RF(e,t){return t===void 0&&(t=CF.defaultJsonSerializer),ta(this,void 0,void 0,function(){var n,r,i;return na(this,function(a){switch(a.label){case 0:return e.headers.forEach(function(s,o){o.toLowerCase()==="content-type"&&(n=s)}),n&&n.toLowerCase().startsWith("application/json")?(i=(r=t).parse,[4,e.text()]):[3,2];case 1:return[2,i.apply(r,[a.sent()])];case 2:return[2,e.text()]}})})}function fC(e){var t,n=void 0,r=e.definitions.filter(function(i){return i.kind==="OperationDefinition"});return r.length===1&&(n=(t=r[0].name)===null||t===void 0?void 0:t.value),n}function Yd(e){if(typeof e=="string"){var t=void 0;try{var n=vF.parse(e);t=fC(n)}catch{}return{query:e,operationName:t}}var r=fC(e);return{query:wF.print(e),operationName:r}}Re.resolveRequestDocument=Yd;function Wm(e){return typeof e=="function"?e():e}function kF(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.reduce(function(r,i,a){return""+r+i+(a in t?t[a]:"")},"")}Re.gql=kF;function BF(e){var t={};return e.forEach(function(n,r){t[r]=n}),t}var OF=lC();Object.defineProperty(Re,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return OF.GraphQLWebSocketClient}})});var bo=N(S=>{"use strict";var l,CS=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&CS.decode();var cl=null;function IS(){return(cl===null||cl.byteLength===0)&&(cl=new Uint8Array(l.memory.buffer)),cl}function VF(e,t){return e=e>>>0,CS.decode(IS().subarray(e,e+t))}function m(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function JF(e,t){let n=l.gm_args(e,t);return L.__wrap(n)}function zF(e,t,n){let r=l.gtf_args(e,t,n);return L.__wrap(r)}function GF(e,t,n,r){m(r,Wr);var i=r.__destroy_into_raw();let a=l.wdcm_args(e,t,n,i);return L.__wrap(a)}function HF(e,t,n,r){m(r,Wr);var i=r.__destroy_into_raw();let a=l.wqcm_args(e,t,n,i);return L.__wrap(a)}function WF(e,t,n,r){m(r,is);var i=r.__destroy_into_raw();let a=l.wdop_args(e,t,n,i);return L.__wrap(a)}function ZF(e,t,n,r){m(r,is);var i=r.__destroy_into_raw();let a=l.wqop_args(e,t,n,i);return L.__wrap(a)}function YF(e,t,n,r){m(r,as);var i=r.__destroy_into_raw();let a=l.wdml_args(e,t,n,i);return L.__wrap(a)}function XF(e,t,n,r){m(r,as);var i=r.__destroy_into_raw();let a=l.wqml_args(e,t,n,i);return L.__wrap(a)}function $F(e,t,n,r){m(r,rs);var i=r.__destroy_into_raw();let a=l.wddv_args(e,t,n,i);return L.__wrap(a)}function KF(e,t,n,r){m(r,rs);var i=r.__destroy_into_raw();let a=l.wqdv_args(e,t,n,i);return L.__wrap(a)}function jF(e,t,n){let r=l.add(e,t,n);return L.__wrap(r)}function eL(e,t,n){let r=l.and(e,t,n);return L.__wrap(r)}function tL(e,t,n){let r=l.div(e,t,n);return L.__wrap(r)}function nL(e,t,n){let r=l.eq(e,t,n);return L.__wrap(r)}function rL(e,t,n){let r=l.exp(e,t,n);return L.__wrap(r)}function iL(e,t,n){let r=l.gt(e,t,n);return L.__wrap(r)}function aL(e,t,n){let r=l.lt(e,t,n);return L.__wrap(r)}function sL(e,t,n){let r=l.mlog(e,t,n);return L.__wrap(r)}function oL(e,t,n){let r=l.mroo(e,t,n);return L.__wrap(r)}function cL(e,t,n){let r=l.mod_(e,t,n);return L.__wrap(r)}function uL(e,t){let n=l.move_(e,t);return L.__wrap(n)}function lL(e,t,n){let r=l.mul(e,t,n);return L.__wrap(r)}function dL(e,t){let n=l.not(e,t);return L.__wrap(n)}function fL(e,t,n){let r=l.or(e,t,n);return L.__wrap(r)}function pL(e,t,n){let r=l.sll(e,t,n);return L.__wrap(r)}function hL(e,t,n){let r=l.srl(e,t,n);return L.__wrap(r)}function mL(e,t,n){let r=l.sub(e,t,n);return L.__wrap(r)}function gL(e,t,n){let r=l.xor(e,t,n);return L.__wrap(r)}function _L(e,t,n,r){let i=l.mldv(e,t,n,r);return L.__wrap(i)}function AL(e){let t=l.ret(e);return L.__wrap(t)}function yL(e,t){let n=l.retd(e,t);return L.__wrap(n)}function bL(e){let t=l.aloc(e);return L.__wrap(t)}function vL(e,t){let n=l.mcl(e,t);return L.__wrap(n)}function wL(e,t,n){let r=l.mcp(e,t,n);return L.__wrap(r)}function EL(e,t,n,r){let i=l.meq(e,t,n,r);return L.__wrap(i)}function CL(e,t){let n=l.bhsh(e,t);return L.__wrap(n)}function IL(e){let t=l.bhei(e);return L.__wrap(t)}function SL(e,t){let n=l.burn(e,t);return L.__wrap(n)}function xL(e,t,n,r){let i=l.call(e,t,n,r);return L.__wrap(i)}function TL(e,t,n,r){let i=l.ccp(e,t,n,r);return L.__wrap(i)}function NL(e,t){let n=l.croo(e,t);return L.__wrap(n)}function RL(e,t){let n=l.csiz(e,t);return L.__wrap(n)}function kL(e){let t=l.cb(e);return L.__wrap(t)}function BL(e,t,n,r){let i=l.ldc(e,t,n,r);return L.__wrap(i)}function OL(e,t,n,r){let i=l.log(e,t,n,r);return L.__wrap(i)}function PL(e,t,n,r){let i=l.logd(e,t,n,r);return L.__wrap(i)}function DL(e,t){let n=l.mint(e,t);return L.__wrap(n)}function ML(e){let t=l.rvrt(e);return L.__wrap(t)}function FL(e,t,n){let r=l.scwq(e,t,n);return L.__wrap(r)}function LL(e,t,n){let r=l.srw(e,t,n);return L.__wrap(r)}function UL(e,t,n,r){let i=l.srwq(e,t,n,r);return L.__wrap(i)}function QL(e,t,n){let r=l.sww(e,t,n);return L.__wrap(r)}function qL(e,t,n,r){let i=l.swwq(e,t,n,r);return L.__wrap(i)}function VL(e,t,n){let r=l.tr(e,t,n);return L.__wrap(r)}function JL(e,t,n,r){let i=l.tro(e,t,n,r);return L.__wrap(i)}function zL(e,t,n){let r=l.eck1(e,t,n);return L.__wrap(r)}function GL(e,t,n){let r=l.ecr1(e,t,n);return L.__wrap(r)}function HL(e,t,n,r){let i=l.ed19(e,t,n,r);return L.__wrap(i)}function WL(e,t,n){let r=l.k256(e,t,n);return L.__wrap(r)}function ZL(e,t,n){let r=l.s256(e,t,n);return L.__wrap(r)}function YL(e,t){let n=l.time(e,t);return L.__wrap(n)}function XL(){let e=l.noop();return L.__wrap(e)}function $L(e){let t=l.flag(e);return L.__wrap(t)}function KL(e,t,n){let r=l.bal(e,t,n);return L.__wrap(r)}function jL(e){let t=l.jmp(e);return L.__wrap(t)}function e4(e,t,n){let r=l.jne(e,t,n);return L.__wrap(r)}function t4(e,t,n,r){let i=l.smo(e,t,n,r);return L.__wrap(i)}function n4(e,t,n){let r=l.addi(e,t,n);return L.__wrap(r)}function r4(e,t,n){let r=l.andi(e,t,n);return L.__wrap(r)}function i4(e,t,n){let r=l.divi(e,t,n);return L.__wrap(r)}function a4(e,t,n){let r=l.expi(e,t,n);return L.__wrap(r)}function s4(e,t,n){let r=l.modi(e,t,n);return L.__wrap(r)}function o4(e,t,n){let r=l.muli(e,t,n);return L.__wrap(r)}function c4(e,t,n){let r=l.ori(e,t,n);return L.__wrap(r)}function u4(e,t,n){let r=l.slli(e,t,n);return L.__wrap(r)}function l4(e,t,n){let r=l.srli(e,t,n);return L.__wrap(r)}function d4(e,t,n){let r=l.subi(e,t,n);return L.__wrap(r)}function f4(e,t,n){let r=l.xori(e,t,n);return L.__wrap(r)}function p4(e,t,n){let r=l.jnei(e,t,n);return L.__wrap(r)}function h4(e,t,n){let r=l.lb(e,t,n);return L.__wrap(r)}function m4(e,t,n){let r=l.lw(e,t,n);return L.__wrap(r)}function g4(e,t,n){let r=l.sb(e,t,n);return L.__wrap(r)}function _4(e,t,n){let r=l.sw(e,t,n);return L.__wrap(r)}function A4(e,t,n){let r=l.mcpi(e,t,n);return L.__wrap(r)}function y4(e,t,n){let r=l.gtf(e,t,n);return L.__wrap(r)}function b4(e,t){let n=l.mcli(e,t);return L.__wrap(n)}function v4(e,t){let n=l.gm(e,t);return L.__wrap(n)}function w4(e,t){let n=l.movi(e,t);return L.__wrap(n)}function E4(e,t){let n=l.jnzi(e,t);return L.__wrap(n)}function C4(e,t){let n=l.jmpf(e,t);return L.__wrap(n)}function I4(e,t){let n=l.jmpb(e,t);return L.__wrap(n)}function S4(e,t,n){let r=l.jnzf(e,t,n);return L.__wrap(r)}function x4(e,t,n){let r=l.jnzb(e,t,n);return L.__wrap(r)}function T4(e,t,n,r){let i=l.jnef(e,t,n,r);return L.__wrap(i)}function N4(e,t,n,r){let i=l.jneb(e,t,n,r);return L.__wrap(i)}function R4(e){let t=l.ji(e);return L.__wrap(t)}function k4(e){let t=l.cfei(e);return L.__wrap(t)}function B4(e){let t=l.cfsi(e);return L.__wrap(t)}function O4(e){let t=l.cfe(e);return L.__wrap(t)}function P4(e){let t=l.cfs(e);return L.__wrap(t)}function D4(e){let t=l.pshl(e);return L.__wrap(t)}function M4(e){let t=l.pshh(e);return L.__wrap(t)}function F4(e){let t=l.popl(e);return L.__wrap(t)}function L4(e){let t=l.poph(e);return L.__wrap(t)}function U4(e,t,n,r){let i=l.wdcm(e,t,n,r);return L.__wrap(i)}function Q4(e,t,n,r){let i=l.wqcm(e,t,n,r);return L.__wrap(i)}function q4(e,t,n,r){let i=l.wdop(e,t,n,r);return L.__wrap(i)}function V4(e,t,n,r){let i=l.wqop(e,t,n,r);return L.__wrap(i)}function J4(e,t,n,r){let i=l.wdml(e,t,n,r);return L.__wrap(i)}function z4(e,t,n,r){let i=l.wqml(e,t,n,r);return L.__wrap(i)}function G4(e,t,n,r){let i=l.wddv(e,t,n,r);return L.__wrap(i)}function H4(e,t,n,r){let i=l.wqdv(e,t,n,r);return L.__wrap(i)}function W4(e,t,n,r){let i=l.wdmd(e,t,n,r);return L.__wrap(i)}function Z4(e,t,n,r){let i=l.wqmd(e,t,n,r);return L.__wrap(i)}function Y4(e,t,n,r){let i=l.wdam(e,t,n,r);return L.__wrap(i)}function X4(e,t,n,r){let i=l.wqam(e,t,n,r);return L.__wrap(i)}function $4(e,t,n,r){let i=l.wdmm(e,t,n,r);return L.__wrap(i)}function K4(e,t,n,r){let i=l.wqmm(e,t,n,r);return L.__wrap(i)}function j4(e,t,n,r){let i=l.ecal(e,t,n,r);return L.__wrap(i)}function e6(e,t){let n=l.bsiz(e,t);return L.__wrap(n)}function t6(e,t,n,r){let i=l.bldd(e,t,n,r);return L.__wrap(i)}var ns=null;function EC(){return(ns===null||ns.buffer.detached===!0||ns.buffer.detached===void 0&&ns.buffer!==l.memory.buffer)&&(ns=new DataView(l.memory.buffer)),ns}function n6(e,t){return e=e>>>0,IS().subarray(e/1,e/1+t)}var r6=Object.freeze({EQ:0,0:"EQ",NE:1,1:"NE",LT:2,2:"LT",GT:3,3:"GT",LTE:4,4:"LTE",GTE:5,5:"GTE",LZC:6,6:"LZC"}),i6=Object.freeze({IsCallerExternal:1,1:"IsCallerExternal",GetCaller:2,2:"GetCaller",GetVerifyingPredicate:3,3:"GetVerifyingPredicate",GetChainId:4,4:"GetChainId",TxStart:5,5:"TxStart",BaseAssetId:6,6:"BaseAssetId"}),a6=Object.freeze({Type:1,1:"Type",ScriptGasLimit:2,2:"ScriptGasLimit",ScriptLength:3,3:"ScriptLength",ScriptDataLength:4,4:"ScriptDataLength",ScriptInputsCount:5,5:"ScriptInputsCount",ScriptOutputsCount:6,6:"ScriptOutputsCount",ScriptWitnessesCount:7,7:"ScriptWitnessesCount",Script:9,9:"Script",ScriptData:10,10:"ScriptData",ScriptInputAtIndex:11,11:"ScriptInputAtIndex",ScriptOutputAtIndex:12,12:"ScriptOutputAtIndex",ScriptWitnessAtIndex:13,13:"ScriptWitnessAtIndex",TxLength:14,14:"TxLength",CreateBytecodeWitnessIndex:257,257:"CreateBytecodeWitnessIndex",CreateStorageSlotsCount:258,258:"CreateStorageSlotsCount",CreateInputsCount:259,259:"CreateInputsCount",CreateOutputsCount:260,260:"CreateOutputsCount",CreateWitnessesCount:261,261:"CreateWitnessesCount",CreateSalt:262,262:"CreateSalt",CreateStorageSlotAtIndex:263,263:"CreateStorageSlotAtIndex",CreateInputAtIndex:264,264:"CreateInputAtIndex",CreateOutputAtIndex:265,265:"CreateOutputAtIndex",CreateWitnessAtIndex:266,266:"CreateWitnessAtIndex",InputType:512,512:"InputType",InputCoinTxId:513,513:"InputCoinTxId",InputCoinOutputIndex:514,514:"InputCoinOutputIndex",InputCoinOwner:515,515:"InputCoinOwner",InputCoinAmount:516,516:"InputCoinAmount",InputCoinAssetId:517,517:"InputCoinAssetId",InputCoinTxPointer:518,518:"InputCoinTxPointer",InputCoinWitnessIndex:519,519:"InputCoinWitnessIndex",InputCoinPredicateLength:521,521:"InputCoinPredicateLength",InputCoinPredicateDataLength:522,522:"InputCoinPredicateDataLength",InputCoinPredicate:523,523:"InputCoinPredicate",InputCoinPredicateData:524,524:"InputCoinPredicateData",InputCoinPredicateGasUsed:525,525:"InputCoinPredicateGasUsed",InputContractTxId:544,544:"InputContractTxId",InputContractOutputIndex:545,545:"InputContractOutputIndex",InputContractId:549,549:"InputContractId",InputMessageSender:576,576:"InputMessageSender",InputMessageRecipient:577,577:"InputMessageRecipient",InputMessageAmount:578,578:"InputMessageAmount",InputMessageNonce:579,579:"InputMessageNonce",InputMessageWitnessIndex:580,580:"InputMessageWitnessIndex",InputMessageDataLength:581,581:"InputMessageDataLength",InputMessagePredicateLength:582,582:"InputMessagePredicateLength",InputMessagePredicateDataLength:583,583:"InputMessagePredicateDataLength",InputMessageData:584,584:"InputMessageData",InputMessagePredicate:585,585:"InputMessagePredicate",InputMessagePredicateData:586,586:"InputMessagePredicateData",InputMessagePredicateGasUsed:587,587:"InputMessagePredicateGasUsed",OutputType:768,768:"OutputType",OutputCoinTo:769,769:"OutputCoinTo",OutputCoinAmount:770,770:"OutputCoinAmount",OutputCoinAssetId:771,771:"OutputCoinAssetId",OutputContractInputIndex:772,772:"OutputContractInputIndex",OutputContractCreatedContractId:775,775:"OutputContractCreatedContractId",OutputContractCreatedStateRoot:776,776:"OutputContractCreatedStateRoot",WitnessDataLength:1024,1024:"WitnessDataLength",WitnessData:1025,1025:"WitnessData",PolicyTypes:1280,1280:"PolicyTypes",PolicyTip:1281,1281:"PolicyTip",PolicyWitnessLimit:1282,1282:"PolicyWitnessLimit",PolicyMaturity:1283,1283:"PolicyMaturity",PolicyMaxFee:1284,1284:"PolicyMaxFee"}),s6=Object.freeze({ADD:0,0:"ADD",SUB:1,1:"SUB",NOT:2,2:"NOT",OR:3,3:"OR",XOR:4,4:"XOR",AND:5,5:"AND",SHL:6,6:"SHL",SHR:7,7:"SHR"}),o6=Object.freeze({UnknownPanicReason:0,0:"UnknownPanicReason",Revert:1,1:"Revert",OutOfGas:2,2:"OutOfGas",TransactionValidity:3,3:"TransactionValidity",MemoryOverflow:4,4:"MemoryOverflow",ArithmeticOverflow:5,5:"ArithmeticOverflow",ContractNotFound:6,6:"ContractNotFound",MemoryOwnership:7,7:"MemoryOwnership",NotEnoughBalance:8,8:"NotEnoughBalance",ExpectedInternalContext:9,9:"ExpectedInternalContext",AssetIdNotFound:10,10:"AssetIdNotFound",InputNotFound:11,11:"InputNotFound",OutputNotFound:12,12:"OutputNotFound",WitnessNotFound:13,13:"WitnessNotFound",TransactionMaturity:14,14:"TransactionMaturity",InvalidMetadataIdentifier:15,15:"InvalidMetadataIdentifier",MalformedCallStructure:16,16:"MalformedCallStructure",ReservedRegisterNotWritable:17,17:"ReservedRegisterNotWritable",InvalidFlags:18,18:"InvalidFlags",InvalidImmediateValue:19,19:"InvalidImmediateValue",ExpectedCoinInput:20,20:"ExpectedCoinInput",EcalError:21,21:"EcalError",MemoryWriteOverlap:22,22:"MemoryWriteOverlap",ContractNotInInputs:23,23:"ContractNotInInputs",InternalBalanceOverflow:24,24:"InternalBalanceOverflow",ContractMaxSize:25,25:"ContractMaxSize",ExpectedUnallocatedStack:26,26:"ExpectedUnallocatedStack",MaxStaticContractsReached:27,27:"MaxStaticContractsReached",TransferAmountCannotBeZero:28,28:"TransferAmountCannotBeZero",ExpectedOutputVariable:29,29:"ExpectedOutputVariable",ExpectedParentInternalContext:30,30:"ExpectedParentInternalContext",PredicateReturnedNonOne:31,31:"PredicateReturnedNonOne",ContractIdAlreadyDeployed:32,32:"ContractIdAlreadyDeployed",ContractMismatch:33,33:"ContractMismatch",MessageDataTooLong:34,34:"MessageDataTooLong",ArithmeticError:35,35:"ArithmeticError",ContractInstructionNotAllowed:36,36:"ContractInstructionNotAllowed",TransferZeroCoins:37,37:"TransferZeroCoins",InvalidInstruction:38,38:"InvalidInstruction",MemoryNotExecutable:39,39:"MemoryNotExecutable",PolicyIsNotSet:40,40:"PolicyIsNotSet",PolicyNotFound:41,41:"PolicyNotFound",TooManyReceipts:42,42:"TooManyReceipts",BalanceOverflow:43,43:"BalanceOverflow",InvalidBlockHeight:44,44:"InvalidBlockHeight",TooManySlots:45,45:"TooManySlots",ExpectedNestedCaller:46,46:"ExpectedNestedCaller",MemoryGrowthOverlap:47,47:"MemoryGrowthOverlap",UninitalizedMemoryAccess:48,48:"UninitalizedMemoryAccess",OverridingConsensusParameters:49,49:"OverridingConsensusParameters",UnknownStateTransactionBytecodeRoot:50,50:"UnknownStateTransactionBytecodeRoot",OverridingStateTransactionBytecode:51,51:"OverridingStateTransactionBytecode",BytecodeAlreadyUploaded:52,52:"BytecodeAlreadyUploaded",ThePartIsNotSequentiallyConnected:53,53:"ThePartIsNotSequentiallyConnected",BlobNotFound:54,54:"BlobNotFound",BlobIdAlreadyUploaded:55,55:"BlobIdAlreadyUploaded",GasCostNotDefined:56,56:"GasCostNotDefined"}),CC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_add_free(e>>>0,1)),sg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,CC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_add_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,CC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},IC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_addi_free(e>>>0,1)),og=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,IC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_addi_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,IC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},SC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_aloc_free(e>>>0,1)),cg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,SC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_aloc_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,SC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},xC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_and_free(e>>>0,1)),ug=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,xC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_and_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,xC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},TC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_andi_free(e>>>0,1)),lg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,TC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_andi_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,TC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},NC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bal_free(e>>>0,1)),dg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,NC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bal_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,NC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},RC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bhei_free(e>>>0,1)),fg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,RC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bhei_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,RC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},kC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bhsh_free(e>>>0,1)),pg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,kC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bhsh_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,kC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},BC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bldd_free(e>>>0,1)),hg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,BC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bldd_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,BC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},OC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bsiz_free(e>>>0,1)),mg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,OC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bsiz_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,OC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},PC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_burn_free(e>>>0,1)),gg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,PC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_burn_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,PC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},DC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_call_free(e>>>0,1)),_g=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,DC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_call_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,DC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},MC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cb_free(e>>>0,1)),Ag=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,MC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cb_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,MC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},FC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ccp_free(e>>>0,1)),yg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,FC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ccp_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,FC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},LC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfe_free(e>>>0,1)),bg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,LC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfe_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,LC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},UC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfei_free(e>>>0,1)),vg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,UC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfei_free(t,0)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,UC.register(this,this.__wbg_ptr,this),this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},QC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfs_free(e>>>0,1)),wg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,QC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfs_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,QC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},qC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfsi_free(e>>>0,1)),Eg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,qC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfsi_free(t,0)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,qC.register(this,this.__wbg_ptr,this),this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},VC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_croo_free(e>>>0,1)),Cg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,VC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_croo_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,VC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},JC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_csiz_free(e>>>0,1)),Ig=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,JC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_csiz_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,JC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},zC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_compareargs_free(e>>>0,1)),Wr=class{static __wrap(t){t=t>>>0;let n=Object.create(Wr.prototype);return n.__wbg_ptr=t,zC.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,zC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_compareargs_free(t,0)}get mode(){return l.__wbg_get_compareargs_mode(this.__wbg_ptr)}set mode(t){l.__wbg_set_compareargs_mode(this.__wbg_ptr,t)}get indirect_rhs(){return l.__wbg_get_compareargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_compareargs_indirect_rhs(this.__wbg_ptr,t)}to_imm(){let t=this.__destroy_into_raw(),n=l.compareargs_to_imm(t);return Je.__wrap(n)}static from_imm(t){m(t,Je);var n=t.__destroy_into_raw();let r=l.compareargs_from_imm(n);return r===0?void 0:Wr.__wrap(r)}},GC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_div_free(e>>>0,1)),Sg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,GC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_div_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,GC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},HC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_divi_free(e>>>0,1)),xg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,HC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_divi_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,HC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},c6=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_divargs_free(e>>>0,1)),rs=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,c6.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_divargs_free(t,0)}get indirect_rhs(){return l.__wbg_get_divargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_divargs_indirect_rhs(this.__wbg_ptr,t)}},WC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ecal_free(e>>>0,1)),Tg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,WC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ecal_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,WC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},ZC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_eck1_free(e>>>0,1)),Ng=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ZC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_eck1_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,ZC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},YC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ecr1_free(e>>>0,1)),Rg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,YC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ecr1_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,YC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},XC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ed19_free(e>>>0,1)),kg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,XC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ed19_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,XC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},$C=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_eq_free(e>>>0,1)),Bg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,$C.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_eq_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,$C.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},KC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_exp_free(e>>>0,1)),Og=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,KC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_exp_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,KC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},jC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_expi_free(e>>>0,1)),Pg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,jC.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_expi_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,jC.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},eI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_flag_free(e>>>0,1)),Dg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,eI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_flag_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,eI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},Ym=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_gm_free(e>>>0,1)),uo=class{static __wrap(t){t=t>>>0;let n=Object.create(uo.prototype);return n.__wbg_ptr=t,Ym.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Ym.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_gm_free(t,0)}static from_args(t,n){m(t,f);var r=t.__destroy_into_raw();let i=l.gm_from_args(r,n);return uo.__wrap(i)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Lt);var i=n.__destroy_into_raw();let a=l.gm_new_typescript(r,i);return this.__wbg_ptr=a>>>0,Ym.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Lt.__wrap(t)}},tI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_gt_free(e>>>0,1)),Mg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_gt_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,tI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},Xm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_gtf_free(e>>>0,1)),lo=class{static __wrap(t){t=t>>>0;let n=Object.create(lo.prototype);return n.__wbg_ptr=t,Xm.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Xm.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_gtf_free(t,0)}static from_args(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();let s=l.gtf_from_args(i,a,r);return lo.__wrap(s)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.gtf_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,Xm.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},nI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm06_free(e>>>0,1)),Je=class{static __wrap(t){t=t>>>0;let n=Object.create(Je.prototype);return n.__wbg_ptr=t,nI.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm06_free(t,0)}},rI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm12_free(e>>>0,1)),_e=class{static __wrap(t){t=t>>>0;let n=Object.create(_e.prototype);return n.__wbg_ptr=t,rI.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,rI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm12_free(t,0)}},iI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm18_free(e>>>0,1)),Lt=class{static __wrap(t){t=t>>>0;let n=Object.create(Lt.prototype);return n.__wbg_ptr=t,iI.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,iI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm18_free(t,0)}},aI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm24_free(e>>>0,1)),yt=class{static __wrap(t){t=t>>>0;let n=Object.create(yt.prototype);return n.__wbg_ptr=t,aI.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,aI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm24_free(t,0)}},sI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_instruction_free(e>>>0,1)),L=class{static __wrap(t){t=t>>>0;let n=Object.create(L.prototype);return n.__wbg_ptr=t,sI.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,sI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_instruction_free(t,0)}to_bytes(){try{let i=l.__wbindgen_add_to_stack_pointer(-16);l.instruction_to_bytes(i,this.__wbg_ptr);var t=EC().getInt32(i+4*0,!0),n=EC().getInt32(i+4*1,!0),r=n6(t,n).slice();return l.__wbindgen_export_0(t,n*1,1),r}finally{l.__wbindgen_add_to_stack_pointer(16)}}static size(){return l.instruction_size()>>>0}},oI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ji_free(e>>>0,1)),Fg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,oI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ji_free(t,0)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,oI.register(this,this.__wbg_ptr,this),this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},cI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jmp_free(e>>>0,1)),Lg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,cI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jmp_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,cI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},uI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jmpb_free(e>>>0,1)),Ug=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,uI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jmpb_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Lt);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,uI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Lt.__wrap(t)}},lI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jmpf_free(e>>>0,1)),Qg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,lI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jmpf_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Lt);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,lI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Lt.__wrap(t)}},dI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jne_free(e>>>0,1)),qg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,dI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jne_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,dI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},fI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jneb_free(e>>>0,1)),Vg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,fI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jneb_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,fI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},pI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnef_free(e>>>0,1)),Jg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,pI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnef_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,pI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},hI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnei_free(e>>>0,1)),zg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,hI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnei_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,hI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},mI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnzb_free(e>>>0,1)),Gg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,mI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnzb_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,mI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},gI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnzf_free(e>>>0,1)),Hg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,gI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnzf_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,gI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},_I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnzi_free(e>>>0,1)),Wg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_I.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnzi_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Lt);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,_I.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Lt.__wrap(t)}},AI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_k256_free(e>>>0,1)),Zg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,AI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_k256_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,AI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},yI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_lb_free(e>>>0,1)),Yg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,yI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_lb_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,yI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},bI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ldc_free(e>>>0,1)),Xg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,bI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ldc_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,bI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},vI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_log_free(e>>>0,1)),$g=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,vI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_log_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,vI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},wI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_logd_free(e>>>0,1)),Kg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,wI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_logd_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,wI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},EI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_lt_free(e>>>0,1)),jg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,EI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_lt_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,EI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},CI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_lw_free(e>>>0,1)),e_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,CI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_lw_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,CI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},II=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcl_free(e>>>0,1)),t_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,II.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcl_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,II.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},SI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcli_free(e>>>0,1)),n_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,SI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcli_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Lt);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,SI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Lt.__wrap(t)}},xI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcp_free(e>>>0,1)),r_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,xI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcp_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,xI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},TI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcpi_free(e>>>0,1)),i_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,TI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcpi_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,TI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},NI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_meq_free(e>>>0,1)),a_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,NI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_meq_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,NI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},RI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mint_free(e>>>0,1)),s_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,RI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mint_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,RI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},kI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mldv_free(e>>>0,1)),o_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,kI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mldv_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,kI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},BI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mlog_free(e>>>0,1)),c_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,BI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mlog_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,BI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},OI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mod_free(e>>>0,1)),u_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,OI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mod_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,OI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},PI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_modi_free(e>>>0,1)),l_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,PI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_modi_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,PI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},DI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_move_free(e>>>0,1)),d_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,DI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_move_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,DI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},MI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_movi_free(e>>>0,1)),f_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,MI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_movi_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Lt);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,MI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Lt.__wrap(t)}},FI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mroo_free(e>>>0,1)),p_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,FI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mroo_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,FI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},LI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mul_free(e>>>0,1)),h_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,LI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mul_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,LI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},UI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_muli_free(e>>>0,1)),m_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,UI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_muli_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,UI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},u6=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mathargs_free(e>>>0,1)),is=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,u6.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mathargs_free(t,0)}get op(){return l.__wbg_get_mathargs_op(this.__wbg_ptr)}set op(t){l.__wbg_set_mathargs_op(this.__wbg_ptr,t)}get indirect_rhs(){return l.__wbg_get_compareargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_compareargs_indirect_rhs(this.__wbg_ptr,t)}},l6=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mulargs_free(e>>>0,1)),as=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,l6.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mulargs_free(t,0)}get indirect_lhs(){return l.__wbg_get_compareargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_lhs(t){l.__wbg_set_compareargs_indirect_rhs(this.__wbg_ptr,t)}get indirect_rhs(){return l.__wbg_get_mulargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_mulargs_indirect_rhs(this.__wbg_ptr,t)}},QI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_noop_free(e>>>0,1)),g_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,QI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_noop_free(t,0)}constructor(){let t=l.noop_new_typescript();return this.__wbg_ptr=t>>>0,QI.register(this,this.__wbg_ptr,this),this}},qI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_not_free(e>>>0,1)),__=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,qI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_not_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,qI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},VI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_or_free(e>>>0,1)),A_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,VI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_or_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,VI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},JI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ori_free(e>>>0,1)),y_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,JI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ori_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,JI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},zI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_poph_free(e>>>0,1)),b_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,zI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_poph_free(t,0)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,zI.register(this,this.__wbg_ptr,this),this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},GI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_popl_free(e>>>0,1)),v_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,GI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_popl_free(t,0)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,GI.register(this,this.__wbg_ptr,this),this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},HI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_pshh_free(e>>>0,1)),w_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,HI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_pshh_free(t,0)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,HI.register(this,this.__wbg_ptr,this),this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},WI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_pshl_free(e>>>0,1)),E_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,WI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_pshl_free(t,0)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,WI.register(this,this.__wbg_ptr,this),this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},ZI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_panicinstruction_free(e>>>0,1)),C_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ZI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_panicinstruction_free(t,0)}constructor(t,n){let r=l.panicinstruction_error_typescript(t,n);return this.__wbg_ptr=r>>>0,ZI.register(this,this.__wbg_ptr,this),this}reason(){return l.panicinstruction_reason(this.__wbg_ptr)}instruction(){return l.panicinstruction_instruction(this.__wbg_ptr)>>>0}},YI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ret_free(e>>>0,1)),I_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,YI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ret_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,YI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},XI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_retd_free(e>>>0,1)),S_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,XI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_retd_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,XI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},$I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_rvrt_free(e>>>0,1)),x_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,$I.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_rvrt_free(t,0)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,$I.register(this,this.__wbg_ptr,this),this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},$m=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_regid_free(e>>>0,1)),f=class{static __wrap(t){t=t>>>0;let n=Object.create(f.prototype);return n.__wbg_ptr=t,$m.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,$m.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_regid_free(t,0)}static new_checked(t){let n=l.regid_new_checked(t);return n===0?void 0:f.__wrap(n)}static bal(){let t=l.regid_bal();return f.__wrap(t)}static cgas(){let t=l.regid_cgas();return f.__wrap(t)}static err(){let t=l.regid_err();return f.__wrap(t)}static flag(){let t=l.regid_flag();return f.__wrap(t)}static fp(){let t=l.regid_fp();return f.__wrap(t)}static ggas(){let t=l.regid_ggas();return f.__wrap(t)}static hp(){let t=l.regid_hp();return f.__wrap(t)}static is(){let t=l.regid_is();return f.__wrap(t)}static of(){let t=l.regid_of();return f.__wrap(t)}static one(){let t=l.regid_one();return f.__wrap(t)}static pc(){let t=l.regid_pc();return f.__wrap(t)}static ret(){let t=l.regid_ret();return f.__wrap(t)}static retl(){let t=l.regid_retl();return f.__wrap(t)}static sp(){let t=l.regid_sp();return f.__wrap(t)}static spp(){let t=l.regid_spp();return f.__wrap(t)}static writable(){let t=l.regid_writable();return f.__wrap(t)}static zero(){let t=l.regid_zero();return f.__wrap(t)}constructor(t){let n=l.regid_new_typescript(t);return this.__wbg_ptr=n>>>0,$m.register(this,this.__wbg_ptr,this),this}to_u8(){let t=this.__destroy_into_raw();return l.regid_to_u8(t)}},KI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_s256_free(e>>>0,1)),T_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,KI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_s256_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,KI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},jI=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sb_free(e>>>0,1)),N_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,jI.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sb_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,jI.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},eS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_scwq_free(e>>>0,1)),R_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,eS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_scwq_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,eS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},tS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sll_free(e>>>0,1)),k_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sll_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,tS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},nS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_slli_free(e>>>0,1)),B_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_slli_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,nS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},rS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_smo_free(e>>>0,1)),O_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,rS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_smo_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,rS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},iS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srl_free(e>>>0,1)),P_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,iS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srl_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,iS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},aS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srli_free(e>>>0,1)),D_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,aS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srli_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,aS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},sS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srw_free(e>>>0,1)),M_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,sS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srw_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,sS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},oS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srwq_free(e>>>0,1)),F_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,oS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srwq_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,oS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},cS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sub_free(e>>>0,1)),L_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,cS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sub_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,cS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},uS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_subi_free(e>>>0,1)),U_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,uS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_subi_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,uS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},lS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sw_free(e>>>0,1)),Q_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,lS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sw_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,lS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},dS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sww_free(e>>>0,1)),q_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,dS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sww_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,dS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},fS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_swwq_free(e>>>0,1)),V_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,fS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_swwq_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,fS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},pS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_time_free(e>>>0,1)),J_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,pS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_time_free(t,0)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,pS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},hS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_tr_free(e>>>0,1)),z_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,hS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_tr_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,hS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},mS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_tro_free(e>>>0,1)),G_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,mS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_tro_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,mS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},gS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdam_free(e>>>0,1)),H_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,gS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdam_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,gS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},Km=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdcm_free(e>>>0,1)),fo=class{static __wrap(t){t=t>>>0;let n=Object.create(fo.prototype);return n.__wbg_ptr=t,Km.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Km.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdcm_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Wr);var c=i.__destroy_into_raw();let u=l.wdcm_from_args(a,s,o,c);return fo.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,Km.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},jm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wddv_free(e>>>0,1)),po=class{static __wrap(t){t=t>>>0;let n=Object.create(po.prototype);return n.__wbg_ptr=t,jm.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,jm.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wddv_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,rs);var c=i.__destroy_into_raw();let u=l.wddv_from_args(a,s,o,c);return po.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,jm.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},_S=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdmd_free(e>>>0,1)),W_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_S.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdmd_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,_S.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdml_free(e>>>0,1)),ho=class{static __wrap(t){t=t>>>0;let n=Object.create(ho.prototype);return n.__wbg_ptr=t,eg.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,eg.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdml_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,as);var c=i.__destroy_into_raw();let u=l.wdml_from_args(a,s,o,c);return ho.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,eg.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},AS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdmm_free(e>>>0,1)),Z_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,AS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdmm_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,AS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},tg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdop_free(e>>>0,1)),mo=class{static __wrap(t){t=t>>>0;let n=Object.create(mo.prototype);return n.__wbg_ptr=t,tg.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tg.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdop_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,is);var c=i.__destroy_into_raw();let u=l.wdop_from_args(a,s,o,c);return mo.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,tg.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},yS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqam_free(e>>>0,1)),Y_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,yS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqam_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,yS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},ng=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqcm_free(e>>>0,1)),go=class{static __wrap(t){t=t>>>0;let n=Object.create(go.prototype);return n.__wbg_ptr=t,ng.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ng.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqcm_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Wr);var c=i.__destroy_into_raw();let u=l.wdcm_from_args(a,s,o,c);return go.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,ng.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqdv_free(e>>>0,1)),_o=class{static __wrap(t){t=t>>>0;let n=Object.create(_o.prototype);return n.__wbg_ptr=t,rg.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,rg.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqdv_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,rs);var c=i.__destroy_into_raw();let u=l.wddv_from_args(a,s,o,c);return _o.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,rg.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},bS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqmd_free(e>>>0,1)),X_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,bS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqmd_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,bS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},ig=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqml_free(e>>>0,1)),Ao=class{static __wrap(t){t=t>>>0;let n=Object.create(Ao.prototype);return n.__wbg_ptr=t,ig.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ig.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqml_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,as);var c=i.__destroy_into_raw();let u=l.wdml_from_args(a,s,o,c);return Ao.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,ig.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},vS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqmm_free(e>>>0,1)),$_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,vS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqmm_free(t,0)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,vS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqop_free(e>>>0,1)),yo=class{static __wrap(t){t=t>>>0;let n=Object.create(yo.prototype);return n.__wbg_ptr=t,ag.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ag.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqop_free(t,0)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,is);var c=i.__destroy_into_raw();let u=l.wdop_from_args(a,s,o,c);return yo.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Je);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,ag.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return Je.__wrap(t)}},wS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_xor_free(e>>>0,1)),K_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,wS.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_xor_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,wS.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},ES=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_xori_free(e>>>0,1)),j_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ES.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_xori_free(t,0)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,ES.register(this,this.__wbg_ptr,this),this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}};async function d6(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.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}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function SS(){let e={};return e.wbg={},e.wbg.__wbindgen_throw=function(t,n){throw new Error(VF(t,n))},e}function xS(e,t){return l=e.exports,TS.__wbindgen_wasm_module=t,ns=null,cl=null,l}function f6(e){if(l!==void 0)return l;typeof e<"u"&&Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead");let t=SS();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return xS(n,e)}async function TS(e){if(l!==void 0)return l;typeof e<"u"&&Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead");let t=SS(),{instance:n,module:r}=await d6(await e,t);return xS(n,r)}function p6(e,t,n,r){function i(p,h,_){var I=_?WebAssembly.instantiateStreaming:WebAssembly.instantiate,v=_?WebAssembly.compileStreaming:WebAssembly.compile;return h?I(p,h):v(p)}var a=null,s=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;if(s)a=Buffer.from(n,"base64");else{var o=globalThis.atob(n),c=o.length;a=new Uint8Array(new ArrayBuffer(c));for(var u=0;u<c;u++)a[u]=o.charCodeAt(u)}if(e){var d=new WebAssembly.Module(a);return r?new WebAssembly.Instance(d,r):d}else return i(a,r,!1)}function h6(e){return p6(1,null,"AGFzbQEAAAABOgpgA39/fwF/YAF/AX9gBH9/f38Bf2ACf38AYAJ/fwF/YAABf2AFf39/f38Bf2ABfwBgA39/fwBgAAACGAEDd2JnEF9fd2JpbmRnZW5fdGhyb3cAAwP/Af0BAQEDAwMDAwMBAQMDAQEBAwMBAQEEAQMDAwEBAwEBAQQCAQMCAgICAgIDAwMEBAQEBAQEBAEBAQMDAAICBAQEBAQEBAQEBAABAQgDAwQBAQEBAQEBAgcDAQAAAQEDBwcBAwEDAgIBAQEAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQUBAQEBBAAEAQYCAgMDAAIABwEIBAEEAQkDAQEHAQUFBQUFBQUFBQUFBQUFBQUFBQUDBgYCAgQCBgYAAAgABAUDAQARBgkBfwFBgIDAAAsHjUzPBQZtZW1vcnkCABZfX3diZ19jb21wYXJlYXJnc19mcmVlABAaX193YmdfZ2V0X2NvbXBhcmVhcmdzX21vZGUASBpfX3diZ19zZXRfY29tcGFyZWFyZ3NfbW9kZQA4Il9fd2JnX2dldF9jb21wYXJlYXJnc19pbmRpcmVjdF9yaHMASSJfX3diZ19zZXRfY29tcGFyZWFyZ3NfaW5kaXJlY3RfcmhzAEsSY29tcGFyZWFyZ3NfdG9faW1tAFgUY29tcGFyZWFyZ3NfZnJvbV9pbW0AHxVfX3diZ19nZXRfbWF0aGFyZ3Nfb3AASBVfX3diZ19zZXRfbWF0aGFyZ3Nfb3AAORJfX3diZ19tdWxhcmdzX2ZyZWUAER5fX3diZ19nZXRfbXVsYXJnc19pbmRpcmVjdF9yaHMASB5fX3diZ19zZXRfbXVsYXJnc19pbmRpcmVjdF9yaHMATBJfX3diZ19kaXZhcmdzX2ZyZWUAIx5fX3diZ19nZXRfZGl2YXJnc19pbmRpcmVjdF9yaHMAuQEeX193Ymdfc2V0X2RpdmFyZ3NfaW5kaXJlY3RfcmhzAGMbX193YmdfcGFuaWNpbnN0cnVjdGlvbl9mcmVlABchcGFuaWNpbnN0cnVjdGlvbl9lcnJvcl90eXBlc2NyaXB0AE0XcGFuaWNpbnN0cnVjdGlvbl9yZWFzb24AWxxwYW5pY2luc3RydWN0aW9uX2luc3RydWN0aW9uAFwMZ21fZnJvbV9hcmdzANUBDWd0Zl9mcm9tX2FyZ3MAzQEHZ21fYXJncwCIAQhndGZfYXJncwBpDndkY21fZnJvbV9hcmdzADsOd2RvcF9mcm9tX2FyZ3MAOw53ZG1sX2Zyb21fYXJncwA8DndkZHZfZnJvbV9hcmdzAMkBCXdkY21fYXJncwAkCXdxY21fYXJncwAlCXdkb3BfYXJncwAmCXdxb3BfYXJncwAnCXdkbWxfYXJncwAoCXdxbWxfYXJncwApCXdkZHZfYXJncwBkCXdxZHZfYXJncwBlEF9fd2JnX2ltbTA2X2ZyZWUAKhBfX3diZ19pbW0xMl9mcmVlACsQX193YmdfaW1tMThfZnJlZQAsDl9fd2JnX2FkZF9mcmVlABgPX193Ymdfbm9vcF9mcmVlAAcSYWRkX25ld190eXBlc2NyaXB0AFkGYWRkX3JhADUGYWRkX3JiABIGYWRkX3JjABoDYWRkAMUBA2FuZACKAQNkaXYAiwECZXEAjAEDZXhwAI0BAmd0AI4BAmx0AI8BBG1sb2cAkAEEbXJvbwCRAQRtb2RfAJIBBW1vdmVfAD0DbXVsAJMBA25vdAA+Am9yAJQBA3NsbACVAQNzcmwAlgEDc3ViAJcBA3hvcgCYAQRtbGR2AGoDcmV0ALoBBHJldGQAPxNhbG9jX25ld190eXBlc2NyaXB0AGAHYWxvY19yYQAiBGFsb2MAuwEDbWNsAEADbWNwAJkBA21lcQBrE2Joc2hfbmV3X3R5cGVzY3JpcHQAIARiaHNoAC0EYmhlaQC8AQRidXJuAEEEY2FsbABsA2NjcABtBGNyb28AQgRjc2l6AEMCY2IAvQEDbGRjAG4DbG9nAG8EbG9nZABwBG1pbnQARARydnJ0AL4BBHNjd3EAmgEDc3J3AJsBBHNyd3EAcQNzd3cAnAEEc3d3cQByAnRyAJ0BA3RybwBzBGVjazEAngEEZWNyMQCfAQRlZDE5AHQEazI1NgCgAQRzMjU2AKEBBHRpbWUARRNub29wX25ld190eXBlc2NyaXB0AL8BBG5vb3AA3QEEZmxhZwDAAQNiYWwAogEDam1wAMEBA2puZQCjAQNzbW8AdRNhZGRpX25ld190eXBlc2NyaXB0AFoKYWRkaV9pbW0xMgAJBGFkZGkApAEEYW5kaQClAQRkaXZpAKYBBGV4cGkApwEEbW9kaQCoAQRtdWxpAKkBA29yaQCqAQRzbGxpAKsBBHNybGkArAEEc3ViaQCtAQR4b3JpAK4BBGpuZWkArwECbGIAsAECbHcAsQECc2IAsgECc3cAswEEbWNwaQC0ARJndGZfbmV3X3R5cGVzY3JpcHQAzwEDZ3RmALUBBG1jbGkALhFnbV9uZXdfdHlwZXNjcmlwdABGCGdtX2ltbTE4AA0CZ20ALwRtb3ZpADAEam56aQAxBGptcGYAMhNqbXBiX25ld190eXBlc2NyaXB0ABUEam1wYgAzBGpuemYAtgEEam56YgC3AQRqbmVmAHYKam5lYl9pbW0wNgA2BGpuZWIAdwJqaQBOE2NmZWlfbmV3X3R5cGVzY3JpcHQANwpjZmVpX2ltbTI0AAoEY2ZlaQBPBGNmc2kAUANjZmUAwgEDY2ZzAMMBBHBzaGwAUQRwc2hoAFIEcG9wbABTBHBvcGgAVBN3ZGNtX25ld190eXBlc2NyaXB0AMoBBHdkY20AeAR3cWNtAHkEd2RvcAB6BHdxb3AAewR3ZG1sAHwEd3FtbAB9BHdkZHYAfgR3cWR2AH8Ed2RtZACAAQR3cW1kAIEBBHdkYW0AggEEd3FhbQCDAQR3ZG1tAIQBBHdxbW0AhQEEZWNhbACGAQRic2l6ADQTYmxkZF9uZXdfdHlwZXNjcmlwdABVB2JsZGRfcmQANgRibGRkAIcBFl9fd2JnX2luc3RydWN0aW9uX2ZyZWUADBRpbnN0cnVjdGlvbl90b19ieXRlcwAGEGluc3RydWN0aW9uX3NpemUA7wERcmVnaWRfbmV3X2NoZWNrZWQAuAEJcmVnaWRfYmFsAN4BCnJlZ2lkX2NnYXMA3wEJcmVnaWRfZXJyAOABCnJlZ2lkX2ZsYWcA4QEIcmVnaWRfZnAA4gEKcmVnaWRfZ2dhcwDjAQhyZWdpZF9ocADkAQhyZWdpZF9pcwDlAQhyZWdpZF9vZgDmAQlyZWdpZF9vbmUA5wEIcmVnaWRfcGMA6AEJcmVnaWRfcmV0AOkBCnJlZ2lkX3JldGwA6gEIcmVnaWRfc3AA6wEJcmVnaWRfc3BwAOwBDnJlZ2lkX3dyaXRhYmxlAO0BCnJlZ2lkX3plcm8A7gEUcmVnaWRfbmV3X3R5cGVzY3JpcHQA2QELcmVnaWRfdG9fdTgA2gESYW5kX25ld190eXBlc2NyaXB0AFkSZGl2X25ld190eXBlc2NyaXB0AFkRZXFfbmV3X3R5cGVzY3JpcHQAWRJleHBfbmV3X3R5cGVzY3JpcHQAWRFndF9uZXdfdHlwZXNjcmlwdABZEWx0X25ld190eXBlc2NyaXB0AFkTbWxvZ19uZXdfdHlwZXNjcmlwdABZE21yb29fbmV3X3R5cGVzY3JpcHQAWRJtb2RfbmV3X3R5cGVzY3JpcHQAWRJtdWxfbmV3X3R5cGVzY3JpcHQAWRFvcl9uZXdfdHlwZXNjcmlwdABZEnNsbF9uZXdfdHlwZXNjcmlwdABZEnNybF9uZXdfdHlwZXNjcmlwdABZEnN1Yl9uZXdfdHlwZXNjcmlwdABZEnhvcl9uZXdfdHlwZXNjcmlwdABZEm1jcF9uZXdfdHlwZXNjcmlwdABZE3Njd3FfbmV3X3R5cGVzY3JpcHQAWRJzcndfbmV3X3R5cGVzY3JpcHQAWRJzd3dfbmV3X3R5cGVzY3JpcHQAWRF0cl9uZXdfdHlwZXNjcmlwdABZE2VjazFfbmV3X3R5cGVzY3JpcHQAWRNlY3IxX25ld190eXBlc2NyaXB0AFkTazI1Nl9uZXdfdHlwZXNjcmlwdABZE3MyNTZfbmV3X3R5cGVzY3JpcHQAWRJiYWxfbmV3X3R5cGVzY3JpcHQAWRJqbmVfbmV3X3R5cGVzY3JpcHQAWRNhbmRpX25ld190eXBlc2NyaXB0AFoTZGl2aV9uZXdfdHlwZXNjcmlwdABaE2V4cGlfbmV3X3R5cGVzY3JpcHQAWhNtb2RpX25ld190eXBlc2NyaXB0AFoTbXVsaV9uZXdfdHlwZXNjcmlwdABaEm9yaV9uZXdfdHlwZXNjcmlwdABaE3NsbGlfbmV3X3R5cGVzY3JpcHQAWhNzcmxpX25ld190eXBlc2NyaXB0AFoTc3ViaV9uZXdfdHlwZXNjcmlwdABaE3hvcmlfbmV3X3R5cGVzY3JpcHQAWhNqbmVpX25ld190eXBlc2NyaXB0AFoRbGJfbmV3X3R5cGVzY3JpcHQAWhFsd19uZXdfdHlwZXNjcmlwdABaEXNiX25ld190eXBlc2NyaXB0AFoRc3dfbmV3X3R5cGVzY3JpcHQAWhNtY3BpX25ld190eXBlc2NyaXB0AFoTam56Zl9uZXdfdHlwZXNjcmlwdABaE2puemJfbmV3X3R5cGVzY3JpcHQAWhFqaV9uZXdfdHlwZXNjcmlwdAA3E2Nmc2lfbmV3X3R5cGVzY3JpcHQANxNwc2hsX25ld190eXBlc2NyaXB0ADcTcHNoaF9uZXdfdHlwZXNjcmlwdAA3E3BvcGxfbmV3X3R5cGVzY3JpcHQANxNwb3BoX25ld190eXBlc2NyaXB0ADcTbW92aV9uZXdfdHlwZXNjcmlwdAAVE21jbGlfbmV3X3R5cGVzY3JpcHQAFRNqbnppX25ld190eXBlc2NyaXB0ABUTam1wZl9uZXdfdHlwZXNjcmlwdAAVEm5vdF9uZXdfdHlwZXNjcmlwdAAgE3JldGRfbmV3X3R5cGVzY3JpcHQAIBNtb3ZlX25ld190eXBlc2NyaXB0ACASbWNsX25ld190eXBlc2NyaXB0ACATYnVybl9uZXdfdHlwZXNjcmlwdAAgE2Nyb29fbmV3X3R5cGVzY3JpcHQAIBNjc2l6X25ld190eXBlc2NyaXB0ACATbWludF9uZXdfdHlwZXNjcmlwdAAgE3RpbWVfbmV3X3R5cGVzY3JpcHQAIBNic2l6X25ld190eXBlc2NyaXB0ACAGcmV0X3JhACIHYmhlaV9yYQAiBWNiX3JhACIHcnZydF9yYQAiB2ZsYWdfcmEAIgZqbXBfcmEAIghqaV9pbW0yNAAKCmNmc2lfaW1tMjQACgZjZmVfcmEAIgZjZnNfcmEAIgpwc2hsX2ltbTI0AAoKcHNoaF9pbW0yNAAKCnBvcGxfaW1tMjQACgpwb3BoX2ltbTI0AAoTbWxkdl9uZXdfdHlwZXNjcmlwdABVEm1lcV9uZXdfdHlwZXNjcmlwdABVEmNjcF9uZXdfdHlwZXNjcmlwdABVEmxvZ19uZXdfdHlwZXNjcmlwdABVE2xvZ2RfbmV3X3R5cGVzY3JpcHQAVRNzcndxX25ld190eXBlc2NyaXB0AFUTc3d3cV9uZXdfdHlwZXNjcmlwdABVEnRyb19uZXdfdHlwZXNjcmlwdABVE2VkMTlfbmV3X3R5cGVzY3JpcHQAVRJzbW9fbmV3X3R5cGVzY3JpcHQAVRJsZGNfbmV3X3R5cGVzY3JpcHQAVRNqbmVmX25ld190eXBlc2NyaXB0AFUTd2RtZF9uZXdfdHlwZXNjcmlwdABVE3dxbWRfbmV3X3R5cGVzY3JpcHQAVRN3ZGFtX25ld190eXBlc2NyaXB0AFUTd3FhbV9uZXdfdHlwZXNjcmlwdABVE3dkbW1fbmV3X3R5cGVzY3JpcHQAVRN3cW1tX25ld190eXBlc2NyaXB0AFUTZWNhbF9uZXdfdHlwZXNjcmlwdABVE2NhbGxfbmV3X3R5cGVzY3JpcHQAVRNfX3diZ19tYXRoYXJnc19mcmVlABAfX193Ymdfc2V0X21hdGhhcmdzX2luZGlyZWN0X3JocwBLHl9fd2JnX3NldF9tdWxhcmdzX2luZGlyZWN0X2xocwBLH19fd2JnX2dldF9tYXRoYXJnc19pbmRpcmVjdF9yaHMASR5fX3diZ19nZXRfbXVsYXJnc19pbmRpcmVjdF9saHMASRJyZXRfbmV3X3R5cGVzY3JpcHQAYBNiaGVpX25ld190eXBlc2NyaXB0AGARY2JfbmV3X3R5cGVzY3JpcHQAYBNydnJ0X25ld190eXBlc2NyaXB0AGATZmxhZ19uZXdfdHlwZXNjcmlwdABgEmptcF9uZXdfdHlwZXNjcmlwdABgEmNmZV9uZXdfdHlwZXNjcmlwdABgEmNmc19uZXdfdHlwZXNjcmlwdABgD19fd2JnX3RpbWVfZnJlZQAYDl9fd2JnX21jbF9mcmVlABgPX193YmdfcG9wbF9mcmVlABgNX193YmdfbHRfZnJlZQAYD19fd2JnX2puemJfZnJlZQAYDl9fd2JnX3Nyd19mcmVlABgPX193Ymdfd3FtbF9mcmVlABgPX193YmdfazI1Nl9mcmVlABgNX193YmdfbGJfZnJlZQAYD19fd2JnX2puZWJfZnJlZQAYD19fd2JnX3JldGRfZnJlZQAYD19fd2JnX2V4cGlfZnJlZQAYD19fd2JnX3N3d3FfZnJlZQAYD19fd2JnX2Nyb29fZnJlZQAYDl9fd2JnX3Ntb19mcmVlABgOX193YmdfbGRjX2ZyZWUAGA9fX3diZ19tbG9nX2ZyZWUAGA9fX3diZ19ic2l6X2ZyZWUAGA1fX3diZ19lcV9mcmVlABgPX193YmdfbWNsaV9mcmVlABgPX193YmdfeG9yaV9mcmVlABgPX193YmdfYW5kaV9mcmVlABgPX193Ymdfd3FvcF9mcmVlABgPX193Ymdfd2RjbV9mcmVlABgPX193YmdfcHNoaF9mcmVlABgPX193Ymdfc3ViaV9mcmVlABgNX193Ymdfb3JfZnJlZQAYD19fd2JnX2puemlfZnJlZQAYD19fd2JnX3dkbWRfZnJlZQAYDV9fd2JnX2dtX2ZyZWUAGA5fX3diZ19zcmxfZnJlZQAYD19fd2JnX3NybGlfZnJlZQAYD19fd2JnX2ZsYWdfZnJlZQAYD19fd2JnX3dkYW1fZnJlZQAYD19fd2JnX21vZGlfZnJlZQAYD19fd2JnX3dxYW1fZnJlZQAYD19fd2JnX2VjazFfZnJlZQAYDl9fd2JnX2Nmc19mcmVlABgPX193Ymdfam5laV9mcmVlABgPX193YmdfczI1Nl9mcmVlABgPX193YmdfYmxkZF9mcmVlABgOX193YmdfbW9kX2ZyZWUAGA9fX3diZ19zY3dxX2ZyZWUAGA5fX3diZ19hbmRfZnJlZQAYDl9fd2JnX3Ryb19mcmVlABgPX193Ymdfc3J3cV9mcmVlABgPX193YmdfcG9waF9mcmVlABgOX193Ymdfc3d3X2ZyZWUAGA9fX3diZ193ZGR2X2ZyZWUAGA5fX3diZ19tY3BfZnJlZQAYDV9fd2JnX3NiX2ZyZWUAGA9fX3diZ19lY2FsX2ZyZWUAGA5fX3diZ19qbmVfZnJlZQAYD19fd2JnX2Fsb2NfZnJlZQAYD19fd2JnX2puemZfZnJlZQAYD19fd2JnX2NhbGxfZnJlZQAYD19fd2JnX3J2cnRfZnJlZQAYD19fd2JnX3dxbW1fZnJlZQAYD19fd2JnX21vdmlfZnJlZQAYD19fd2JnX3dkbWxfZnJlZQAYD19fd2JnX2JoZWlfZnJlZQAYDl9fd2JnX2NmZV9mcmVlABgPX193Ymdfc2xsaV9mcmVlABgPX193YmdfbWludF9mcmVlABgPX193YmdfcHNobF9mcmVlABgOX193YmdfZGl2X2ZyZWUAGA9fX3diZ19tY3BpX2ZyZWUAGA9fX3diZ193cWR2X2ZyZWUAGA9fX3diZ19kaXZpX2ZyZWUAGA5fX3diZ19iYWxfZnJlZQAYDl9fd2JnX2V4cF9mcmVlABgOX193Ymdfc3ViX2ZyZWUAGA9fX3diZ19qbmVmX2ZyZWUAGA9fX3diZ19tb3ZlX2ZyZWUAGA9fX3diZ19jZnNpX2ZyZWUAGA5fX3diZ19jY3BfZnJlZQAYD19fd2JnX2VkMTlfZnJlZQAYDl9fd2JnX2ptcF9mcmVlABgPX193YmdfYWRkaV9mcmVlABgOX193YmdfcmV0X2ZyZWUAGA5fX3diZ19zbGxfZnJlZQAYDl9fd2JnX29yaV9mcmVlABgPX193Ymdfd2RvcF9mcmVlABgPX193YmdfbG9nZF9mcmVlABgPX193Ymdfd3FjbV9mcmVlABgNX193YmdfY2JfZnJlZQAYD19fd2JnX2J1cm5fZnJlZQAYD19fd2JnX3dkbW1fZnJlZQAYDl9fd2JnX2d0Zl9mcmVlABgNX193Ymdfc3dfZnJlZQAYDV9fd2JnX2ppX2ZyZWUAGA9fX3diZ19jc2l6X2ZyZWUAGA1fX3diZ19ndF9mcmVlABgOX193YmdfbXVsX2ZyZWUAGA9fX3diZ19tdWxpX2ZyZWUAGA9fX3diZ19jZmVpX2ZyZWUAGA9fX3diZ19lY3IxX2ZyZWUAGA5fX3diZ19tZXFfZnJlZQAYD19fd2JnX3dxbWRfZnJlZQAYD19fd2JnX21yb29fZnJlZQAYD19fd2JnX21sZHZfZnJlZQAYD19fd2JnX2ptcGJfZnJlZQAYD19fd2JnX2Joc2hfZnJlZQAYDV9fd2JnX3RyX2ZyZWUAGA5fX3diZ194b3JfZnJlZQAYDV9fd2JnX2x3X2ZyZWUAGA5fX3diZ19sb2dfZnJlZQAYD19fd2JnX2ptcGZfZnJlZQAYDl9fd2JnX25vdF9mcmVlABgTd3Fkdl9uZXdfdHlwZXNjcmlwdADKARN3cW1sX25ld190eXBlc2NyaXB0AMoBE3dkbWxfbmV3X3R5cGVzY3JpcHQAygETd3FvcF9uZXdfdHlwZXNjcmlwdADKARN3ZG9wX25ld190eXBlc2NyaXB0AMoBE3dxY21fbmV3X3R5cGVzY3JpcHQAygETd2Rkdl9uZXdfdHlwZXNjcmlwdADKAQ53cWNtX2Zyb21fYXJncwA7CndxZHZfaW1tMDYANgp3cW1sX2ltbTA2ADYKd2RtbF9pbW0wNgA2Cndxb3BfaW1tMDYANgp3ZG9wX2ltbTA2ADYKd3FjbV9pbW0wNgA2CndkZHZfaW1tMDYANgp3ZGNtX2ltbTA2ADYKam5lZl9pbW0wNgA2CWxkY19pbW0wNgA2DndxbWxfZnJvbV9hcmdzADwOd3FvcF9mcm9tX2FyZ3MAOwVnbV9yYQA1BWd0X3JjABoFZ3RfcmIAEgVndF9yYQA1BWxiX3JiABIFbGJfcmEANQVsdF9yYwAaBWx0X3JiABIFbHRfcmEANQhsd19pbW0xMgAJBWx3X3JiABIFbHdfcmEANQVvcl9yYwAaBW9yX3JiABIFb3JfcmEANQhzYl9pbW0xMgAJBXNiX3JiABIFc2JfcmEANQhzd19pbW0xMgAJBXN3X3JiABIFc3dfcmEANQV0cl9yYwAaBXRyX3JiABIFdHJfcmEANQVlcV9yYwAaBWVxX3JiABIFZXFfcmEANQZhbmRfcmMAGgZhbmRfcmIAEgZhbmRfcmEANQZiYWxfcmMAGgZiYWxfcmIAEgZiYWxfcmEANQZjY3BfcmMAGgZjY3BfcmIAEgZjY3BfcmEANQZkaXZfcmMAGgZkaXZfcmIAEgZkaXZfcmEANQZleHBfcmMAGgZleHBfcmIAEgZleHBfcmEANQhsYl9pbW0xMgAJBmd0Zl9yYgASBmd0Zl9yYQA1BmpuZV9yYwAaBmpuZV9yYgASBmpuZV9yYQA1BmxkY19yYwAaBmxkY19yYgASBmxkY19yYQA1BmxvZ19yZAA2BmxvZ19yYwAaBmxvZ19yYgASBmxvZ19yYQA1Bm1jbF9yYgASBm1jbF9yYQA1Bm1jcF9yYwAaBm1jcF9yYgASBm1jcF9yYQA1Bm1lcV9yZAA2Bm1lcV9yYwAaBm1lcV9yYgASBm1lcV9yYQA1Bm1vZF9yYwAaBm1vZF9yYgASBm1vZF9yYQA1Bm11bF9yYwAaBm11bF9yYgASBm11bF9yYQA1Bm5vdF9yYgASBm5vdF9yYQA1CW9yaV9pbW0xMgAJBm9yaV9yYgASBm9yaV9yYQA1BnNsbF9yYwAaBnNsbF9yYgASBnNsbF9yYQA1BnNtb19yZAA2BnNtb19yYwAaBnNtb19yYgASBnNtb19yYQA1BnNybF9yYwAaBnNybF9yYgASBnNybF9yYQA1BnNyd19yYwAaBnNyd19yYgASBnNyd19yYQA1BnN1Yl9yYwAaBnN1Yl9yYgASBnN1Yl9yYQA1BnN3d19yYwAaBnN3d19yYgASBnN3d19yYQA1BnRyb19yZAA2BnRyb19yYwAaBnRyb19yYgASBnRyb19yYQA1Bnhvcl9yYwAaBnhvcl9yYgASBnhvcl9yYQA1CWd0Zl9pbW0xMgAJB2FkZGlfcmIAEgdhZGRpX3JhADUKYW5kaV9pbW0xMgAJB2FuZGlfcmIAEgdhbmRpX3JhADUHYmhzaF9yYgASB2Joc2hfcmEANQZjY3BfcmQANgdibGRkX3JjABoHYmxkZF9yYgASB2JsZGRfcmEANQdic2l6X3JiABIHYnNpel9yYQA1B2J1cm5fcmIAEgdidXJuX3JhADUHY2FsbF9yZAA2B2NhbGxfcmMAGgdjYWxsX3JiABIHY2FsbF9yYQA1B2Nyb29fcmIAEgdjcm9vX3JhADUHY3Npel9yYgASB2NzaXpfcmEANQpkaXZpX2ltbTEyAAkHZGl2aV9yYgASB2RpdmlfcmEANQdlY2FsX3JkADYHZWNhbF9yYwAaB2VjYWxfcmIAEgdlY2FsX3JhADUHZWNrMV9yYwAaB2VjazFfcmIAEgdlY2sxX3JhADUHZWNyMV9yYwAaB2VjcjFfcmIAEgdlY3IxX3JhADUHZWQxOV9yZAA2B2VkMTlfcmMAGgdlZDE5X3JiABIHZWQxOV9yYQA1CmV4cGlfaW1tMTIACQdleHBpX3JiABIHZXhwaV9yYQA1CmptcGJfaW1tMTgADQdqbXBiX3JhADUKam1wZl9pbW0xOAANB2ptcGZfcmEANQdqbmViX3JjABoHam5lYl9yYgASB2puZWJfcmEANQdqbmVmX3JjABoHam5lZl9yYgASB2puZWZfcmEANQpqbmVpX2ltbTEyAAkHam5laV9yYgASB2puZWlfcmEANQpqbnpiX2ltbTEyAAkHam56Yl9yYgASB2puemJfcmEANQpqbnpmX2ltbTEyAAkHam56Zl9yYgASB2puemZfcmEANQpqbnppX2ltbTE4AA0Ham56aV9yYQA1B2syNTZfcmMAGgdrMjU2X3JiABIHazI1Nl9yYQA1B2xvZ2RfcmQANgdsb2dkX3JjABoHbG9nZF9yYgASB2xvZ2RfcmEANQptY2xpX2ltbTE4AA0HbWNsaV9yYQA1Cm1jcGlfaW1tMTIACQdtY3BpX3JiABIHbWNwaV9yYQA1B21pbnRfcmIAEgdtaW50X3JhADUHbWxkdl9yZAA2B21sZHZfcmMAGgdtbGR2X3JiABIHbWxkdl9yYQA1B21sb2dfcmMAGgdtbG9nX3JiABIHbWxvZ19yYQA1Cm1vZGlfaW1tMTIACQdtb2RpX3JiABIHbW9kaV9yYQA1B21vdmVfcmIAEgdtb3ZlX3JhADUKbW92aV9pbW0xOAANB21vdmlfcmEANQdtcm9vX3JjABoHbXJvb19yYgASB21yb29fcmEANQptdWxpX2ltbTEyAAkHbXVsaV9yYgASB211bGlfcmEANQdyZXRkX3JiABIHcmV0ZF9yYQA1B3MyNTZfcmMAGgdzMjU2X3JiABIHczI1Nl9yYQA1B3Njd3FfcmMAGgdzY3dxX3JiABIHc2N3cV9yYQA1CnNsbGlfaW1tMTIACQdzbGxpX3JiABIHc2xsaV9yYQA1CnNybGlfaW1tMTIACQdzcmxpX3JiABIHc3JsaV9yYQA1B3Nyd3FfcmQANgdzcndxX3JjABoHc3J3cV9yYgASB3Nyd3FfcmEANQpzdWJpX2ltbTEyAAkHc3ViaV9yYgASB3N1YmlfcmEANQdzd3dxX3JkADYHc3d3cV9yYwAaB3N3d3FfcmIAEgdzd3dxX3JhADUHdGltZV9yYgASB3RpbWVfcmEANQd3ZGFtX3JkADYHd2RhbV9yYwAaB3dkYW1fcmIAEgd3ZGFtX3JhADUHd2RjbV9yYwAaB3dkY21fcmIAEgd3ZGNtX3JhADUHd2Rkdl9yYwAaB3dkZHZfcmIAEgd3ZGR2X3JhADUHd2RtZF9yZAA2B3dkbWRfcmMAGgd3ZG1kX3JiABIHd2RtZF9yYQA1B3dkbWxfcmMAGgd3ZG1sX3JiABIHd2RtbF9yYQA1B3dkbW1fcmQANgd3ZG1tX3JjABoHd2RtbV9yYgASB3dkbW1fcmEANQd3ZG9wX3JjABoHd2RvcF9yYgASB3dkb3BfcmEANQd3cWFtX3JkADYHd3FhbV9yYwAaB3dxYW1fcmIAEgd3cWFtX3JhADUHd3FjbV9yYwAaB3dxY21fcmIAEgd3cWNtX3JhADUHd3Fkdl9yYwAaB3dxZHZfcmIAEgd3cWR2X3JhADUHd3FtZF9yZAA2B3dxbWRfcmMAGgd3cW1kX3JiABIHd3FtZF9yYQA1B3dxbWxfcmMAGgd3cW1sX3JiABIHd3FtbF9yYQA1B3dxbW1fcmQANgd3cW1tX3JjABoHd3FtbV9yYgASB3dxbW1fcmEANQd3cW9wX3JjABoHd3FvcF9yYgASB3dxb3BfcmEANQp4b3JpX2ltbTEyAAkHeG9yaV9yYgASB3hvcmlfcmEANRNqbmViX25ld190eXBlc2NyaXB0AFUQX193YmdfcmVnaWRfZnJlZQAqDndxZHZfZnJvbV9hcmdzAMkBEF9fd2JnX2ltbTI0X2ZyZWUALB9fX3diaW5kZ2VuX2FkZF90b19zdGFja19wb2ludGVyANYBE19fd2JpbmRnZW5fZXhwb3J0XzAA0gEKgXv9Ae0iAgh/AX4CQAJAAkACQAJAAkACQAJAIABB9QFPBEAgAEHN/3tPDQUgAEELaiIAQXhxIQVB5I7AACgCACIIRQ0EQQAgBWshBAJ/QQAgBUGAAkkNABpBHyAFQf///wdLDQAaIAVBBiAAQQh2ZyIAa3ZBAXEgAEEBdGtBPmoLIgdBAnRByIvAAGooAgAiAkUEQEEAIQAMAgtBACEAIAVBGSAHQQF2a0EAIAdBH0cbdCEDA0ACQCACKAIEQXhxIgYgBUkNACAGIAVrIgYgBE8NACACIQEgBiIEDQBBACEEIAEhAAwECyACKAIUIgYgACAGIAIgA0EddkEEcWpBEGooAgAiAkcbIAAgBhshACADQQF0IQMgAg0ACwwBC0HgjsAAKAIAIgJBECAAQQtqQfgDcSAAQQtJGyIFQQN2IgB2IgFBA3EEQAJAIAFBf3NBAXEgAGoiAUEDdCIAQdiMwABqIgMgAEHgjMAAaigCACIAKAIIIgRHBEAgBCADNgIMIAMgBDYCCAwBC0HgjsAAIAJBfiABd3E2AgALIAAgAUEDdCIBQQNyNgIEIAAgAWoiASABKAIEQQFyNgIEDAgLIAVB6I7AACgCAE0NAwJAAkAgAUUEQEHkjsAAKAIAIgBFDQYgAGhBAnRByIvAAGooAgAiASgCBEF4cSAFayEEIAEhAgNAAkAgASgCECIADQAgASgCFCIADQAgAigCGCEHAkACQCACIAIoAgwiAEYEQCACQRRBECACKAIUIgAbaigCACIBDQFBACEADAILIAIoAggiASAANgIMIAAgATYCCAwBCyACQRRqIAJBEGogABshAwNAIAMhBiABIgBBFGogAEEQaiAAKAIUIgEbIQMgAEEUQRAgARtqKAIAIgENAAsgBkEANgIACyAHRQ0EIAIgAigCHEECdEHIi8AAaiIBKAIARwRAIAdBEEEUIAcoAhAgAkYbaiAANgIAIABFDQUMBAsgASAANgIAIAANA0HkjsAAQeSOwAAoAgBBfiACKAIcd3E2AgAMBAsgACgCBEF4cSAFayIBIAQgASAESSIBGyEEIAAgAiABGyECIAAhAQwACwALAkBBAiAAdCIDQQAgA2tyIAEgAHRxaCIAQQN0IgFB2IzAAGoiAyABQeCMwABqKAIAIgEoAggiBEcEQCAEIAM2AgwgAyAENgIIDAELQeCOwAAgAkF+IAB3cTYCAAsgASAFQQNyNgIEIAEgBWoiBiAAQQN0IgAgBWsiBEEBcjYCBCAAIAFqIAQ2AgBB6I7AACgCACICBEAgAkF4cUHYjMAAaiEAQfCOwAAoAgAhAwJ/QeCOwAAoAgAiBUEBIAJBA3Z0IgJxRQRAQeCOwAAgAiAFcjYCACAADAELIAAoAggLIQIgACADNgIIIAIgAzYCDCADIAA2AgwgAyACNgIIC0HwjsAAIAY2AgBB6I7AACAENgIAIAFBCGoPCyAAIAc2AhggAigCECIBBEAgACABNgIQIAEgADYCGAsgAigCFCIBRQ0AIAAgATYCFCABIAA2AhgLAkACQCAEQRBPBEAgAiAFQQNyNgIEIAIgBWoiBSAEQQFyNgIEIAQgBWogBDYCAEHojsAAKAIAIgNFDQEgA0F4cUHYjMAAaiEAQfCOwAAoAgAhAQJ/QeCOwAAoAgAiBkEBIANBA3Z0IgNxRQRAQeCOwAAgAyAGcjYCACAADAELIAAoAggLIQMgACABNgIIIAMgATYCDCABIAA2AgwgASADNgIIDAELIAIgBCAFaiIAQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIEDAELQfCOwAAgBTYCAEHojsAAIAQ2AgALIAJBCGoPCyAAIAFyRQRAQQAhAUECIAd0IgBBACAAa3IgCHEiAEUNAyAAaEECdEHIi8AAaigCACEACyAARQ0BCwNAIAAgASAAKAIEQXhxIgMgBWsiBiAESSIHGyEIIAAoAhAiAkUEQCAAKAIUIQILIAEgCCADIAVJIgAbIQEgBCAGIAQgBxsgABshBCACIgANAAsLIAFFDQAgBUHojsAAKAIAIgBNIAQgACAFa09xDQAgASgCGCEHAkACQCABIAEoAgwiAEYEQCABQRRBECABKAIUIgAbaigCACICDQFBACEADAILIAEoAggiAiAANgIMIAAgAjYCCAwBCyABQRRqIAFBEGogABshAwNAIAMhBiACIgBBFGogAEEQaiAAKAIUIgIbIQMgAEEUQRAgAhtqKAIAIgINAAsgBkEANgIACyAHRQ0DIAEgASgCHEECdEHIi8AAaiICKAIARwRAIAdBEEEUIAcoAhAgAUYbaiAANgIAIABFDQQMAwsgAiAANgIAIAANAkHkjsAAQeSOwAAoAgBBfiABKAIcd3E2AgAMAwsCQAJAAkACQAJAIAVB6I7AACgCACIBSwRAIAVB7I7AACgCACIATwRAQQAhBCAFQa+ABGoiAEEQdkAAIgFBf0YiAw0HIAFBEHQiAkUNB0H4jsAAQQAgAEGAgHxxIAMbIgRB+I7AACgCAGoiADYCAEH8jsAAQfyOwAAoAgAiASAAIAAgAUkbNgIAAkACQEH0jsAAKAIAIgMEQEHIjMAAIQADQCAAKAIAIgEgACgCBCIGaiACRg0CIAAoAggiAA0ACwwCC0GEj8AAKAIAIgBBACAAIAJNG0UEQEGEj8AAIAI2AgALQYiPwABB/x82AgBBzIzAACAENgIAQciMwAAgAjYCAEHkjMAAQdiMwAA2AgBB7IzAAEHgjMAANgIAQeCMwABB2IzAADYCAEH0jMAAQeiMwAA2AgBB6IzAAEHgjMAANgIAQfyMwABB8IzAADYCAEHwjMAAQeiMwAA2AgBBhI3AAEH4jMAANgIAQfiMwABB8IzAADYCAEGMjcAAQYCNwAA2AgBBgI3AAEH4jMAANgIAQZSNwABBiI3AADYCAEGIjcAAQYCNwAA2AgBBnI3AAEGQjcAANgIAQZCNwABBiI3AADYCAEHUjMAAQQA2AgBBpI3AAEGYjcAANgIAQZiNwABBkI3AADYCAEGgjcAAQZiNwAA2AgBBrI3AAEGgjcAANgIAQaiNwABBoI3AADYCAEG0jcAAQaiNwAA2AgBBsI3AAEGojcAANgIAQbyNwABBsI3AADYCAEG4jcAAQbCNwAA2AgBBxI3AAEG4jcAANgIAQcCNwABBuI3AADYCAEHMjcAAQcCNwAA2AgBByI3AAEHAjcAANgIAQdSNwABByI3AADYCAEHQjcAAQciNwAA2AgBB3I3AAEHQjcAANgIAQdiNwABB0I3AADYCAEHkjcAAQdiNwAA2AgBB7I3AAEHgjcAANgIAQeCNwABB2I3AADYCAEH0jcAAQeiNwAA2AgBB6I3AAEHgjcAANgIAQfyNwABB8I3AADYCAEHwjcAAQeiNwAA2AgBBhI7AAEH4jcAANgIAQfiNwABB8I3AADYCAEGMjsAAQYCOwAA2AgBBgI7AAEH4jcAANgIAQZSOwABBiI7AADYCAEGIjsAAQYCOwAA2AgBBnI7AAEGQjsAANgIAQZCOwABBiI7AADYCAEGkjsAAQZiOwAA2AgBBmI7AAEGQjsAANgIAQayOwABBoI7AADYCAEGgjsAAQZiOwAA2AgBBtI7AAEGojsAANgIAQaiOwABBoI7AADYCAEG8jsAAQbCOwAA2AgBBsI7AAEGojsAANgIAQcSOwABBuI7AADYCAEG4jsAAQbCOwAA2AgBBzI7AAEHAjsAANgIAQcCOwABBuI7AADYCAEHUjsAAQciOwAA2AgBByI7AAEHAjsAANgIAQdyOwABB0I7AADYCAEHQjsAAQciOwAA2AgBB9I7AACACNgIAQdiOwABB0I7AADYCAEHsjsAAIARBKGsiADYCACACIABBAXI2AgQgACACakEoNgIEQYCPwABBgICAATYCAAwICyACIANNIAEgA0tyDQAgACgCDEUNAwtBhI/AAEGEj8AAKAIAIgAgAiAAIAJJGzYCACACIARqIQFByIzAACEAAkACQANAIAEgACgCAEcEQCAAKAIIIgANAQwCCwsgACgCDEUNAQtByIzAACEAA0ACQCADIAAoAgAiAU8EQCABIAAoAgRqIgYgA0sNAQsgACgCCCEADAELC0H0jsAAIAI2AgBB7I7AACAEQShrIgA2AgAgAiAAQQFyNgIEIAAgAmpBKDYCBEGAj8AAQYCAgAE2AgAgAyAGQSBrQXhxQQhrIgAgACADQRBqSRsiAUEbNgIEQciMwAApAgAhCSABQRBqQdCMwAApAgA3AgAgASAJNwIIQcyMwAAgBDYCAEHIjMAAIAI2AgBB0IzAACABQQhqNgIAQdSMwABBADYCACABQRxqIQADQCAAQQc2AgAgAEEEaiIAIAZJDQALIAEgA0YNByABIAEoAgRBfnE2AgQgAyABIANrIgBBAXI2AgQgASAANgIAIABBgAJPBEAgAyAAEAUMCAsgAEF4cUHYjMAAaiEBAn9B4I7AACgCACICQQEgAEEDdnQiAHFFBEBB4I7AACAAIAJyNgIAIAEMAQsgASgCCAshACABIAM2AgggACADNgIMIAMgATYCDCADIAA2AggMBwsgACACNgIAIAAgACgCBCAEajYCBCACIAVBA3I2AgQgASACIAVqIgNrIQUgAUH0jsAAKAIARg0DIAFB8I7AACgCAEYNBCABKAIEIgRBA3FBAUYEQCABIARBeHEiABAEIAAgBWohBSAAIAFqIgEoAgQhBAsgASAEQX5xNgIEIAMgBUEBcjYCBCADIAVqIAU2AgAgBUGAAk8EQCADIAUQBQwGCyAFQXhxQdiMwABqIQACf0HgjsAAKAIAIgFBASAFQQN2dCIEcUUEQEHgjsAAIAEgBHI2AgAgAAwBCyAAKAIICyEFIAAgAzYCCCAFIAM2AgwgAyAANgIMIAMgBTYCCAwFC0HsjsAAIAAgBWsiATYCAEH0jsAAQfSOwAAoAgAiACAFaiICNgIAIAIgAUEBcjYCBCAAIAVBA3I2AgQgAEEIaiEEDAYLQfCOwAAoAgAhAAJAIAEgBWsiAkEPTQRAQfCOwABBADYCAEHojsAAQQA2AgAgACABQQNyNgIEIAAgAWoiASABKAIEQQFyNgIEDAELQeiOwAAgAjYCAEHwjsAAIAAgBWoiAzYCACADIAJBAXI2AgQgACABaiACNgIAIAAgBUEDcjYCBAsMCAsgACAEIAZqNgIEQfSOwABB9I7AACgCACIAQQ9qQXhxIgFBCGsiAjYCAEHsjsAAQeyOwAAoAgAgBGoiAyAAIAFrakEIaiIBNgIAIAIgAUEBcjYCBCAAIANqQSg2AgRBgI/AAEGAgIABNgIADAMLQfSOwAAgAzYCAEHsjsAAQeyOwAAoAgAgBWoiADYCACADIABBAXI2AgQMAQtB8I7AACADNgIAQeiOwABB6I7AACgCACAFaiIANgIAIAMgAEEBcjYCBCAAIANqIAA2AgALIAJBCGoPC0EAIQRB7I7AACgCACIAIAVNDQBB7I7AACAAIAVrIgE2AgBB9I7AAEH0jsAAKAIAIgAgBWoiAjYCACACIAFBAXI2AgQgACAFQQNyNgIEDAMLIAQPCyAAIAc2AhggASgCECICBEAgACACNgIQIAIgADYCGAsgASgCFCICRQ0AIAAgAjYCFCACIAA2AhgLAkAgBEEQTwRAIAEgBUEDcjYCBCABIAVqIgIgBEEBcjYCBCACIARqIAQ2AgAgBEGAAk8EQCACIAQQBQwCCyAEQXhxQdiMwABqIQACf0HgjsAAKAIAIgNBASAEQQN2dCIEcUUEQEHgjsAAIAMgBHI2AgAgAAwBCyAAKAIICyEEIAAgAjYCCCAEIAI2AgwgAiAANgIMIAIgBDYCCAwBCyABIAQgBWoiAEEDcjYCBCAAIAFqIgAgACgCBEEBcjYCBAsgAUEIag8LIABBCGoL+wQBAX8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEGABGsOJgECAwQFBgcILAkKCwwNLCwsLCwsLCwsLCwsLCwsLCwsDg8sLCwQAAtBASEBAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQQFrDg5BAQIDBAUGQgcICQoLDAALAkAgAEHABGsODCcoKSorLC0uLzAxMgALAkAgAEGBAmsOCg0ODxAREhMUFRYACwJAIABBgAZrDgkzNDU2N0JCODkACwJAIABBgAprDgU8PT4/QAALIABBgAhrDgI5OkELQQIPC0EDDwtBBA8LQQUPC0EGDwtBBw8LQQkPC0EKDwtBCw8LQQwPC0ENDwtBDg8LQYECDwtBggIPC0GDAg8LQYQCDwtBhQIPC0GGAg8LQYcCDwtBiAIPC0GJAg8LQYoCDwtBgAQPC0GBBA8LQYIEDwtBgwQPC0GEBA8LQYUEDwtBhgQPC0GHBA8LQYkEDwtBigQPC0GLBA8LQYwEDwtBjQQPC0GgBA8LQaEEDwtBpQQPC0HABA8LQcEEDwtBwgQPC0HDBA8LQcQEDwtBxQQPC0HGBA8LQccEDwtByAQPC0HJBA8LQcoEDwtBywQPC0GABg8LQYEGDwtBggYPC0GDBg8LQYQGDwtBhwYPC0GIBg8LQYAIDwtBgQgPC0GACg8LQYEKDwtBggoPC0GDCg8LQYQKIQELIAEPC0HggsAAQRkQ2AEAC/gDAQJ/IAAgAWohAgJAAkAgACgCBCIDQQFxDQAgA0ECcUUNASAAKAIAIgMgAWohASAAIANrIgBB8I7AACgCAEYEQCACKAIEQQNxQQNHDQFB6I7AACABNgIAIAIgAigCBEF+cTYCBCAAIAFBAXI2AgQgAiABNgIADAILIAAgAxAECwJAAkACQCACKAIEIgNBAnFFBEAgAkH0jsAAKAIARg0CIAJB8I7AACgCAEYNAyACIANBeHEiAhAEIAAgASACaiIBQQFyNgIEIAAgAWogATYCACAAQfCOwAAoAgBHDQFB6I7AACABNgIADwsgAiADQX5xNgIEIAAgAUEBcjYCBCAAIAFqIAE2AgALIAFBgAJPBEAgACABEAUPCyABQXhxQdiMwABqIQICf0HgjsAAKAIAIgNBASABQQN2dCIBcUUEQEHgjsAAIAEgA3I2AgAgAgwBCyACKAIICyEBIAIgADYCCCABIAA2AgwgACACNgIMIAAgATYCCA8LQfSOwAAgADYCAEHsjsAAQeyOwAAoAgAgAWoiATYCACAAIAFBAXI2AgQgAEHwjsAAKAIARw0BQeiOwABBADYCAEHwjsAAQQA2AgAPC0HwjsAAIAA2AgBB6I7AAEHojsAAKAIAIAFqIgE2AgAgACABQQFyNgIEIAAgAWogATYCAAsL8QIBBH8gACgCDCECAkACQCABQYACTwRAIAAoAhghAwJAAkAgACACRgRAIABBFEEQIAAoAhQiAhtqKAIAIgENAUEAIQIMAgsgACgCCCIBIAI2AgwgAiABNgIIDAELIABBFGogAEEQaiACGyEEA0AgBCEFIAEiAkEUaiACQRBqIAIoAhQiARshBCACQRRBECABG2ooAgAiAQ0ACyAFQQA2AgALIANFDQIgACAAKAIcQQJ0QciLwABqIgEoAgBHBEAgA0EQQRQgAygCECAARhtqIAI2AgAgAkUNAwwCCyABIAI2AgAgAg0BQeSOwABB5I7AACgCAEF+IAAoAhx3cTYCAAwCCyAAKAIIIgAgAkcEQCAAIAI2AgwgAiAANgIIDwtB4I7AAEHgjsAAKAIAQX4gAUEDdndxNgIADwsgAiADNgIYIAAoAhAiAQRAIAIgATYCECABIAI2AhgLIAAoAhQiAEUNACACIAA2AhQgACACNgIYCwu6AgEEf0EfIQIgAEIANwIQIAFB////B00EQCABQQYgAUEIdmciA2t2QQFxIANBAXRrQT5qIQILIAAgAjYCHCACQQJ0QciLwABqIQRBASACdCIDQeSOwAAoAgBxRQRAIAQgADYCACAAIAQ2AhggACAANgIMIAAgADYCCEHkjsAAQeSOwAAoAgAgA3I2AgAPCwJAAkAgASAEKAIAIgMoAgRBeHFGBEAgAyECDAELIAFBGSACQQF2a0EAIAJBH0cbdCEFA0AgAyAFQR12QQRxakEQaiIEKAIAIgJFDQIgBUEBdCEFIAIhAyACKAIEQXhxIAFHDQALCyACKAIIIgEgADYCDCACIAA2AgggAEEANgIYIAAgAjYCDCAAIAE2AggPCyAEIAA2AgAgACADNgIYIAAgADYCDCAAIAA2AggLlAEBBH8gARDQASABQQhrIgMgAygCAEEBaiICNgIAAkACQCACBEAgASgCACICQX9GDQEgASACQQFqNgIAIAEoAgQoAAAiBMBBAnRBuIPAAGooAgAhBUEBQQQQ0wEiAg0CCwALENcBAAsgAiAFIARBgH5xcjYAACABIAEoAgBBAWs2AgAgAxBWIABBBDYCBCAAIAI2AgALiwEBAn8gABDQASAAQQhrIgIoAgAhAwJAAkAgAUUEQCADQQFGBEAgAkEANgIAIAJBf0YNAyAAQQRrIgAgACgCAEEBayIANgIAIABFDQIMAwtB+YLAAEE/ENgBAAsgAiADQQFrIgE2AgAgAQ0BIABBBGsiACAAKAIAQQFrIgA2AgAgAA0BCyACQRAQGQsLdQIBfwF+IAEQ0AEgAUEIayICKAIAQQFGBEAgATUCBCEDIAJBADYCAAJAIAJBf0YNACABQQRrIgEgASgCAEEBayIBNgIAIAENACACQRAQGQsgACADQgGDPAAAIAAgA6dBCHZBAXE6AAEPC0H5gsAAQT8Q2AEAC3cBAn8jAEEQayIBJAAgAUEEaiAAEBwgASgCBCIALwAAIABBAmotAABBEHRyENwBIQIgASgCCCABKAIMEMsBQRBBBBDGASIAIAJBCHZBgB5xIAJBGHZyOwEMIABBADYCCCAAQoGAgIAQNwIAIAFBEGokACAAQQhqC2wBAn8gABDQASAAQQhrIgEgASgCAEEBaiICNgIAAkAgAgRAIAAoAgBBf0YNASAALwAEIABBBmotAABBEHRyENwBIQAgARBeIABBCHZBgP4DcSAAQRh2ciAAQYD+A3FBCHRyEGcPCwALENcBAAtvAQJ/IAEQ0AEgAUEIayICKAIAQQFGBEAgASgCBCEDIAJBADYCAAJAIAJBf0YNACABQQRrIgEgASgCAEEBayIBNgIAIAENACACQRAQGQsgACADQQh2OgABIAAgA0EBcToAAA8LQfmCwABBPxDYAQALawEBfyAAENABIABBCGshAgJAIAFFBEAgAigCAEEBRw0BIAAoAgQgAkEANgIAAkAgAkF/Rg0AIABBBGsiACAAKAIAQQFrIgA2AgAgAA0AIAJBEBAZCxDbAQ8LIAIQVg8LQfmCwABBPxDYAQALYQEBfyMAQRBrIgEkACABQQRqIAAQHCABKAIEIgAvAAAgAEECai0AAEEQdHIQ3AEhACABKAIIIAEoAgwQywEgAEEIdkGA/gNxIABBGHZyIABBgAZxQQh0chBnIAFBEGokAAtqAQF/IwBBMGsiASQAIAEgADoADyAAQf8BcUHAAE8EQCABQQI2AhQgAUH0gMAANgIQIAFCATcCHCABQQE2AiwgASABQShqNgIYIAEgAUEPajYCKCABQRBqQYSBwAAQVwALIAFBMGokACAAC2sBAX8jAEEwayIBJAAgASAAOwEOIABB//8DcUGAIE8EQCABQQI2AhQgAUG4gcAANgIQIAFCATcCHCABQQI2AiwgASABQShqNgIYIAEgAUEOajYCKCABQRBqQciBwAAQVwALIAFBMGokACAAC2MBAn8jAEEQayICJAACQCABRQRAIAJBCGogABALDAELIAAQ0AEgAEEIayIBIAEoAgBBAWsiAzYCACADDQAgAEEEayIAIAAoAgBBAWsiADYCACAADQAgAUEQEBkLIAJBEGokAAtjAQJ/IwBBEGsiAiQAAkAgAUUEQCACQQhqIAAQCAwBCyAAENABIABBCGsiASABKAIAQQFrIgM2AgAgAw0AIABBBGsiACAAKAIAQQFrIgA2AgAgAA0AIAFBEBAZCyACQRBqJAALXgEBfyMAQRBrIgEkACABQQRqIAAQHCABKAIEIgAvAAAgAEECai0AAEEQdHIQ3AEhACABKAIIIAEoAgwQywEgAEEIdkGA4ANxIABBgAZxQQh0ckEMdhBoIAFBEGokAAsVACAAQYyCwABB/IHAAEGAgBAQ9gELFgAgAEHQgsAAQcCCwABBgICACBD2AQtgAQF/IAAQGyECIAEQHiEAQRBBBBDGASIBQoGAgIAQNwIAIAEgAEEQdEGAgPwHcSAAIAJB/wFxQRJ0ciIAQYD+A3FBCHQgAEEIdkGA/gNxckEIdnKtQiCGNwIIIAFBCGoLXAECfyAAENABIABBCGsiASgCAEEBRgRAIAAtAAQgAUEANgIAAkAgAUF/Rg0AIABBBGsiACAAKAIAQQFrIgA2AgAgAA0AIAFBEBAZC0EBcQ8LQfmCwABBPxDYAQALYAEBfyAAENABIABBCGshAgJAIAFFBEAgAigCAEEBRgRAIAJBADYCACACQX9GDQIgAEEEayIAIAAoAgBBAWsiADYCACAADQIgAkEUEBkPC0H5gsAAQT8Q2AEACyACEF8LC2ABAX8gABDQASAAQQhrIQICQCABRQRAIAIoAgBBAUYEQCACQQA2AgAgAkF/Rg0CIABBBGsiACAAKAIAQQFrIgA2AgAgAA0CIAJBEBAZDwtB+YLAAEE/ENgBAAsgAhBeCwvQBgEEfwJAIABBBGsoAgAiBCICQXhxIgNBBEEIIAJBA3EiAhsgAWpPBEAgAkEAIAMgAUEnaksbDQEgAEEIayIBIAQiA0F4cSIAaiECAkACQCADQQFxDQAgA0ECcUUNASABKAIAIgMgAGohACABIANrIgFB8I7AACgCAEYEQCACKAIEQQNxQQNHDQFB6I7AACAANgIAIAIgAigCBEF+cTYCBCABIABBAXI2AgQgAiAANgIADAILIAEgAxAECwJAAkACQAJAIAIoAgQiA0ECcUUEQCACQfSOwAAoAgBGDQIgAkHwjsAAKAIARg0EIAIgA0F4cSICEAQgASAAIAJqIgBBAXI2AgQgACABaiAANgIAIAFB8I7AACgCAEcNAUHojsAAIAA2AgAMBQsgAiADQX5xNgIEIAEgAEEBcjYCBCAAIAFqIAA2AgALIABBgAJJDQEgASAAEAVBACEBQYiPwABBiI/AACgCAEEBayIANgIAIAANA0HQjMAAKAIAIgAEQANAIAFBAWohASAAKAIIIgANAAsLQYiPwABB/x8gASABQf8fTRs2AgAMAwtB9I7AACABNgIAQeyOwABB7I7AACgCACAAaiIANgIAIAEgAEEBcjYCBEHwjsAAKAIAIAFGBEBB6I7AAEEANgIAQfCOwABBADYCAAsgAEGAj8AAKAIAIgNNDQJB9I7AACgCACICRQ0CQQAhAQJAQeyOwAAoAgAiBEEpSQ0AQciMwAAhAANAIAIgACgCACIFTwRAIAUgACgCBGogAksNAgsgACgCCCIADQALC0HQjMAAKAIAIgAEQANAIAFBAWohASAAKAIIIgANAAsLQYiPwABB/x8gASABQf8fTRs2AgAgAyAETw0CQYCPwABBfzYCAAwCCyAAQXhxQdiMwABqIQICf0HgjsAAKAIAIgNBASAAQQN2dCIAcUUEQEHgjsAAIAAgA3I2AgAgAgwBCyACKAIICyEAIAIgATYCCCAAIAE2AgwgASACNgIMIAEgADYCCAwBC0HwjsAAIAE2AgBB6I7AAEHojsAAKAIAIABqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAsPC0GpicAAQS5B2InAABBKAAtB6InAAEEuQZiKwAAQSgALVQEBfyMAQRBrIgEkACABQQRqIAAQHCABKAIEIgAvAAAgAEECai0AAEEQdHIQ3AEhACABKAIIIAEoAgwQywEgAEEOdkE8cSAAQR52chBoIAFBEGokAAtZAQJ/IAAQ0AEgAEEIayIBKAIAQQFGBEAgAC0ABCABQQA2AgACQCABQX9GDQAgAEEEayIAIAAoAgBBAWsiADYCACAADQAgAUEQEBkLDwtB+YLAAEE/ENgBAAtZAQJ/IAEQ0AEgAUEIayIDIAMoAgBBAWoiAjYCAAJAIAIEQCABKAIAIgJBf0YNASAAIAM2AgggACABNgIEIAAgAUEEajYCACABIAJBAWo2AgAPCwALENcBAAtZAQJ/IAAQ0AEgAEEIayIBKAIAQQFGBEAgAC8BBCABQQA2AgACQCABQX9GDQAgAEEEayIAIAAoAgBBAWsiADYCACAADQAgAUEQEBkLDwtB+YLAAEE/ENgBAAtZAQJ/IAAQ0AEgAEEIayIBKAIAQQFGBEAgACgCBCABQQA2AgACQCABQX9GDQAgAEEEayIAIAAoAgBBAWsiADYCACAADQAgAUEQEBkLDwtB+YLAAEE/ENgBAAtRAQJ/AkAgABAbIgBBGHENACAAQQdxIgJBB0YNAEEQQQQQxgEiAUKBgICAEDcCACABIABBBXZBAXGtQiCGIAKtQiiGhDcCCCABQQhqIQELIAELVwEBfyAAEBshAiABEBshAUEQQQQQxgEiAEKBgICAEDcCACAAIAFB/wFxQQx0IAJBEnRyIgFBgOADcUEIdCABQQh2QYD+A3FyQQh2rUIghjcCCCAAQQhqC0wAIANB/wFxIAFB/wFxQQx0IABB/wFxQRJ0ciIAIAJB/wFxQQZ0cnIiAUEQdEGAgPwHcSAAQQh2QYD+A3EgAUGA/gNxQQh0ckEIdnILTwECfyAAENABIABBCGsiASABKAIAQQFqIgI2AgACQCACBEAgACgCAEF/Rg0BIAAvAAQgAEEGai0AAEEQdHIQ1AEgARBeEGgPCwALENcBAAtOAQF/IAFFBEAgABAWGg8LIAAQ0AEgAEEIayIBIAEoAgBBAWsiAjYCAAJAIAINACAAQQRrIgAgACgCAEEBayIANgIAIAANACABQRAQGQsLEAAgACABIAIgA0HeABD3AQsQACAAIAEgAiADQd8AEPcBCxAAIAAgASACIANB4AAQ9wELEAAgACABIAIgA0HhABD3AQsQACAAIAEgAiADQeIAEPgBCxAAIAAgASACIANB4wAQ+AELTgEBfyABRQRAIAAQGxoPCyAAENABIABBCGsiASABKAIAQQFrIgI2AgACQCACDQAgAEEEayIAIAAoAgBBAWsiADYCACAADQAgAUEQEBkLC04BAX8gAUUEQCAAEB0aDwsgABDQASAAQQhrIgEgASgCAEEBayICNgIAAkAgAg0AIABBBGsiACAAKAIAQQFrIgA2AgAgAA0AIAFBEBAZCwtOAQF/IAFFBEAgABAeGg8LIAAQ0AEgAEEIayIBIAEoAgBBAWsiAjYCAAJAIAINACAAQQRrIgAgACgCAEEBayIANgIAIAANACABQRAQGQsLDwAgACABQYCAgMgBEPkBCwwAIAAgAUHLABD6AQsMACAAIAFBzAAQ+gELDAAgACABQc0AEPoBCwwAIAAgAUHOABD6AQsMACAAIAFBzwAQ+gELDAAgACABQdAAEPoBCw8AIAAgAUGAgIDoBhD5AQtFAQF/IwBBEGsiASQAIAFBBGogABAcIAEoAgQiAC8AACAAQQJqLQAAQRB0chDUASABKAIIIAEoAgwQywEQaCABQRBqJAALSwEBfyMAQRBrIgEkACABQQRqIAAQHCABKAIEIgAvAAAgAEECai0AAEEQdHIQ3AFBGHZBP3EgASgCCCABKAIMEMsBEGggAUEQaiQAC04BAX8gABAeIQBBEEEEEMYBIgFCgYCAgBA3AgAgASAAQRB0QYCA/AdxIABBCHZBgP4DcSAAQYD+A3FBCHRyQQh2cq1CIIY3AgggAUEIagsLACAAIAFBBxD7AQsLACAAIAFBCBD7AQs/ACACQRZ0QYCAgAZxIAFB/wFxQQx0IgEgAkH8AXFBBnRyQYD+A3FBCHQgASAAQRJ0ckEIdkGA/gNxckEIdnILOAEBfyMAQRBrIgQkACAAEBsgARAbIAIQGyAEQQhqIAMQCyAELQAIIAQtAAkQyAEQYiAEQRBqJAALOAEBfyMAQRBrIgQkACAAEBsgARAbIAIQGyAEQQhqIAMQCCAELQAIIAQtAAkQiQEQYiAEQRBqJAALCwAgACABQQoQ/AELCwAgACABQQwQ/AELCwAgACABQRQQ/AELCwAgACABQRYQ/AELCwAgACABQRsQ/AELCwAgACABQR4Q/AELCwAgACABQR8Q/AELCwAgACABQSQQ/AELCwAgACABQTIQ/AELPgAgABAbIQAgARAeIgFBEHRBgID8B3EgAEH/AXFBEnQgAXIiAEGA/gNxQQh0IABBCHZBgP4DcXJBCHZyEGILOAAgAkEQdEGAgPwHcSABQf8BcUEMdCIBIAJyQYD+A3FBCHQgASAAQRJ0ckEIdkGA/gNxckEIdnILPAECfyMAQRBrIgEkACAAENABIAFBCGogABBdIAEoAggtAAEgASgCDCICIAIoAgBBAWs2AgAgAUEQaiQACzwBAn8jAEEQayIBJAAgABDQASABQQhqIAAQXSABKAIILQAAIAEoAgwiAiACKAIAQQFrNgIAIAFBEGokAAtBAQF/IwBBIGsiAyQAIANBADYCECADQQE2AgQgA0IENwIIIAMgATYCHCADIAA2AhggAyADQRhqNgIAIAMgAhBXAAs5AQF/IwBBEGsiAiQAIAAQ0AEgAkEIaiAAEGEgAigCDCACKAIIIAFBAEc6AABBADYCACACQRBqJAALOQEBfyMAQRBrIgIkACAAENABIAJBCGogABBhIAIoAgwgAigCCCABQQBHOgABQQA2AgAgAkEQaiQAC0MBAX8gAEE5TwRAQeCCwABBGRDYAQALQRRBBBDGASICIAA6ABAgAiABNgIMIAJBADYCCCACQoGAgIAQNwIAIAJBCGoLCgAgAEHVABD9AQsKACAAQdYAEP0BCwoAIABB1wAQ/QELCgAgAEHaABD9AQsKACAAQdsAEP0BCwoAIABB3AAQ/QELCgAgAEHdABD9AQs+ACAAEBsgARAbIAIQGyADEBsQISEBQRBBBBDGASIAQoGAgIAQNwIAIAAgAa1C////B4NCIIY3AgggAEEIags7AQF/IAAgACgCAEEBayIBNgIAAkAgAQ0AIAAoAgwQ2wEgACAAKAIEQQFrIgE2AgQgAQ0AIABBEBAZCwvIAQEBfyMAQSBrIgIkACACQQE7ARwgAiABNgIYIAIgADYCFCACQaiHwAA2AhAgAkEBNgIMIAJBDGoiACgCCCIBRQRAQfyGwABBK0HEisAAEEoACyABKAIMGiABKAIEGiAALQAQIQEgAC0AERpBxIvAAEHEi8AAKAIAIgBBAWo2AgACQCAAQQBIDQBBkI/AAC0AAEEBcQ0AQYyPwABBjI/AACgCAEEBajYCAEHAi8AAKAIAQQBIDQBBkI/AAEEAOgAAIAFFDQAACwALLwEBfyMAQRBrIgEkACABQQhqIAAQCyABLQAJQSBBACABLQAIG3IQaCABQRBqJAALOgAgABAbIAEQGyACEBsQOiEBQRBBBBDGASIAQoGAgIAQNwIAIAAgAa1C////B4NCIIY3AgggAEEIags6ACAAEBsgARAbIAIQHRBHIQFBEEEEEMYBIgBCgYCAgBA3AgAgACABrUL///8Hg0IghjcCCCAAQQhqCzIBAX8jAEEQayIBJAAgAUEEaiAAEBwgASgCBC0ABCABKAIIIAEoAgwQzAEgAUEQaiQACzIBAX8jAEEQayIBJAAgAUEEaiAAEBwgASgCBCgCACABKAIIIAEoAgwQzAEgAUEQaiQACzEBAX8gASgCACICQX9HBEAgASACQQFqNgIAIAAgATYCBCAAIAFBBGo2AgAPCxDXAQALCQAgAEEQEPABCwkAIABBFBDwAQszAQF/IAAQGyEBQRBBBBDGASIAQoGAgIAQNwIAIAAgAUECdEH8AXGtQiCGNwIIIABBCGoLKAAgASgCAEUEQCABQX82AgAgACABNgIEIAAgAUEEajYCAA8LENcBAAssAQF/QRBBBBDGASIBQoGAgIAQNwIAIAEgAK1C////B4NCIIY3AgggAUEIagskACAAENABIAAoAgAEQBDXAQALIABBADYCACAAIAFBAEc6AAQLKAAgAxAWIQMgABDHASABEMcBIAIQxwEgAxDOAUEIdEHkAHIQ0QEQZwsoACADEBYhAyAAEMcBIAEQxwEgAhDHASADEM4BQQh0QeUAchDRARBnCyAAIABBAWsiAEEFTQRAIABBAWoPC0HggsAAQRkQ2AEACykBAX9BEEEEEMYBIgEgADYCDCABQQA2AgggAUKBgICAEDcCACABQQhqCykBAX9BEEEEEMYBIgEgADoADCABQQA2AgggAUKBgICAEDcCACABQQhqCyIAIAIQAiECIAAQxwEgARDHASACEEdBCHRBygByENEBEGcLDwAgACABIAIgA0ESEPEBCw8AIAAgASACIANBGBDxAQsPACAAIAEgAiADQRwQ8QELDwAgACABIAIgA0EdEPEBCw8AIAAgASACIANBIRDyAQsPACAAIAEgAiADQSIQ8QELDwAgACABIAIgA0EjEPEBCw8AIAAgASACIANBKBDxAQsPACAAIAEgAiADQSoQ8QELDwAgACABIAIgA0EsEPEBCw8AIAAgASACIANBLxDxAQsPACAAIAEgAiADQTgQ8QELEAAgACABIAIgA0HTABDyAQsQACAAIAEgAiADQdQAEPIBCxAAIAAgASACIANB3gAQ8gELEAAgACABIAIgA0HfABDyAQsQACAAIAEgAiADQeAAEPIBCxAAIAAgASACIANB4QAQ8gELEAAgACABIAIgA0HiABDyAQsQACAAIAEgAiADQeMAEPIBCxAAIAAgASACIANB5AAQ8gELEAAgACABIAIgA0HlABDyAQsQACAAIAEgAiADQeYAEPEBCxAAIAAgASACIANB5wAQ8QELEAAgACABIAIgA0HoABDxAQsQACAAIAEgAiADQekAEPEBCxAAIAAgASACIANB6gAQ8QELEAAgACABIAIgA0HrABDxAQsQACAAIAEgAiADQewAEPEBCxAAIAAgASACIANB7gAQ8QELHgAgARBmIQEgABDHASABEMQBQQh0QcwAchDRARBnCxkAIAAgASACQSBBACAEG0EQQQAgAxtyECELDQAgACABIAJBARDzAQsNACAAIAEgAkECEPMBCw0AIAAgASACQQMQ8wELDQAgACABIAJBBBDzAQsNACAAIAEgAkEFEPMBCw0AIAAgASACQQYQ8wELDQAgACABIAJBBxDzAQsNACAAIAEgAkEIEPMBCw0AIAAgASACQQkQ8wELDQAgACABIAJBCxDzAQsNACAAIAEgAkENEPMBCw0AIAAgASACQQ4Q8wELDQAgACABIAJBDxDzAQsNACAAIAEgAkEQEPMBCw0AIAAgASACQREQ8wELDQAgACABIAJBFxDzAQsNACAAIAEgAkEmEPMBCw0AIAAgASACQScQ8wELDQAgACABIAJBKRDzAQsNACAAIAEgAkErEPMBCw0AIAAgASACQS0Q8wELDQAgACABIAJBLhDzAQsNACAAIAEgAkEwEPMBCw0AIAAgASACQTEQ8wELDQAgACABIAJBNRDzAQsNACAAIAEgAkE3EPMBCw0AIAAgASACQTkQ9AELDQAgACABIAJBOhD0AQsNACAAIAEgAkE7EPQBCw0AIAAgASACQTwQ9AELDQAgACABIAJBPRD0AQsNACAAIAEgAkE+EPQBCw0AIAAgASACQT8Q9AELDgAgACABIAJBwAAQ9AELDgAgACABIAJBwQAQ9AELDgAgACABIAJBwgAQ9AELDgAgACABIAJBwwAQ9AELDgAgACABIAJBxAAQ9AELDgAgACABIAJBxQAQ9AELDgAgACABIAJBxgAQ9AELDgAgACABIAJBxwAQ9AELDgAgACABIAJByAAQ9AELDgAgACABIAJByQAQ9AELDgAgACABIAJBygAQ9AELDgAgACABIAJB0QAQ9AELDgAgACABIAJB0gAQ9AELFwEBfyAAQf8BcUE/TQR/IAAQaAVBAAsLGwAgABDQASAAKAIAQX9GBEAQ1wEACyAALQAECwkAIABBExD1AQsJACAAQRUQ9QELCQAgAEEaEPUBCwkAIABBIBD1AQsJACAAQSUQ9QELIgEBf0EQQQQQxgEiAEIANwIIIABCgYCAgBA3AgAgAEEIagsJACAAQTQQ9QELCQAgAEE2EPUBCwoAIABB2AAQ9QELCgAgAEHZABD1AQsXACABQRB0QYCA/ANxIABBAnRB/AFxcgsbACAAEMcBIAEQxwEgAhDHARA6QQh0ENEBEGcLEgAgASAAENMBIgAEQCAADwsAC3UBAX8gAEH/AXFBwABPBEAjAEEQayIBJAAgAUEiNgIMIAFBgIDAADYCCCMAQSBrIgAkACAAQQE2AgQgAEH0hsAANgIAIABCATcCDCAAIAFBCGqtQoCAgIDAAIQ3AxggACAAQRhqNgIIIABBuIDAABBXAAsgAAsUACAAIAEgAkEgQQAgAxsgBHIQIQsXACAAEBsgARAbIAIQGyADEBYQzgEQYgsWACAAEBsgARAbIAIQGyADEBsQIRBiCxMAIAAgACgCAEEBazYCACABEF4LEwAgACAAKAIAQQFrNgIAIAEQXwsSACAAEBsgARAbIAIQAhBHEGILEQAgACABIAJBIEEAIAMbECELEgAgABAbIAEQGyACEB0QRxBiCxMAIAAEQA8LQdSKwABBGxDYAQALFAEBf0EEQQEQxgEiASAANgAAIAELDQAgAQRAIAAgARAZCwuBAwEFf0GRj8AALQAAGgJ/IABBCU8EQAJAQc3/e0EQIAAgAEEQTRsiAGsgAU0NACAAQRAgAUELakF4cSABQQtJGyIEakEMahABIgJFDQAgAkEIayEBAkAgAEEBayIDIAJxRQRAIAEhAAwBCyACQQRrIgUoAgAiBkF4cSACIANqQQAgAGtxQQhrIgIgAEEAIAIgAWtBEE0baiIAIAFrIgJrIQMgBkEDcQRAIAAgAyAAKAIEQQFxckECcjYCBCAAIANqIgMgAygCBEEBcjYCBCAFIAIgBSgCAEEBcXJBAnI2AgAgASACaiIDIAMoAgRBAXI2AgQgASACEAMMAQsgASgCACEBIAAgAzYCBCAAIAEgAmo2AgALAkAgACgCBCIBQQNxRQ0AIAFBeHEiAiAEQRBqTQ0AIAAgBCABQQFxckECcjYCBCAAIARqIgEgAiAEayIEQQNyNgIEIAAgAmoiAiACKAIEQQFyNgIEIAEgBBADCyAAQQhqIQMLIAMMAQsgARABCwsNACAAENwBQQp2QT9xCw8AIAAQGyABEGYQxAEQYgsLACAAIwBqJAAjAAsOAEHvisAAQc8AENgBAAsJACAAIAEQAAALCQAgAEE/cRBoCwoAIAAQG0H/AXELCAAgAEEEEBkLBwAgAEEIdAsJAEEzENEBEGcLBgBBCxBoCwYAQQoQaAsGAEEIEGgLBgBBDxBoCwYAQQYQaAsGAEEJEGgLBgBBBxBoCwYAQQwQaAsGAEECEGgLBgBBARBoCwYAQQMQaAsGAEENEGgLBgBBDhBoCwYAQQUQaAsGAEEEEGgLBgBBEBBoCwYAQQAQaAsEAEEECzMBAX8gACAAKAIAQQFrIgI2AgACQCACDQAgACAAKAIEQQFrIgI2AgQgAg0AIAAgARAZCwsjACAAEMcBIAEQxwEgAhDHASADEMcBECFBCHQgBHIQ0QEQZwsiACAAEMcBIAEQxwEgAhDHASADEA4QIUEIdCAEchDRARBnCx4AIAAQxwEgARDHASACEMcBEDpBCHQgA3IQ0QEQZwsdACAAEMcBIAEQxwEgAhAPEEdBCHQgA3IQ0QEQZwsaACAAEMcBGiAAQQp0QYD4A3EgAXIQ0QEQZwtfAQF/IwBBMGsiBCQAIAQgADYCDCAAIANPBEAgBEECNgIUIAQgAjYCECAEQgE3AhwgBEEDNgIsIAQgBEEoajYCGCAEIARBDGo2AiggBEEQaiABEFcACyAEQTBqJAAgAAtMAQJ/IwBBEGsiBSQAIAVBCGogAxALIAUtAAkhAyAFLQAIIQYgABDHASABEMcBIAIQxwEgBiADEMgBQQh0IARyENEBEGcgBUEQaiQAC0wBAn8jAEEQayIFJAAgBUEIaiADEAggBS0ACSEDIAUtAAghBiAAEMcBIAEQxwEgAhDHASAGIAMQiQFBCHQgBHIQ0QEQZyAFQRBqJAALSQAgABDHARogARDHARogAEESdEGAgPAXcSIAIAFBDHRBgOA/cXIiAUGA4ANxQQh0IAFBCHZBgP4DcSAAIAJyQRh2cnIQ0QEQZwtJACAAEMcBGiABEBMiAUEQdEGAgPwHcSAAQRJ0QYCA8B9xIAFyIgBBgP4DcUEIdCAAQQh2QYD+A3FyQQh2ckEIdCACchDRARBnC0kBAX8jAEEQayIDJAAgABDQASABIAJPBEBB4ILAAEEZENgBAAsgA0EIaiAAEGEgAygCDCADKAIIIAE6AAFBADYCACADQRBqJAALQQAgABDHARogARDHARogAEESdEGAgPAHcSABQQx0QYDgP3FyIgBBCHZBgP4DcSAAQYDgA3FBCHRyIAJyENEBEGcLNQAgABAUIgBBEHRBgID8B3EgAEEIdkGA/gNxIABBgP4DcUEIdHJBCHZyQQh0IAFyENEBEGcLC8gLAQBBgIDAAAu+C0NoZWNrUmVnSWQgd2FzIGdpdmVuIGludmFsaWQgUmVnSWRmdWVsLWFzbS9zcmMvbGliLnJzAAAAIgAQABMAAABuAAAAIgAAAFZhbHVlIGBgIG91dCBvZiByYW5nZSBmb3IgNi1iaXQgaW1tZWRpYXRlAAAASAAQAAcAAABPABAAIgAAACIAEAATAAAAsAMAABwAAABgIG91dCBvZiByYW5nZSBmb3IgMTItYml0IGltbWVkaWF0ZQBIABAABwAAAJQAEAAjAAAAIgAQABMAAAC1AwAAHAAAAGAgb3V0IG9mIHJhbmdlIGZvciAxOC1iaXQgaW1tZWRpYXRlAEgAEAAHAAAA2AAQACMAAAAiABAAEwAAALoDAAAcAAAAYCBvdXQgb2YgcmFuZ2UgZm9yIDI0LWJpdCBpbW1lZGlhdGUASAAQAAcAAAAcARAAIwAAACIAEAATAAAAvwMAABwAAABpbnZhbGlkIGVudW0gdmFsdWUgcGFzc2VkYXR0ZW1wdGVkIHRvIHRha2Ugb3duZXJzaGlwIG9mIFJ1c3QgdmFsdWUgd2hpbGUgaXQgd2FzIGJvcnJvd2VkEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAACAAAAAhAAAAIgAAACQAAAAlAAAAJgAAACcAAAAoAAAAKQAAACoAAAArAAAALAAAAC0AAAAuAAAALwAAADAAAAAxAAAAMgAAADMAAAA0AAAANQAAADYAAAA3AAAAOAAAADkAAAA6AAAAOwAAADwAAAA9AAAAPgAAAD8AAABAAAAAQQAAAEIAAABDAAAARwAAAEgAAABJAAAASgAAAEsAAABMAAAAUAAAAFEAAABSAAAAUwAAAFQAAABVAAAAVgAAAFcAAABYAAAAWQAAAFoAAABbAAAAXAAAAF0AAABeAAAAXwAAAGAAAABhAAAAcAAAAHEAAAByAAAAcwAAAHQAAAB1AAAAdgAAAHcAAAB4AAAAeQAAAJAAAACRAAAAkgAAAJMAAACUAAAAlQAAAJYAAACXAAAAmAAAAKAAAAChAAAAogAAAKMAAACkAAAApQAAAKYAAACnAAAAqAAAAKkAAACqAAAAqwAAAKwAAACtAAAAsAAAALoAAAC7AAAAAQAAAAAAAABjYWxsZWQgYE9wdGlvbjo6dW53cmFwKClgIG9uIGEgYE5vbmVgIHZhbHVlAAUAAAAAAAAAAQAAAAYAAAAwMDAxMDIwMzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQwNDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OS9ydXN0L2RlcHMvZGxtYWxsb2MtMC4yLjYvc3JjL2RsbWFsbG9jLnJzYXNzZXJ0aW9uIGZhaWxlZDogcHNpemUgPj0gc2l6ZSArIG1pbl9vdmVyaGVhZACABBAAKQAAAKgEAAAJAAAAYXNzZXJ0aW9uIGZhaWxlZDogcHNpemUgPD0gc2l6ZSArIG1heF9vdmVyaGVhZAAAgAQQACkAAACuBAAADQAAAGxpYnJhcnkvc3RkL3NyYy9wYW5pY2tpbmcucnMoBRAAHAAAAIsCAAAeAAAAbnVsbCBwb2ludGVyIHBhc3NlZCB0byBydXN0cmVjdXJzaXZlIHVzZSBvZiBhbiBvYmplY3QgZGV0ZWN0ZWQgd2hpY2ggd291bGQgbGVhZCB0byB1bnNhZmUgYWxpYXNpbmcgaW4gcnVzdAA7CXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AgZ3YWxydXMGMC4yMS4zDHdhc20tYmluZGdlbgYwLjIuOTM=",e)}async function NS(){return await TS(h6())}NS();S.ADD=sg;S.ADDI=og;S.ALOC=cg;S.AND=ug;S.ANDI=lg;S.BAL=dg;S.BHEI=fg;S.BHSH=pg;S.BLDD=hg;S.BSIZ=mg;S.BURN=gg;S.CALL=_g;S.CB=Ag;S.CCP=yg;S.CFE=bg;S.CFEI=vg;S.CFS=wg;S.CFSI=Eg;S.CROO=Cg;S.CSIZ=Ig;S.CompareArgs=Wr;S.CompareMode=r6;S.DIV=Sg;S.DIVI=xg;S.DivArgs=rs;S.ECAL=Tg;S.ECK1=Ng;S.ECR1=Rg;S.ED19=kg;S.EQ=Bg;S.EXP=Og;S.EXPI=Pg;S.FLAG=Dg;S.GM=uo;S.GMArgs=i6;S.GT=Mg;S.GTF=lo;S.GTFArgs=a6;S.Imm06=Je;S.Imm12=_e;S.Imm18=Lt;S.Imm24=yt;S.Instruction=L;S.JI=Fg;S.JMP=Lg;S.JMPB=Ug;S.JMPF=Qg;S.JNE=qg;S.JNEB=Vg;S.JNEF=Jg;S.JNEI=zg;S.JNZB=Gg;S.JNZF=Hg;S.JNZI=Wg;S.K256=Zg;S.LB=Yg;S.LDC=Xg;S.LOG=$g;S.LOGD=Kg;S.LT=jg;S.LW=e_;S.MCL=t_;S.MCLI=n_;S.MCP=r_;S.MCPI=i_;S.MEQ=a_;S.MINT=s_;S.MLDV=o_;S.MLOG=c_;S.MOD=u_;S.MODI=l_;S.MOVE=d_;S.MOVI=f_;S.MROO=p_;S.MUL=h_;S.MULI=m_;S.MathArgs=is;S.MathOp=s6;S.MulArgs=as;S.NOOP=g_;S.NOT=__;S.OR=A_;S.ORI=y_;S.POPH=b_;S.POPL=v_;S.PSHH=w_;S.PSHL=E_;S.PanicInstruction=C_;S.PanicReason=o6;S.RET=I_;S.RETD=S_;S.RVRT=x_;S.RegId=f;S.S256=T_;S.SB=N_;S.SCWQ=R_;S.SLL=k_;S.SLLI=B_;S.SMO=O_;S.SRL=P_;S.SRLI=D_;S.SRW=M_;S.SRWQ=F_;S.SUB=L_;S.SUBI=U_;S.SW=Q_;S.SWW=q_;S.SWWQ=V_;S.TIME=J_;S.TR=z_;S.TRO=G_;S.WDAM=H_;S.WDCM=fo;S.WDDV=po;S.WDMD=W_;S.WDML=ho;S.WDMM=Z_;S.WDOP=mo;S.WQAM=Y_;S.WQCM=go;S.WQDV=_o;S.WQMD=X_;S.WQML=Ao;S.WQMM=$_;S.WQOP=yo;S.XOR=K_;S.XORI=j_;S.add=jF;S.addi=n4;S.aloc=bL;S.and=eL;S.andi=r4;S.bal=KL;S.bhei=IL;S.bhsh=CL;S.bldd=t6;S.bsiz=e6;S.burn=SL;S.call=xL;S.cb=kL;S.ccp=TL;S.cfe=O4;S.cfei=k4;S.cfs=P4;S.cfsi=B4;S.croo=NL;S.csiz=RL;S.div=tL;S.divi=i4;S.ecal=j4;S.eck1=zL;S.ecr1=GL;S.ed19=HL;S.eq=nL;S.exp=rL;S.expi=a4;S.flag=$L;S.gm=v4;S.gm_args=JF;S.gt=iL;S.gtf=y4;S.gtf_args=zF;S.initSync=f6;S.initWasm=NS;S.ji=R4;S.jmp=jL;S.jmpb=I4;S.jmpf=C4;S.jne=e4;S.jneb=N4;S.jnef=T4;S.jnei=p4;S.jnzb=x4;S.jnzf=S4;S.jnzi=E4;S.k256=WL;S.lb=h4;S.ldc=BL;S.log=OL;S.logd=PL;S.lt=aL;S.lw=m4;S.mcl=vL;S.mcli=b4;S.mcp=wL;S.mcpi=A4;S.meq=EL;S.mint=DL;S.mldv=_L;S.mlog=sL;S.mod_=cL;S.modi=s4;S.move_=uL;S.movi=w4;S.mroo=oL;S.mul=lL;S.muli=o4;S.noop=XL;S.not=dL;S.or=fL;S.ori=c4;S.poph=L4;S.popl=F4;S.pshh=M4;S.pshl=D4;S.ret=AL;S.retd=yL;S.rvrt=ML;S.s256=ZL;S.sb=g4;S.scwq=FL;S.sll=pL;S.slli=u4;S.smo=t4;S.srl=hL;S.srli=l4;S.srw=LL;S.srwq=UL;S.sub=mL;S.subi=d4;S.sw=_4;S.sww=QL;S.swwq=qL;S.time=YL;S.tr=VL;S.tro=JL;S.wdam=Y4;S.wdcm=U4;S.wdcm_args=GF;S.wddv=G4;S.wddv_args=$F;S.wdmd=W4;S.wdml=J4;S.wdml_args=YF;S.wdmm=$4;S.wdop=q4;S.wdop_args=WF;S.wqam=X4;S.wqcm=Q4;S.wqcm_args=HF;S.wqdv=H4;S.wqdv_args=KF;S.wqmd=Z4;S.wqml=z4;S.wqml_args=XF;S.wqmm=K4;S.wqop=V4;S.wqop_args=ZF;S.xor=gL;S.xori=f4});var GA=N((rse,fT)=>{"use strict";fT.exports=vq;function vq(e,t){for(var n=new Array(arguments.length-1),r=0,i=2,a=!0;i<arguments.length;)n[r++]=arguments[i++];return new Promise(function(o,c){n[r]=function(d){if(a)if(a=!1,d)c(d);else{for(var p=new Array(arguments.length-1),h=0;h<p.length;)p[h++]=arguments[h];o.apply(null,p)}};try{e.apply(t||null,n)}catch(u){a&&(a=!1,c(u))}})}});var gT=N(mT=>{"use strict";var gf=mT;gf.length=function(t){var n=t.length;if(!n)return 0;for(var r=0;--n%4>1&&t.charAt(n)==="=";)++r;return Math.ceil(t.length*3)/4-r};var Bo=new Array(64),hT=new Array(123);for(mr=0;mr<64;)hT[Bo[mr]=mr<26?mr+65:mr<52?mr+71:mr<62?mr-4:mr-59|43]=mr++;var mr;gf.encode=function(t,n,r){for(var i=null,a=[],s=0,o=0,c;n<r;){var u=t[n++];switch(o){case 0:a[s++]=Bo[u>>2],c=(u&3)<<4,o=1;break;case 1:a[s++]=Bo[c|u>>4],c=(u&15)<<2,o=2;break;case 2:a[s++]=Bo[c|u>>6],a[s++]=Bo[u&63],o=0;break}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return o&&(a[s++]=Bo[c],a[s++]=61,o===1&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var pT="invalid encoding";gf.decode=function(t,n,r){for(var i=r,a=0,s,o=0;o<t.length;){var c=t.charCodeAt(o++);if(c===61&&a>1)break;if((c=hT[c])===void 0)throw Error(pT);switch(a){case 0:s=c,a=1;break;case 1:n[r++]=s<<2|(c&48)>>4,s=c,a=2;break;case 2:n[r++]=(s&15)<<4|(c&60)>>2,s=c,a=3;break;case 3:n[r++]=(s&3)<<6|c,a=0;break}}if(a===1)throw Error(pT);return r-i};gf.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var AT=N((ase,_T)=>{"use strict";_T.exports=_f;function _f(){this._listeners={}}_f.prototype.on=function(t,n,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:n,ctx:r||this}),this};_f.prototype.off=function(t,n){if(t===void 0)this._listeners={};else if(n===void 0)this._listeners[t]=[];else for(var r=this._listeners[t],i=0;i<r.length;)r[i].fn===n?r.splice(i,1):++i;return this};_f.prototype.emit=function(t){var n=this._listeners[t];if(n){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<n.length;)n[i].fn.apply(n[i++].ctx,r)}return this}});var IT=N((sse,CT)=>{"use strict";CT.exports=yT(yT);function yT(e){return typeof Float32Array<"u"?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=n[3]===128;function i(c,u,d){t[0]=c,u[d]=n[0],u[d+1]=n[1],u[d+2]=n[2],u[d+3]=n[3]}function a(c,u,d){t[0]=c,u[d]=n[3],u[d+1]=n[2],u[d+2]=n[1],u[d+3]=n[0]}e.writeFloatLE=r?i:a,e.writeFloatBE=r?a:i;function s(c,u){return n[0]=c[u],n[1]=c[u+1],n[2]=c[u+2],n[3]=c[u+3],t[0]}function o(c,u){return n[3]=c[u],n[2]=c[u+1],n[1]=c[u+2],n[0]=c[u+3],t[0]}e.readFloatLE=r?s:o,e.readFloatBE=r?o:s}():function(){function t(r,i,a,s){var o=i<0?1:0;if(o&&(i=-i),i===0)r(1/i>0?0:2147483648,a,s);else if(isNaN(i))r(2143289344,a,s);else if(i>34028234663852886e22)r((o<<31|2139095040)>>>0,a,s);else if(i<11754943508222875e-54)r((o<<31|Math.round(i/1401298464324817e-60))>>>0,a,s);else{var c=Math.floor(Math.log(i)/Math.LN2),u=Math.round(i*Math.pow(2,-c)*8388608)&8388607;r((o<<31|c+127<<23|u)>>>0,a,s)}}e.writeFloatLE=t.bind(null,bT),e.writeFloatBE=t.bind(null,vT);function n(r,i,a){var s=r(i,a),o=(s>>31)*2+1,c=s>>>23&255,u=s&8388607;return c===255?u?NaN:o*(1/0):c===0?o*1401298464324817e-60*u:o*Math.pow(2,c-150)*(u+8388608)}e.readFloatLE=n.bind(null,wT),e.readFloatBE=n.bind(null,ET)}(),typeof Float64Array<"u"?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=n[7]===128;function i(c,u,d){t[0]=c,u[d]=n[0],u[d+1]=n[1],u[d+2]=n[2],u[d+3]=n[3],u[d+4]=n[4],u[d+5]=n[5],u[d+6]=n[6],u[d+7]=n[7]}function a(c,u,d){t[0]=c,u[d]=n[7],u[d+1]=n[6],u[d+2]=n[5],u[d+3]=n[4],u[d+4]=n[3],u[d+5]=n[2],u[d+6]=n[1],u[d+7]=n[0]}e.writeDoubleLE=r?i:a,e.writeDoubleBE=r?a:i;function s(c,u){return n[0]=c[u],n[1]=c[u+1],n[2]=c[u+2],n[3]=c[u+3],n[4]=c[u+4],n[5]=c[u+5],n[6]=c[u+6],n[7]=c[u+7],t[0]}function o(c,u){return n[7]=c[u],n[6]=c[u+1],n[5]=c[u+2],n[4]=c[u+3],n[3]=c[u+4],n[2]=c[u+5],n[1]=c[u+6],n[0]=c[u+7],t[0]}e.readDoubleLE=r?s:o,e.readDoubleBE=r?o:s}():function(){function t(r,i,a,s,o,c){var u=s<0?1:0;if(u&&(s=-s),s===0)r(0,o,c+i),r(1/s>0?0:2147483648,o,c+a);else if(isNaN(s))r(0,o,c+i),r(2146959360,o,c+a);else if(s>17976931348623157e292)r(0,o,c+i),r((u<<31|2146435072)>>>0,o,c+a);else{var d;if(s<22250738585072014e-324)d=s/5e-324,r(d>>>0,o,c+i),r((u<<31|d/4294967296)>>>0,o,c+a);else{var p=Math.floor(Math.log(s)/Math.LN2);p===1024&&(p=1023),d=s*Math.pow(2,-p),r(d*4503599627370496>>>0,o,c+i),r((u<<31|p+1023<<20|d*1048576&1048575)>>>0,o,c+a)}}}e.writeDoubleLE=t.bind(null,bT,0,4),e.writeDoubleBE=t.bind(null,vT,4,0);function n(r,i,a,s,o){var c=r(s,o+i),u=r(s,o+a),d=(u>>31)*2+1,p=u>>>20&2047,h=4294967296*(u&1048575)+c;return p===2047?h?NaN:d*(1/0):p===0?d*5e-324*h:d*Math.pow(2,p-1075)*(h+4503599627370496)}e.readDoubleLE=n.bind(null,wT,0,4),e.readDoubleBE=n.bind(null,ET,4,0)}(),e}function bT(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function vT(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=e&255}function wT(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function ET(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var HA=N((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}});var xT=N(ST=>{"use strict";var WA=ST;WA.length=function(t){for(var n=0,r=0,i=0;i<t.length;++i)r=t.charCodeAt(i),r<128?n+=1:r<2048?n+=2:(r&64512)===55296&&(t.charCodeAt(i+1)&64512)===56320?(++i,n+=4):n+=3;return n};WA.read=function(t,n,r){var i=r-n;if(i<1)return"";for(var a=null,s=[],o=0,c;n<r;)c=t[n++],c<128?s[o++]=c:c>191&&c<224?s[o++]=(c&31)<<6|t[n++]&63:c>239&&c<365?(c=((c&7)<<18|(t[n++]&63)<<12|(t[n++]&63)<<6|t[n++]&63)-65536,s[o++]=55296+(c>>10),s[o++]=56320+(c&1023)):s[o++]=(c&15)<<12|(t[n++]&63)<<6|t[n++]&63,o>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,s)),o=0);return a?(o&&a.push(String.fromCharCode.apply(String,s.slice(0,o))),a.join("")):String.fromCharCode.apply(String,s.slice(0,o))};WA.write=function(t,n,r){for(var i=r,a,s,o=0;o<t.length;++o)a=t.charCodeAt(o),a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=a&63|128):(a&64512)===55296&&((s=t.charCodeAt(o+1))&64512)===56320?(a=65536+((a&1023)<<10)+(s&1023),++o,n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=a&63|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=a&63|128);return r-i}});var NT=N((cse,TT)=>{"use strict";TT.exports=wq;function wq(e,t,n){var r=n||8192,i=r>>>1,a=null,s=r;return function(c){if(c<1||c>i)return e(c);s+c>r&&(a=e(r),s=0);var u=t.call(a,s,s+=c);return s&7&&(s=(s|7)+1),u}}});var kT=N((use,RT)=>{"use strict";RT.exports=Tt;var gl=Xr();function Tt(e,t){this.lo=e>>>0,this.hi=t>>>0}var ds=Tt.zero=new Tt(0,0);ds.toNumber=function(){return 0};ds.zzEncode=ds.zzDecode=function(){return this};ds.length=function(){return 1};var Eq=Tt.zeroHash="\0\0\0\0\0\0\0\0";Tt.fromNumber=function(t){if(t===0)return ds;var n=t<0;n&&(t=-t);var r=t>>>0,i=(t-r)/4294967296>>>0;return n&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new Tt(r,i)};Tt.from=function(t){if(typeof t=="number")return Tt.fromNumber(t);if(gl.isString(t))if(gl.Long)t=gl.Long.fromString(t);else return Tt.fromNumber(parseInt(t,10));return t.low||t.high?new Tt(t.low>>>0,t.high>>>0):ds};Tt.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var n=~this.lo+1>>>0,r=~this.hi>>>0;return n||(r=r+1>>>0),-(n+r*4294967296)}return this.lo+this.hi*4294967296};Tt.prototype.toLong=function(t){return gl.Long?new gl.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var ua=String.prototype.charCodeAt;Tt.fromHash=function(t){return t===Eq?ds:new Tt((ua.call(t,0)|ua.call(t,1)<<8|ua.call(t,2)<<16|ua.call(t,3)<<24)>>>0,(ua.call(t,4)|ua.call(t,5)<<8|ua.call(t,6)<<16|ua.call(t,7)<<24)>>>0)};Tt.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Tt.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};Tt.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};Tt.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?n===0?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}});var Xr=N(ZA=>{"use strict";var ce=ZA;ce.asPromise=GA();ce.base64=gT();ce.EventEmitter=AT();ce.float=IT();ce.inquire=HA();ce.utf8=xT();ce.pool=NT();ce.LongBits=kT();ce.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);ce.global=ce.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||ZA;ce.emptyArray=Object.freeze?Object.freeze([]):[];ce.emptyObject=Object.freeze?Object.freeze({}):{};ce.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};ce.isString=function(t){return typeof t=="string"||t instanceof String};ce.isObject=function(t){return t&&typeof t=="object"};ce.isset=ce.isSet=function(t,n){var r=t[n];return r!=null&&t.hasOwnProperty(n)?typeof r!="object"||(Array.isArray(r)?r.length:Object.keys(r).length)>0:!1};ce.Buffer=function(){try{var e=ce.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}();ce._Buffer_from=null;ce._Buffer_allocUnsafe=null;ce.newBuffer=function(t){return typeof t=="number"?ce.Buffer?ce._Buffer_allocUnsafe(t):new ce.Array(t):ce.Buffer?ce._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};ce.Array=typeof Uint8Array<"u"?Uint8Array:Array;ce.Long=ce.global.dcodeIO&&ce.global.dcodeIO.Long||ce.global.Long||ce.inquire("long");ce.key2Re=/^true|false|0|1$/;ce.key32Re=/^-?(?:0|[1-9][0-9]*)$/;ce.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;ce.longToHash=function(t){return t?ce.LongBits.from(t).toHash():ce.LongBits.zeroHash};ce.longFromHash=function(t,n){var r=ce.LongBits.fromHash(t);return ce.Long?ce.Long.fromBits(r.lo,r.hi,n):r.toNumber(!!n)};function BT(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;++i)(e[r[i]]===void 0||!n)&&(e[r[i]]=t[r[i]]);return e}ce.merge=BT;ce.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function OT(e){function t(n,r){if(!(this instanceof t))return new t(n,r);Object.defineProperty(this,"message",{get:function(){return n}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),r&&BT(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}ce.newError=OT;ce.ProtocolError=OT("ProtocolError");ce.oneOfGetter=function(t){for(var n={},r=0;r<t.length;++r)n[t[r]]=1;return function(){for(var i=Object.keys(this),a=i.length-1;a>-1;--a)if(n[i[a]]===1&&this[i[a]]!==void 0&&this[i[a]]!==null)return i[a]}};ce.oneOfSetter=function(t){return function(n){for(var r=0;r<t.length;++r)t[r]!==n&&delete this[t[r]]}};ce.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};ce._configure=function(){var e=ce.Buffer;if(!e){ce._Buffer_from=ce._Buffer_allocUnsafe=null;return}ce._Buffer_from=e.from!==Uint8Array.from&&e.from||function(n,r){return new e(n,r)},ce._Buffer_allocUnsafe=e.allocUnsafe||function(n){return new e(n)}}});var yf=N((dse,FT)=>{"use strict";FT.exports=De;var zn=Xr(),YA,Af=zn.LongBits,PT=zn.base64,DT=zn.utf8;function _l(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function $A(){}function Cq(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function De(){this.len=0,this.head=new _l($A,0,0),this.tail=this.head,this.states=null}var MT=function(){return zn.Buffer?function(){return(De.create=function(){return new YA})()}:function(){return new De}};De.create=MT();De.alloc=function(t){return new zn.Array(t)};zn.Array!==Array&&(De.alloc=zn.pool(De.alloc,zn.Array.prototype.subarray));De.prototype._push=function(t,n,r){return this.tail=this.tail.next=new _l(t,n,r),this.len+=n,this};function KA(e,t,n){t[n]=e&255}function Iq(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}function jA(e,t){this.len=e,this.next=void 0,this.val=t}jA.prototype=Object.create(_l.prototype);jA.prototype.fn=Iq;De.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new jA((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};De.prototype.int32=function(t){return t<0?this._push(ey,10,Af.fromNumber(t)):this.uint32(t)};De.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function ey(e,t,n){for(;e.hi;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo=e.lo>>>7;t[n++]=e.lo}De.prototype.uint64=function(t){var n=Af.from(t);return this._push(ey,n.length(),n)};De.prototype.int64=De.prototype.uint64;De.prototype.sint64=function(t){var n=Af.from(t).zzEncode();return this._push(ey,n.length(),n)};De.prototype.bool=function(t){return this._push(KA,1,t?1:0)};function XA(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}De.prototype.fixed32=function(t){return this._push(XA,4,t>>>0)};De.prototype.sfixed32=De.prototype.fixed32;De.prototype.fixed64=function(t){var n=Af.from(t);return this._push(XA,4,n.lo)._push(XA,4,n.hi)};De.prototype.sfixed64=De.prototype.fixed64;De.prototype.float=function(t){return this._push(zn.float.writeFloatLE,4,t)};De.prototype.double=function(t){return this._push(zn.float.writeDoubleLE,8,t)};var Sq=zn.Array.prototype.set?function(t,n,r){n.set(t,r)}:function(t,n,r){for(var i=0;i<t.length;++i)n[r+i]=t[i]};De.prototype.bytes=function(t){var n=t.length>>>0;if(!n)return this._push(KA,1,0);if(zn.isString(t)){var r=De.alloc(n=PT.length(t));PT.decode(t,r,0),t=r}return this.uint32(n)._push(Sq,n,t)};De.prototype.string=function(t){var n=DT.length(t);return n?this.uint32(n)._push(DT.write,n,t):this._push(KA,1,0)};De.prototype.fork=function(){return this.states=new Cq(this),this.head=this.tail=new _l($A,0,0),this.len=0,this};De.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new _l($A,0,0),this.len=0),this};De.prototype.ldelim=function(){var t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=n,this.len+=r),this};De.prototype.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n};De._configure=function(e){YA=e,De.create=MT(),YA._configure()}});var QT=N((fse,UT)=>{"use strict";UT.exports=$r;var LT=yf();($r.prototype=Object.create(LT.prototype)).constructor=$r;var la=Xr();function $r(){LT.call(this)}$r._configure=function(){$r.alloc=la._Buffer_allocUnsafe,$r.writeBytesBuffer=la.Buffer&&la.Buffer.prototype instanceof Uint8Array&&la.Buffer.prototype.set.name==="set"?function(t,n,r){n.set(t,r)}:function(t,n,r){if(t.copy)t.copy(n,r,0,t.length);else for(var i=0;i<t.length;)n[r++]=t[i++]}};$r.prototype.bytes=function(t){la.isString(t)&&(t=la._Buffer_from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this._push($r.writeBytesBuffer,n,t),this};function xq(e,t,n){e.length<40?la.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}$r.prototype.string=function(t){var n=la.Buffer.byteLength(t);return this.uint32(n),n&&this._push(xq,n,t),this};$r._configure()});var vf=N((pse,GT)=>{"use strict";GT.exports=lt;var gr=Xr(),ny,JT=gr.LongBits,Tq=gr.utf8;function _r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function lt(e){this.buf=e,this.pos=0,this.len=e.length}var qT=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new lt(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new lt(t);throw Error("illegal buffer")},zT=function(){return gr.Buffer?function(n){return(lt.create=function(i){return gr.Buffer.isBuffer(i)?new ny(i):qT(i)})(n)}:qT};lt.create=zT();lt.prototype._slice=gr.Array.prototype.subarray||gr.Array.prototype.slice;lt.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,_r(this,10);return t}}();lt.prototype.int32=function(){return this.uint32()|0};lt.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function ty(){var e=new JT(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw _r(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw _r(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}lt.prototype.bool=function(){return this.uint32()!==0};function bf(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}lt.prototype.fixed32=function(){if(this.pos+4>this.len)throw _r(this,4);return bf(this.buf,this.pos+=4)};lt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw _r(this,4);return bf(this.buf,this.pos+=4)|0};function VT(){if(this.pos+8>this.len)throw _r(this,8);return new JT(bf(this.buf,this.pos+=4),bf(this.buf,this.pos+=4))}lt.prototype.float=function(){if(this.pos+4>this.len)throw _r(this,4);var t=gr.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};lt.prototype.double=function(){if(this.pos+8>this.len)throw _r(this,4);var t=gr.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};lt.prototype.bytes=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw _r(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(n,r);if(n===r){var i=gr.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,n,r)};lt.prototype.string=function(){var t=this.bytes();return Tq.read(t,0,t.length)};lt.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw _r(this,t);this.pos+=t}else do if(this.pos>=this.len)throw _r(this);while(this.buf[this.pos++]&128);return this};lt.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this};lt._configure=function(e){ny=e,lt.create=zT(),ny._configure();var t=gr.Long?"toLong":"toNumber";gr.merge(lt.prototype,{int64:function(){return ty.call(this)[t](!1)},uint64:function(){return ty.call(this)[t](!0)},sint64:function(){return ty.call(this).zzDecode()[t](!1)},fixed64:function(){return VT.call(this)[t](!0)},sfixed64:function(){return VT.call(this)[t](!1)}})}});var YT=N((hse,ZT)=>{"use strict";ZT.exports=fs;var WT=vf();(fs.prototype=Object.create(WT.prototype)).constructor=fs;var HT=Xr();function fs(e){WT.call(this,e)}fs._configure=function(){HT.Buffer&&(fs.prototype._slice=HT.Buffer.prototype.slice)};fs.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};fs._configure()});var $T=N((mse,XT)=>{"use strict";XT.exports=Al;var ry=Xr();(Al.prototype=Object.create(ry.EventEmitter.prototype)).constructor=Al;function Al(e,t,n){if(typeof e!="function")throw TypeError("rpcImpl must be a function");ry.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!n}Al.prototype.rpcCall=function e(t,n,r,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return ry.asPromise(e,s,t,n,r,i);if(!s.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(c,u){if(c)return s.emit("error",c,t),a(c);if(u===null){s.end(!0);return}if(!(u instanceof r))try{u=r[s.responseDelimited?"decodeDelimited":"decode"](u)}catch(d){return s.emit("error",d,t),a(d)}return s.emit("data",u,t),a(null,u)})}catch(o){s.emit("error",o,t),setTimeout(function(){a(o)},0);return}};Al.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var iy=N(KT=>{"use strict";var Nq=KT;Nq.Service=$T()});var ay=N((_se,jT)=>{"use strict";jT.exports={}});var sy=N(t1=>{"use strict";var _n=t1;_n.build="minimal";_n.Writer=yf();_n.BufferWriter=QT();_n.Reader=vf();_n.BufferReader=YT();_n.util=Xr();_n.rpc=iy();_n.roots=ay();_n.configure=e1;function e1(){_n.util._configure(),_n.Writer._configure(_n.BufferWriter),_n.Reader._configure(_n.BufferReader)}e1()});var Oo=N((yse,n1)=>{"use strict";n1.exports=sy()});var iR=N(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.Metadata=void 0;kf.Metadata=function(t){let n=new Map,r={set(i,a){if(i=$c(i),Array.isArray(a))if(a.length===0)n.delete(i);else{for(let s of a)wy(i,s);n.set(i,i.endsWith("-bin")?a:[a.join(", ")])}else wy(i,a),n.set(i,[a]);return r},append(i,a){i=$c(i),wy(i,a);let s=n.get(i);return s==null&&(s=[],n.set(i,s)),s.push(a),i.endsWith("-bin")||n.set(i,[s.join(", ")]),r},delete(i){i=$c(i),n.delete(i)},get(i){var a;return i=$c(i),(a=n.get(i))===null||a===void 0?void 0:a[0]},getAll(i){var a;return i=$c(i),(a=n.get(i))!==null&&a!==void 0?a:[]},has(i){return i=$c(i),n.has(i)},[Symbol.iterator](){return n[Symbol.iterator]()}};if(t!=null){let i=cV(t)?t:Object.entries(t);for(let[a,s]of i)r.set(a,s)}return r};function $c(e){return e.toLowerCase()}function wy(e,t){if(!/^[0-9a-z_.-]+$/.test(e))throw new Error(`Metadata key '${e}' contains illegal characters`);if(e.endsWith("-bin")){if(!(t instanceof Uint8Array))throw new Error(`Metadata key '${e}' ends with '-bin', thus it must have binary value`)}else{if(typeof t!="string")throw new Error(`Metadata key '${e}' doesn't end with '-bin', thus it must have string value`);if(!/^[ -~]*$/.test(t))throw new Error(`Metadata value '${t}' of key '${e}' contains illegal characters`)}}function cV(e){return Symbol.iterator in e}});var Bf=N(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.Status=void 0;var uV;(function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(uV=vl.Status||(vl.Status={}))});var sR=N(aR=>{"use strict";Object.defineProperty(aR,"__esModule",{value:!0})});var cR=N(oR=>{"use strict";Object.defineProperty(oR,"__esModule",{value:!0})});var lR=N(uR=>{"use strict";Object.defineProperty(uR,"__esModule",{value:!0})});var dR=N(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.composeClientMiddleware=void 0;function lV(e,t){return(n,r)=>t(Object.assign(Object.assign({},n),{next:(i,a)=>e(Object.assign(Object.assign({},n),{request:i}),a)}),r)}Of.composeClientMiddleware=lV});var Ey={};gd(Ey,{ExtendableError:()=>Pf,default:()=>dV});var Pf,dV,Cy=jt(()=>{Pf=class extends Error{constructor(...t){super(...t);var n=t.length>0&&typeof t[0]=="string"?t[0]:"";(this.name===void 0||this.name==="Error")&&Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:this.constructor.name,writable:!0}),Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,value:n,writable:!0}),Object.defineProperty(this,"stack",{configurable:!0,enumerable:!1,value:"",writable:!0}),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack===""&&(this.stack=new Error(n).stack)}},dV=Pf});var fR=N(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.ClientError=void 0;var fV=(Cy(),ar(Ey)),pV=Bf(),Kc=class extends fV.ExtendableError{constructor(t,n,r){super(`${t} ${pV.Status[n]}: ${r}`),this.path=t,this.code=n,this.details=r,this.name="ClientError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ClientError",{value:!0})}static[Symbol.hasInstance](t){return this!==Kc?this.prototype.isPrototypeOf(t):typeof t=="object"&&t!==null&&(t.constructor===Kc||t["@@nice-grpc:ClientError"]===!0||t.name==="ClientError"&&t["@@nice-grpc"]===!0)}};Df.ClientError=Kc});var hR=N(pR=>{"use strict";Object.defineProperty(pR,"__esModule",{value:!0})});var gR=N(mR=>{"use strict";Object.defineProperty(mR,"__esModule",{value:!0})});var _R=N(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.composeServerMiddleware=void 0;function hV(e,t){return(n,r)=>e(Object.assign(Object.assign({},n),{next:(i,a)=>t(Object.assign(Object.assign({},n),{request:i}),a)}),r)}Mf.composeServerMiddleware=hV});var AR=N(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.ServerError=void 0;var mV=(Cy(),ar(Ey)),gV=Bf(),jc=class extends mV.ExtendableError{constructor(t,n){super(`${gV.Status[t]}: ${n}`),this.code=t,this.details=n,this.name="ServerError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ServerError",{value:!0})}static[Symbol.hasInstance](t){return this!==jc?this.prototype.isPrototypeOf(t):typeof t=="object"&&t!==null&&(t.constructor===jc||t["@@nice-grpc:ServerError"]===!0||t.name==="ServerError"&&t["@@nice-grpc"]===!0)}};Ff.ServerError=jc});var Gn=N(Qt=>{"use strict";var _V=Qt&&Qt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Rr=Qt&&Qt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_V(t,e,n)};Object.defineProperty(Qt,"__esModule",{value:!0});Rr(iR(),Qt);Rr(Bf(),Qt);Rr(sR(),Qt);Rr(cR(),Qt);Rr(lR(),Qt);Rr(dR(),Qt);Rr(fR(),Qt);Rr(hR(),Qt);Rr(gR(),Qt);Rr(_R(),Qt);Rr(AR(),Qt)});var Me=N(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=Hn.DEFAULT_MAX_SEND_MESSAGE_LENGTH=Hn.Propagate=Hn.LogVerbosity=Hn.Status=void 0;var yR;(function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(yR||(Hn.Status=yR={}));var bR;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR",e[e.NONE=3]="NONE"})(bR||(Hn.LogVerbosity=bR={}));var vR;(function(e){e[e.DEADLINE=1]="DEADLINE",e[e.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",e[e.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",e[e.CANCELLATION=8]="CANCELLATION",e[e.DEFAULTS=65535]="DEFAULTS"})(vR||(Hn.Propagate=vR={}));Hn.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;Hn.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4*1024*1024});var Iy=N((Ooe,AV)=>{AV.exports={name:"@grpc/grpc-js",version:"1.10.10",description:"gRPC Library for Node - pure JS implementation",homepage:"https://grpc.io/",repository:"https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",main:"build/src/index.js",engines:{node:">=12.10.0"},keywords:[],author:{name:"Google Inc."},types:"build/src/index.d.ts",license:"Apache-2.0",devDependencies:{"@types/gulp":"^4.0.17","@types/gulp-mocha":"0.0.37","@types/lodash":"^4.14.202","@types/mocha":"^10.0.6","@types/ncp":"^2.0.8","@types/node":">=20.11.20","@types/pify":"^5.0.4","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/typescript-estree":"^7.1.0","clang-format":"^1.8.0",eslint:"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1",execa:"^2.0.3",gulp:"^4.0.2","gulp-mocha":"^6.0.0",lodash:"^4.17.21",madge:"^5.0.1","mocha-jenkins-reporter":"^0.4.1",ncp:"^2.0.0",pify:"^4.0.1",prettier:"^2.8.8",rimraf:"^3.0.2",semver:"^7.6.0","ts-node":"^10.9.2",typescript:"^5.3.3"},contributors:[{name:"Google Inc."}],scripts:{build:"npm run compile",clean:"rimraf ./build",compile:"tsc -p .",format:'clang-format -i -style="{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}" src/*.ts test/*.ts',lint:"eslint src/*.ts test/*.ts",prepare:"npm run generate-types && npm run compile",test:"gulp test",check:"npm run lint",fix:"eslint --fix src/*.ts test/*.ts",pretest:"npm run generate-types && npm run generate-test-types && npm run compile",posttest:"npm run check && madge -c ./build/src","generate-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs test/fixtures/ -O src/generated/ --grpcLib ../index channelz.proto","generate-test-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto"},dependencies:{"@grpc/proto-loader":"^0.7.13","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/*.proto","LICENSE","deps/envoy-api/envoy/api/v2/**/*.proto","deps/envoy-api/envoy/config/**/*.proto","deps/envoy-api/envoy/service/**/*.proto","deps/envoy-api/envoy/type/**/*.proto","deps/udpa/udpa/**/*.proto","deps/googleapis/google/api/*.proto","deps/googleapis/google/rpc/*.proto","deps/protoc-gen-validate/validate/**/*.proto"]}});var ot=N(rn=>{"use strict";var Sy,xy,Ty,Ny;Object.defineProperty(rn,"__esModule",{value:!0});rn.isTracerEnabled=rn.trace=rn.log=rn.setLoggerVerbosity=rn.setLogger=rn.getLogger=void 0;var Aa=Me(),yV=ye("process"),bV=Iy().version,vV={error:(e,...t)=>{console.error("E "+e,...t)},info:(e,...t)=>{console.error("I "+e,...t)},debug:(e,...t)=>{console.error("D "+e,...t)}},As=vV,eu=Aa.LogVerbosity.ERROR,wV=(xy=(Sy=process.env.GRPC_NODE_VERBOSITY)!==null&&Sy!==void 0?Sy:process.env.GRPC_VERBOSITY)!==null&&xy!==void 0?xy:"";switch(wV.toUpperCase()){case"DEBUG":eu=Aa.LogVerbosity.DEBUG;break;case"INFO":eu=Aa.LogVerbosity.INFO;break;case"ERROR":eu=Aa.LogVerbosity.ERROR;break;case"NONE":eu=Aa.LogVerbosity.NONE;break;default:}var EV=()=>As;rn.getLogger=EV;var CV=e=>{As=e};rn.setLogger=CV;var IV=e=>{eu=e};rn.setLoggerVerbosity=IV;var SV=(e,...t)=>{let n;if(e>=eu){switch(e){case Aa.LogVerbosity.DEBUG:n=As.debug;break;case Aa.LogVerbosity.INFO:n=As.info;break;case Aa.LogVerbosity.ERROR:n=As.error;break}n||(n=As.error),n&&n.bind(As)(...t)}};rn.log=SV;var xV=(Ny=(Ty=process.env.GRPC_NODE_TRACE)!==null&&Ty!==void 0?Ty:process.env.GRPC_TRACE)!==null&&Ny!==void 0?Ny:"",Ry=new Set,wR=new Set;for(let e of xV.split(","))e.startsWith("-")?wR.add(e.substring(1)):Ry.add(e);var TV=Ry.has("all");function NV(e,t,n){ER(t)&&(0,rn.log)(e,new Date().toISOString()+" | v"+bV+" "+yV.pid+" | "+t+" | "+n)}rn.trace=NV;function ER(e){return!wR.has(e)&&(TV||Ry.has(e))}rn.isTracerEnabled=ER});var Lf=N(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.getErrorCode=tu.getErrorMessage=void 0;function RV(e){return e instanceof Error?e.message:String(e)}tu.getErrorMessage=RV;function kV(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="number"?e.code:null}tu.getErrorCode=kV});var an=N(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.Metadata=void 0;var BV=ot(),OV=Me(),PV=Lf(),DV=/^[0-9a-z_.-]+$/,MV=/^[ -~]*$/;function FV(e){return DV.test(e)}function LV(e){return MV.test(e)}function IR(e){return e.endsWith("-bin")}function UV(e){return!e.startsWith("grpc-")}function Uf(e){return e.toLowerCase()}function CR(e,t){if(!FV(e))throw new Error('Metadata key "'+e+'" contains illegal characters');if(t!=null)if(IR(e)){if(!Buffer.isBuffer(t))throw new Error("keys that end with '-bin' must have Buffer values")}else{if(Buffer.isBuffer(t))throw new Error("keys that don't end with '-bin' must have String values");if(!LV(t))throw new Error('Metadata string value "'+t+'" contains illegal characters')}}var nu=class{constructor(t={}){this.internalRepr=new Map,this.options=t}set(t,n){t=Uf(t),CR(t,n),this.internalRepr.set(t,[n])}add(t,n){t=Uf(t),CR(t,n);let r=this.internalRepr.get(t);r===void 0?this.internalRepr.set(t,[n]):r.push(n)}remove(t){t=Uf(t),this.internalRepr.delete(t)}get(t){return t=Uf(t),this.internalRepr.get(t)||[]}getMap(){let t={};for(let[n,r]of this.internalRepr)if(r.length>0){let i=r[0];t[n]=Buffer.isBuffer(i)?Buffer.from(i):i}return t}clone(){let t=new nu(this.options),n=t.internalRepr;for(let[r,i]of this.internalRepr){let a=i.map(s=>Buffer.isBuffer(s)?Buffer.from(s):s);n.set(r,a)}return t}merge(t){for(let[n,r]of t.internalRepr){let i=(this.internalRepr.get(n)||[]).concat(r);this.internalRepr.set(n,i)}}setOptions(t){this.options=t}getOptions(){return this.options}toHttp2Headers(){let t={};for(let[n,r]of this.internalRepr)t[n]=r.map(QV);return t}toJSON(){let t={};for(let[n,r]of this.internalRepr)t[n]=r;return t}static fromHttp2Headers(t){let n=new nu;for(let r of Object.keys(t)){if(r.charAt(0)===":")continue;let i=t[r];try{IR(r)?Array.isArray(i)?i.forEach(a=>{n.add(r,Buffer.from(a,"base64"))}):i!==void 0&&(UV(r)?i.split(",").forEach(a=>{n.add(r,Buffer.from(a.trim(),"base64"))}):n.add(r,Buffer.from(i,"base64"))):Array.isArray(i)?i.forEach(a=>{n.add(r,a)}):i!==void 0&&n.add(r,i)}catch(a){let s=`Failed to add metadata entry ${r}: ${i}. ${(0,PV.getErrorMessage)(a)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,BV.log)(OV.LogVerbosity.ERROR,s)}}return n}};Qf.Metadata=nu;var QV=e=>Buffer.isBuffer(e)?e.toString("base64"):e});var By=N(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.CallCredentials=void 0;var ky=an();function qV(e){return"getRequestHeaders"in e&&typeof e.getRequestHeaders=="function"}var ya=class{static createFromMetadataGenerator(t){return new wl(t)}static createFromGoogleCredential(t){return ya.createFromMetadataGenerator((n,r)=>{let i;qV(t)?i=t.getRequestHeaders(n.service_url):i=new Promise((a,s)=>{t.getRequestMetadata(n.service_url,(o,c)=>{if(o){s(o);return}if(!c){s(new Error("Headers not set by metadata plugin"));return}a(c)})}),i.then(a=>{let s=new ky.Metadata;for(let o of Object.keys(a))s.add(o,a[o]);r(null,s)},a=>{r(a)})})}static createEmpty(){return new El}};qf.CallCredentials=ya;var ru=class extends ya{constructor(t){super(),this.creds=t}async generateMetadata(t){let n=new ky.Metadata,r=await Promise.all(this.creds.map(i=>i.generateMetadata(t)));for(let i of r)n.merge(i);return n}compose(t){return new ru(this.creds.concat([t]))}_equals(t){return this===t?!0:t instanceof ru?this.creds.every((n,r)=>n._equals(t.creds[r])):!1}},wl=class extends ya{constructor(t){super(),this.metadataGenerator=t}generateMetadata(t){return new Promise((n,r)=>{this.metadataGenerator(t,(i,a)=>{a!==void 0?n(a):r(i)})})}compose(t){return new ru([this,t])}_equals(t){return this===t?!0:t instanceof wl?this.metadataGenerator===t.metadataGenerator:!1}},El=class extends ya{generateMetadata(t){return Promise.resolve(new ky.Metadata)}compose(t){return t}_equals(t){return t instanceof El}}});var Py=N(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.getDefaultRootsData=iu.CIPHER_SUITES=void 0;var VV=ye("fs");iu.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var SR=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,Oy=null;function JV(){return SR?(Oy===null&&(Oy=VV.readFileSync(SR)),Oy):null}iu.getDefaultRootsData=JV});var Jf=N(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.ChannelCredentials=void 0;var zV=ye("tls"),GV=By(),xR=Py();function Dy(e,t){if(e&&!(e instanceof Buffer))throw new TypeError(`${t}, if provided, must be a Buffer.`)}var au=class{constructor(t){this.callCredentials=t||GV.CallCredentials.createEmpty()}_getCallCredentials(){return this.callCredentials}static createSsl(t,n,r,i){var a;if(Dy(t,"Root certificate"),Dy(n,"Private key"),Dy(r,"Certificate chain"),n&&!r)throw new Error("Private key must be given with accompanying certificate chain");if(!n&&r)throw new Error("Certificate chain must be given with accompanying private key");let s=(0,zV.createSecureContext)({ca:(a=t??(0,xR.getDefaultRootsData)())!==null&&a!==void 0?a:void 0,key:n??void 0,cert:r??void 0,ciphers:xR.CIPHER_SUITES});return new su(s,i??{})}static createFromSecureContext(t,n){return new su(t,n??{})}static createInsecure(){return new Cl}};Vf.ChannelCredentials=au;var Cl=class extends au{constructor(){super()}compose(t){throw new Error("Cannot compose insecure credentials")}_getConnectionOptions(){return null}_isSecure(){return!1}_equals(t){return t instanceof Cl}},su=class extends au{constructor(t,n){super(),this.secureContext=t,this.verifyOptions=n,this.connectionOptions={secureContext:t},n?.checkServerIdentity&&(this.connectionOptions.checkServerIdentity=n.checkServerIdentity)}compose(t){let n=this.callCredentials.compose(t);return new ou(this,n)}_getConnectionOptions(){return Object.assign({},this.connectionOptions)}_isSecure(){return!0}_equals(t){return this===t?!0:t instanceof su?this.secureContext===t.secureContext&&this.verifyOptions.checkServerIdentity===t.verifyOptions.checkServerIdentity:!1}},ou=class extends au{constructor(t,n){super(n),this.channelCredentials=t}compose(t){let n=this.callCredentials.compose(t);return new ou(this.channelCredentials,n)}_getConnectionOptions(){return this.channelCredentials._getConnectionOptions()}_isSecure(){return!0}_equals(t){return this===t?!0:t instanceof ou?this.channelCredentials._equals(t.channelCredentials)&&this.callCredentials._equals(t.callCredentials):!1}}});var ys=N(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.selectLbConfigFromList=Pt.getDefaultConfig=Pt.parseLoadBalancingConfig=Pt.isLoadBalancerNameRegistered=Pt.createLoadBalancer=Pt.registerDefaultLoadBalancerType=Pt.registerLoadBalancerType=Pt.createChildChannelControlHelper=void 0;var HV=ot(),WV=Me();function ZV(e,t){var n,r,i,a,s,o,c,u,d,p;return{createSubchannel:(r=(n=t.createSubchannel)===null||n===void 0?void 0:n.bind(t))!==null&&r!==void 0?r:e.createSubchannel.bind(e),updateState:(a=(i=t.updateState)===null||i===void 0?void 0:i.bind(t))!==null&&a!==void 0?a:e.updateState.bind(e),requestReresolution:(o=(s=t.requestReresolution)===null||s===void 0?void 0:s.bind(t))!==null&&o!==void 0?o:e.requestReresolution.bind(e),addChannelzChild:(u=(c=t.addChannelzChild)===null||c===void 0?void 0:c.bind(t))!==null&&u!==void 0?u:e.addChannelzChild.bind(e),removeChannelzChild:(p=(d=t.removeChannelzChild)===null||d===void 0?void 0:d.bind(t))!==null&&p!==void 0?p:e.removeChannelzChild.bind(e)}}Pt.createChildChannelControlHelper=ZV;var ba={},Il=null;function YV(e,t,n){ba[e]={LoadBalancer:t,LoadBalancingConfig:n}}Pt.registerLoadBalancerType=YV;function XV(e){Il=e}Pt.registerDefaultLoadBalancerType=XV;function $V(e,t,n){let r=e.getLoadBalancerName();return r in ba?new ba[r].LoadBalancer(t,n):null}Pt.createLoadBalancer=$V;function KV(e){return e in ba}Pt.isLoadBalancerNameRegistered=KV;function TR(e){let t=Object.keys(e);if(t.length!==1)throw new Error("Provided load balancing config has multiple conflicting entries");let n=t[0];if(n in ba)try{return ba[n].LoadBalancingConfig.createFromJson(e[n])}catch(r){throw new Error(`${n}: ${r.message}`)}else throw new Error(`Unrecognized load balancing config name ${n}`)}Pt.parseLoadBalancingConfig=TR;function jV(){if(!Il)throw new Error("No default load balancer type registered");return new ba[Il].LoadBalancingConfig}Pt.getDefaultConfig=jV;function eJ(e,t=!1){for(let n of e)try{return TR(n)}catch(r){(0,HV.log)(WV.LogVerbosity.DEBUG,"Config parsing failed with error",r.message);continue}return t&&Il?new ba[Il].LoadBalancingConfig:null}Pt.selectLbConfigFromList=eJ});var My=N(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.extractAndSelectServiceConfig=va.validateServiceConfig=va.validateRetryThrottling=void 0;var tJ=ye("os"),zf=Me(),Gf=/^\d+(\.\d{1,9})?s$/,nJ="node";function rJ(e){if("service"in e&&e.service!==""){if(typeof e.service!="string")throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof e.service}`);if("method"in e&&e.method!==""){if(typeof e.method!="string")throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof e.service}`);return{service:e.service,method:e.method}}else return{service:e.service}}else{if("method"in e&&e.method!==void 0)throw new Error("Invalid method config name: method set with empty or unset service");return{}}}function iJ(e){if(!("maxAttempts"in e)||!Number.isInteger(e.maxAttempts)||e.maxAttempts<2)throw new Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in e)||typeof e.initialBackoff!="string"||!Gf.test(e.initialBackoff))throw new Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer followed by s");if(!("maxBackoff"in e)||typeof e.maxBackoff!="string"||!Gf.test(e.maxBackoff))throw new Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer followed by s");if(!("backoffMultiplier"in e)||typeof e.backoffMultiplier!="number"||e.backoffMultiplier<=0)throw new Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!("retryableStatusCodes"in e&&Array.isArray(e.retryableStatusCodes)))throw new Error("Invalid method config retry policy: retryableStatusCodes is required");if(e.retryableStatusCodes.length===0)throw new Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let t of e.retryableStatusCodes)if(typeof t=="number"){if(!Object.values(zf.Status).includes(t))throw new Error("Invalid method config retry policy: retryableStatusCodes value not in status code range")}else if(typeof t=="string"){if(!Object.values(zf.Status).includes(t.toUpperCase()))throw new Error("Invalid method config retry policy: retryableStatusCodes value not a status code name")}else throw new Error("Invalid method config retry policy: retryableStatusCodes value must be a string or number");return{maxAttempts:e.maxAttempts,initialBackoff:e.initialBackoff,maxBackoff:e.maxBackoff,backoffMultiplier:e.backoffMultiplier,retryableStatusCodes:e.retryableStatusCodes}}function aJ(e){if(!("maxAttempts"in e)||!Number.isInteger(e.maxAttempts)||e.maxAttempts<2)throw new Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in e&&(typeof e.hedgingDelay!="string"||!Gf.test(e.hedgingDelay)))throw new Error("Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s");if("nonFatalStatusCodes"in e&&Array.isArray(e.nonFatalStatusCodes))for(let n of e.nonFatalStatusCodes)if(typeof n=="number"){if(!Object.values(zf.Status).includes(n))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof n=="string"){if(!Object.values(zf.Status).includes(n.toUpperCase()))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value must be a string or number");let t={maxAttempts:e.maxAttempts};return e.hedgingDelay&&(t.hedgingDelay=e.hedgingDelay),e.nonFatalStatusCodes&&(t.nonFatalStatusCodes=e.nonFatalStatusCodes),t}function sJ(e){var t;let n={name:[]};if(!("name"in e)||!Array.isArray(e.name))throw new Error("Invalid method config: invalid name array");for(let r of e.name)n.name.push(rJ(r));if("waitForReady"in e){if(typeof e.waitForReady!="boolean")throw new Error("Invalid method config: invalid waitForReady");n.waitForReady=e.waitForReady}if("timeout"in e)if(typeof e.timeout=="object"){if(!("seconds"in e.timeout)||typeof e.timeout.seconds!="number")throw new Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in e.timeout)||typeof e.timeout.nanos!="number")throw new Error("Invalid method config: invalid timeout.nanos");n.timeout=e.timeout}else if(typeof e.timeout=="string"&&Gf.test(e.timeout)){let r=e.timeout.substring(0,e.timeout.length-1).split(".");n.timeout={seconds:r[0]|0,nanos:((t=r[1])!==null&&t!==void 0?t:0)|0}}else throw new Error("Invalid method config: invalid timeout");if("maxRequestBytes"in e){if(typeof e.maxRequestBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");n.maxRequestBytes=e.maxRequestBytes}if("maxResponseBytes"in e){if(typeof e.maxResponseBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");n.maxResponseBytes=e.maxResponseBytes}if("retryPolicy"in e){if("hedgingPolicy"in e)throw new Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");n.retryPolicy=iJ(e.retryPolicy)}else"hedgingPolicy"in e&&(n.hedgingPolicy=aJ(e.hedgingPolicy));return n}function NR(e){if(!("maxTokens"in e)||typeof e.maxTokens!="number"||e.maxTokens<=0||e.maxTokens>1e3)throw new Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in e)||typeof e.tokenRatio!="number"||e.tokenRatio<=0)throw new Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+e.maxTokens.toFixed(3),tokenRatio:+e.tokenRatio.toFixed(3)}}va.validateRetryThrottling=NR;function oJ(e){if(!(typeof e=="object"&&e!==null))throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof e}`);let t=Object.keys(e);if(t.length>1)throw new Error(`Invalid loadBalancingConfig: unexpected multiple keys ${t}`);if(t.length===0)throw new Error("Invalid loadBalancingConfig: load balancing policy name required");return{[t[0]]:e[t[0]]}}function RR(e){let t={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in e)if(typeof e.loadBalancingPolicy=="string")t.loadBalancingPolicy=e.loadBalancingPolicy;else throw new Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in e)if(Array.isArray(e.loadBalancingConfig))for(let r of e.loadBalancingConfig)t.loadBalancingConfig.push(oJ(r));else throw new Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in e&&Array.isArray(e.methodConfig))for(let r of e.methodConfig)t.methodConfig.push(sJ(r));"retryThrottling"in e&&(t.retryThrottling=NR(e.retryThrottling));let n=[];for(let r of t.methodConfig)for(let i of r.name){for(let a of n)if(i.service===a.service&&i.method===a.method)throw new Error(`Invalid service config: duplicate name ${i.service}/${i.method}`);n.push(i)}return t}va.validateServiceConfig=RR;function cJ(e){if(!("serviceConfig"in e))throw new Error("Invalid service config choice: missing service config");let t={serviceConfig:RR(e.serviceConfig)};if("clientLanguage"in e)if(Array.isArray(e.clientLanguage)){t.clientLanguage=[];for(let r of e.clientLanguage)if(typeof r=="string")t.clientLanguage.push(r);else throw new Error("Invalid service config choice: invalid clientLanguage")}else throw new Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in e)if(Array.isArray(e.clientHostname)){t.clientHostname=[];for(let r of e.clientHostname)if(typeof r=="string")t.clientHostname.push(r);else throw new Error("Invalid service config choice: invalid clientHostname")}else throw new Error("Invalid service config choice: invalid clientHostname");if("percentage"in e)if(typeof e.percentage=="number"&&0<=e.percentage&&e.percentage<=100)t.percentage=e.percentage;else throw new Error("Invalid service config choice: invalid percentage");let n=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let r in e)if(!n.includes(r))throw new Error(`Invalid service config choice: unexpected field ${r}`);return t}function uJ(e,t){if(!Array.isArray(e))throw new Error("Invalid service config list");for(let n of e){let r=cJ(n);if(!(typeof r.percentage=="number"&&t>r.percentage)){if(Array.isArray(r.clientHostname)){let i=!1;for(let a of r.clientHostname)a===tJ.hostname()&&(i=!0);if(!i)continue}if(Array.isArray(r.clientLanguage)){let i=!1;for(let a of r.clientLanguage)a===nJ&&(i=!0);if(!i)continue}return r.serviceConfig}}throw new Error("No matching service config found")}function lJ(e,t){for(let n of e)if(n.length>0&&n[0].startsWith("grpc_config=")){let r=n.join("").substring(12),i=JSON.parse(r);return uJ(i,t)}return null}va.extractAndSelectServiceConfig=lJ});var Wn=N(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.ConnectivityState=void 0;var kR;(function(e){e[e.IDLE=0]="IDLE",e[e.CONNECTING=1]="CONNECTING",e[e.READY=2]="READY",e[e.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",e[e.SHUTDOWN=4]="SHUTDOWN"})(kR||(Hf.ConnectivityState=kR={}))});var Bn=N(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.uriToString=ni.combineHostPort=ni.splitHostPort=ni.parseUri=void 0;var dJ=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function fJ(e){let t=dJ.exec(e);return t===null?null:{scheme:t[1],authority:t[2],path:t[3]}}ni.parseUri=fJ;var BR=/^\d+$/;function pJ(e){if(e.startsWith("[")){let t=e.indexOf("]");if(t===-1)return null;let n=e.substring(1,t);if(n.indexOf(":")===-1)return null;if(e.length>t+1)if(e[t+1]===":"){let r=e.substring(t+2);return BR.test(r)?{host:n,port:+r}:null}else return null;else return{host:n}}else{let t=e.split(":");return t.length===2?BR.test(t[1])?{host:t[0],port:+t[1]}:null:{host:e}}}ni.splitHostPort=pJ;function hJ(e){return e.port===void 0?e.host:e.host.includes(":")?`[${e.host}]:${e.port}`:`${e.host}:${e.port}`}ni.combineHostPort=hJ;function mJ(e){let t="";return e.scheme!==void 0&&(t+=e.scheme+":"),e.authority!==void 0&&(t+="//"+e.authority+"/"),t+=e.path,t}ni.uriToString=mJ});var ri=N(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.mapUriDefaultScheme=Zn.getDefaultAuthority=Zn.createResolver=Zn.registerDefaultScheme=Zn.registerResolver=void 0;var Ly=Bn(),cu={},Fy=null;function gJ(e,t){cu[e]=t}Zn.registerResolver=gJ;function _J(e){Fy=e}Zn.registerDefaultScheme=_J;function AJ(e,t,n){if(e.scheme!==void 0&&e.scheme in cu)return new cu[e.scheme](e,t,n);throw new Error(`No resolver could be created for target ${(0,Ly.uriToString)(e)}`)}Zn.createResolver=AJ;function yJ(e){if(e.scheme!==void 0&&e.scheme in cu)return cu[e.scheme].getDefaultAuthority(e);throw new Error(`Invalid target ${(0,Ly.uriToString)(e)}`)}Zn.getDefaultAuthority=yJ;function bJ(e){return e.scheme===void 0||!(e.scheme in cu)?Fy!==null?{scheme:Fy,authority:void 0,path:(0,Ly.uriToString)(e)}:null:e}Zn.mapUriDefaultScheme=bJ});var Ea=N(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.QueuePicker=wa.UnavailablePicker=wa.PickResultType=void 0;var vJ=an(),wJ=Me(),Wf;(function(e){e[e.COMPLETE=0]="COMPLETE",e[e.QUEUE=1]="QUEUE",e[e.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",e[e.DROP=3]="DROP"})(Wf||(wa.PickResultType=Wf={}));var Uy=class{constructor(t){this.status=Object.assign({code:wJ.Status.UNAVAILABLE,details:"No connection established",metadata:new vJ.Metadata},t)}pick(t){return{pickResultType:Wf.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}};wa.UnavailablePicker=Uy;var Qy=class{constructor(t,n){this.loadBalancer=t,this.childPicker=n,this.calledExitIdle=!1}pick(t){return this.calledExitIdle||(process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0),this.childPicker?this.childPicker.pick(t):{pickResultType:Wf.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}};wa.QueuePicker=Qy});var Sl=N(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.BackoffTimeout=void 0;var EJ=1e3,CJ=1.6,IJ=12e4,SJ=.2;function xJ(e,t){return Math.random()*(t-e)+e}var qy=class{constructor(t,n){this.callback=t,this.initialDelay=EJ,this.multiplier=CJ,this.maxDelay=IJ,this.jitter=SJ,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,n&&(n.initialDelay&&(this.initialDelay=n.initialDelay),n.multiplier&&(this.multiplier=n.multiplier),n.jitter&&(this.jitter=n.jitter),n.maxDelay&&(this.maxDelay=n.maxDelay)),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}runTimer(t){var n,r;this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.callback(),this.running=!1},t),this.hasRef||(r=(n=this.timerId).unref)===null||r===void 0||r.call(n)}runOnce(){this.running=!0,this.startTime=new Date,this.runTimer(this.nextDelay);let t=Math.min(this.nextDelay*this.multiplier,this.maxDelay),n=t*this.jitter;this.nextDelay=t+xJ(-n,n)}stop(){clearTimeout(this.timerId),this.running=!1}reset(){if(this.nextDelay=this.initialDelay,this.running){let t=new Date,n=this.startTime;n.setMilliseconds(n.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),t<n?this.runTimer(n.getTime()-t.getTime()):this.running=!1}}isRunning(){return this.running}ref(){var t,n;this.hasRef=!0,(n=(t=this.timerId).ref)===null||n===void 0||n.call(t)}unref(){var t,n;this.hasRef=!1,(n=(t=this.timerId).unref)===null||n===void 0||n.call(t)}getEndTime(){return this.endTime}};Zf.BackoffTimeout=qy});var Xf=N(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.ChildLoadBalancerHandler=void 0;var TJ=ys(),NJ=Wn(),RJ="child_load_balancer_helper",Vy=class{constructor(t,n){this.channelControlHelper=t,this.options=n,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(r){this.parent=r,this.child=null}createSubchannel(r,i){return this.parent.channelControlHelper.createSubchannel(r,i)}updateState(r,i){var a;if(this.calledByPendingChild()){if(r===NJ.ConnectivityState.CONNECTING)return;(a=this.parent.currentChild)===null||a===void 0||a.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(r,i)}requestReresolution(){var r;let i=(r=this.parent.pendingChild)!==null&&r!==void 0?r:this.parent.currentChild;this.child===i&&this.parent.channelControlHelper.requestReresolution()}setChild(r){this.child=r}addChannelzChild(r){this.parent.channelControlHelper.addChannelzChild(r)}removeChannelzChild(r){this.parent.channelControlHelper.removeChannelzChild(r)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(t,n){return t.getLoadBalancerName()!==n.getLoadBalancerName()}updateAddressList(t,n,r){let i;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,n)){let a=new this.ChildPolicyHelper(this),s=(0,TJ.createLoadBalancer)(n,a,this.options);a.setChild(s),this.currentChild===null?(this.currentChild=s,i=this.currentChild):(this.pendingChild&&this.pendingChild.destroy(),this.pendingChild=s,i=this.pendingChild)}else this.pendingChild===null?i=this.currentChild:i=this.pendingChild;this.latestConfig=n,i.updateAddressList(t,n,r)}exitIdle(){this.currentChild&&(this.currentChild.exitIdle(),this.pendingChild&&this.pendingChild.exitIdle())}resetBackoff(){this.currentChild&&(this.currentChild.resetBackoff(),this.pendingChild&&this.pendingChild.resetBackoff())}destroy(){this.currentChild&&(this.currentChild.destroy(),this.currentChild=null),this.pendingChild&&(this.pendingChild.destroy(),this.pendingChild=null)}getTypeName(){return RJ}};Yf.ChildLoadBalancerHandler=Vy});var PR=N($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.ResolvingLoadBalancer=void 0;var kJ=ys(),BJ=My(),bn=Wn(),OJ=ri(),xl=Ea(),PJ=Sl(),Jy=Me(),DJ=an(),MJ=ot(),FJ=Me(),LJ=Bn(),UJ=Xf(),QJ="resolving_load_balancer";function OR(e){MJ.trace(FJ.LogVerbosity.DEBUG,QJ,e)}var qJ=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function VJ(e,t,n,r){for(let i of n.name)switch(r){case"EMPTY":if(!i.service&&!i.method)return!0;break;case"SERVICE":if(i.service===e&&!i.method)return!0;break;case"SERVICE_AND_METHOD":if(i.service===e&&i.method===t)return!0}return!1}function JJ(e,t,n,r){for(let i of n)if(VJ(e,t,i,r))return i;return null}function zJ(e){return function(n,r){var i,a;let s=n.split("/").filter(u=>u.length>0),o=(i=s[0])!==null&&i!==void 0?i:"",c=(a=s[1])!==null&&a!==void 0?a:"";if(e&&e.methodConfig)for(let u of qJ){let d=JJ(o,c,e.methodConfig,u);if(d)return{methodConfig:d,pickInformation:{},status:Jy.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:Jy.Status.OK,dynamicFilterFactories:[]}}}var zy=class{constructor(t,n,r,i,a){this.target=t,this.channelControlHelper=n,this.onSuccessfulResolution=i,this.onFailedResolution=a,this.latestChildState=bn.ConnectivityState.IDLE,this.latestChildPicker=new xl.QueuePicker(this),this.currentState=bn.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,r["grpc.service_config"]?this.defaultServiceConfig=(0,BJ.validateServiceConfig)(JSON.parse(r["grpc.service_config"])):this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]},this.updateState(bn.ConnectivityState.IDLE,new xl.QueuePicker(this)),this.childLoadBalancer=new UJ.ChildLoadBalancerHandler({createSubchannel:n.createSubchannel.bind(n),requestReresolution:()=>{this.backoffTimeout.isRunning()?(OR("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0):this.updateResolution()},updateState:(o,c)=>{this.latestChildState=o,this.latestChildPicker=c,this.updateState(o,c)},addChannelzChild:n.addChannelzChild.bind(n),removeChannelzChild:n.removeChannelzChild.bind(n)},r),this.innerResolver=(0,OJ.createResolver)(t,{onSuccessfulResolution:(o,c,u,d,p)=>{var h;this.backoffTimeout.stop(),this.backoffTimeout.reset();let _=null;c===null?u===null?(this.previousServiceConfig=null,_=this.defaultServiceConfig):this.previousServiceConfig===null?this.handleResolutionFailure(u):_=this.previousServiceConfig:(_=c,this.previousServiceConfig=c);let I=(h=_?.loadBalancingConfig)!==null&&h!==void 0?h:[],v=(0,kJ.selectLbConfigFromList)(I,!0);if(v===null){this.handleResolutionFailure({code:Jy.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new DJ.Metadata});return}this.childLoadBalancer.updateAddressList(o,v,p);let b=_??this.defaultServiceConfig;this.onSuccessfulResolution(b,d??zJ(b))},onError:o=>{this.handleResolutionFailure(o)}},r);let s={initialDelay:r["grpc.initial_reconnect_backoff_ms"],maxDelay:r["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new PJ.BackoffTimeout(()=>{this.continueResolving?(this.updateResolution(),this.continueResolving=!1):this.updateState(this.latestChildState,this.latestChildPicker)},s),this.backoffTimeout.unref()}updateResolution(){this.innerResolver.updateResolution(),this.currentState===bn.ConnectivityState.IDLE&&this.updateState(bn.ConnectivityState.CONNECTING,this.latestChildPicker),this.backoffTimeout.runOnce()}updateState(t,n){OR((0,LJ.uriToString)(this.target)+" "+bn.ConnectivityState[this.currentState]+" -> "+bn.ConnectivityState[t]),t===bn.ConnectivityState.IDLE&&(n=new xl.QueuePicker(this,n)),this.currentState=t,this.channelControlHelper.updateState(t,n)}handleResolutionFailure(t){this.latestChildState===bn.ConnectivityState.IDLE&&(this.updateState(bn.ConnectivityState.TRANSIENT_FAILURE,new xl.UnavailablePicker(t)),this.onFailedResolution(t))}exitIdle(){(this.currentState===bn.ConnectivityState.IDLE||this.currentState===bn.ConnectivityState.TRANSIENT_FAILURE)&&(this.backoffTimeout.isRunning()?this.continueResolving=!0:this.updateResolution()),this.childLoadBalancer.exitIdle()}updateAddressList(t,n){throw new Error("updateAddressList not supported on ResolvingLoadBalancer")}resetBackoff(){this.backoffTimeout.reset(),this.childLoadBalancer.resetBackoff()}destroy(){this.childLoadBalancer.destroy(),this.innerResolver.destroy(),this.backoffTimeout.reset(),this.backoffTimeout.stop(),this.latestChildState=bn.ConnectivityState.IDLE,this.latestChildPicker=new xl.QueuePicker(this),this.currentState=bn.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}};$f.ResolvingLoadBalancer=zy});var DR=N(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.channelOptionsEqual=uu.recognizedOptions=void 0;uu.recognizedOptions={"grpc.ssl_target_name_override":!0,"grpc.primary_user_agent":!0,"grpc.secondary_user_agent":!0,"grpc.default_authority":!0,"grpc.keepalive_time_ms":!0,"grpc.keepalive_timeout_ms":!0,"grpc.keepalive_permit_without_calls":!0,"grpc.service_config":!0,"grpc.max_concurrent_streams":!0,"grpc.initial_reconnect_backoff_ms":!0,"grpc.max_reconnect_backoff_ms":!0,"grpc.use_local_subchannel_pool":!0,"grpc.max_send_message_length":!0,"grpc.max_receive_message_length":!0,"grpc.enable_http_proxy":!0,"grpc.enable_channelz":!0,"grpc.dns_min_time_between_resolutions_ms":!0,"grpc.enable_retries":!0,"grpc.per_rpc_retry_buffer_size":!0,"grpc.retry_buffer_size":!0,"grpc.max_connection_age_ms":!0,"grpc.max_connection_age_grace_ms":!0,"grpc-node.max_session_memory":!0,"grpc.service_config_disable_resolution":!0,"grpc.client_idle_timeout_ms":!0,"grpc-node.tls_enable_trace":!0,"grpc.lb.ring_hash.ring_size_cap":!0};function GJ(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1)if(n[i]!==r[i]||e[n[i]]!==t[r[i]])return!1;return!0}uu.channelOptionsEqual=GJ});var kr=N(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.EndpointMap=Dt.endpointHasAddress=Dt.endpointToString=Dt.endpointEqual=Dt.stringToSubchannelAddress=Dt.subchannelAddressToString=Dt.subchannelAddressEqual=Dt.isTcpSubchannelAddress=void 0;var MR=ye("net");function Nl(e){return"port"in e}Dt.isTcpSubchannelAddress=Nl;function Kf(e,t){return!e&&!t?!0:!e||!t?!1:Nl(e)?Nl(t)&&e.host===t.host&&e.port===t.port:!Nl(t)&&e.path===t.path}Dt.subchannelAddressEqual=Kf;function FR(e){return Nl(e)?(0,MR.isIPv6)(e.host)?"["+e.host+"]:"+e.port:e.host+":"+e.port:e.path}Dt.subchannelAddressToString=FR;var HJ=443;function WJ(e,t){return(0,MR.isIP)(e)?{host:e,port:t??HJ}:{path:e}}Dt.stringToSubchannelAddress=WJ;function ZJ(e,t){if(e.addresses.length!==t.addresses.length)return!1;for(let n=0;n<e.addresses.length;n++)if(!Kf(e.addresses[n],t.addresses[n]))return!1;return!0}Dt.endpointEqual=ZJ;function YJ(e){return"["+e.addresses.map(FR).join(", ")+"]"}Dt.endpointToString=YJ;function LR(e,t){for(let n of e.addresses)if(Kf(n,t))return!0;return!1}Dt.endpointHasAddress=LR;function Tl(e,t){if(e.addresses.length!==t.addresses.length)return!1;for(let n of e.addresses){let r=!1;for(let i of t.addresses)if(Kf(n,i)){r=!0;break}if(!r)return!1}return!0}var Gy=class{constructor(){this.map=new Set}get size(){return this.map.size}getForSubchannelAddress(t){for(let n of this.map)if(LR(n.key,t))return n.value}deleteMissing(t){let n=[];for(let r of this.map){let i=!1;for(let a of t)Tl(a,r.key)&&(i=!0);i||(n.push(r.value),this.map.delete(r))}return n}get(t){for(let n of this.map)if(Tl(t,n.key))return n.value}set(t,n){for(let r of this.map)if(Tl(t,r.key)){r.value=n;return}this.map.add({key:t,value:n})}delete(t){for(let n of this.map)if(Tl(t,n.key)){this.map.delete(n);return}}has(t){for(let n of this.map)if(Tl(t,n.key))return!0;return!1}clear(){this.map.clear()}*keys(){for(let t of this.map)yield t.key}*values(){for(let t of this.map)yield t.value}*entries(){for(let t of this.map)yield[t.key,t.value]}};Dt.EndpointMap=Gy});var QR={};gd(QR,{OrderedMap:()=>rz});function lu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hy(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function XJ(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function bs(){throw new RangeError("Iterator access denied!")}var Hy,UR,$J,KJ,jJ,ez,tz,nz,Bi,rz,qR=jt(()=>{Hy=function(e,t){return Hy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hy(e,t)};UR=function(){function e(t,n,r){r===void 0&&(r=1),this.t=void 0,this.i=void 0,this.h=void 0,this.u=t,this.o=n,this.l=r}return e.prototype.v=function(){var t=this,n=t.h.h===t;if(n&&t.l===1)t=t.i;else if(t.t)for(t=t.t;t.i;)t=t.i;else{if(n)return t.h;for(var r=t.h;r.t===t;)t=r,r=t.h;t=r}return t},e.prototype.p=function(){var t=this;if(t.i){for(t=t.i;t.t;)t=t.t;return t}else{for(var n=t.h;n.i===t;)t=n,n=t.h;return t.i!==n?n:t}},e.prototype.T=function(){var t=this.h,n=this.i,r=n.t;return t.h===this?t.h=n:t.t===this?t.t=n:t.i=n,n.h=t,n.t=this,this.h=n,this.i=r,r&&(r.h=this),n},e.prototype.I=function(){var t=this.h,n=this.t,r=n.i;return t.h===this?t.h=n:t.t===this?t.t=n:t.i=n,n.h=t,n.i=this,this.h=n,this.t=r,r&&(r.h=this),n},e}(),$J=function(e){lu(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.O=1,n}return t.prototype.T=function(){var n=e.prototype.T.call(this);return this.M(),n.M(),n},t.prototype.I=function(){var n=e.prototype.I.call(this);return this.M(),n.M(),n},t.prototype.M=function(){this.O=1,this.t&&(this.O+=this.t.O),this.i&&(this.O+=this.i.O)},t}(UR),KJ=function(){function e(t){t===void 0&&(t=0),this.iteratorType=t}return e.prototype.equals=function(t){return this.C===t.C},e}(),jJ=function(){function e(){this._=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._},enumerable:!1,configurable:!0}),e.prototype.size=function(){return this._},e.prototype.empty=function(){return this._===0},e}(),ez=function(e){lu(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(jJ);tz=function(e){lu(t,e);function t(n,r){n===void 0&&(n=function(a,s){return a<s?-1:a>s?1:0}),r===void 0&&(r=!1);var i=e.call(this)||this;return i.N=void 0,i.g=n,i.enableIndex=r,i.S=r?$J:UR,i.A=new i.S,i}return t.prototype.m=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);if(a<0)n=n.i;else if(a>0)i=n,n=n.t;else return n}return i},t.prototype.B=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);a<=0?n=n.i:(i=n,n=n.t)}return i},t.prototype.j=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);if(a<0)i=n,n=n.i;else if(a>0)n=n.t;else return n}return i},t.prototype.k=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);a<0?(i=n,n=n.i):n=n.t}return i},t.prototype.R=function(n){for(;;){var r=n.h;if(r===this.A)return;if(n.l===1){n.l=0;return}if(n===r.t){var i=r.i;if(i.l===1)i.l=0,r.l=1,r===this.N?this.N=r.T():r.T();else if(i.i&&i.i.l===1){i.l=r.l,r.l=0,i.i.l=0,r===this.N?this.N=r.T():r.T();return}else i.t&&i.t.l===1?(i.l=1,i.t.l=0,i.I()):(i.l=1,n=r)}else{var i=r.t;if(i.l===1)i.l=0,r.l=1,r===this.N?this.N=r.I():r.I();else if(i.t&&i.t.l===1){i.l=r.l,r.l=0,i.t.l=0,r===this.N?this.N=r.I():r.I();return}else i.i&&i.i.l===1?(i.l=1,i.i.l=0,i.T()):(i.l=1,n=r)}}},t.prototype.G=function(n){if(this._===1){this.clear();return}for(var r=n;r.t||r.i;){if(r.i)for(r=r.i;r.t;)r=r.t;else r=r.t;var i=n.u;n.u=r.u,r.u=i;var a=n.o;n.o=r.o,r.o=a,n=r}this.A.t===r?this.A.t=r.h:this.A.i===r&&(this.A.i=r.h),this.R(r);var s=r.h;if(r===s.t?s.t=void 0:s.i=void 0,this._-=1,this.N.l=0,this.enableIndex)for(;s!==this.A;)s.O-=1,s=s.h},t.prototype.P=function(n){for(var r=typeof n=="number"?n:void 0,i=typeof n=="function"?n:void 0,a=typeof n>"u"?[]:void 0,s=0,o=this.N,c=[];c.length||o;)if(o)c.push(o),o=o.t;else{if(o=c.pop(),s===r)return o;a&&a.push(o),i&&i(o,s,this),s+=1,o=o.i}return a},t.prototype.q=function(n){for(;;){var r=n.h;if(r.l===0)return;var i=r.h;if(r===i.t){var a=i.i;if(a&&a.l===1){if(a.l=r.l=0,i===this.N)return;i.l=1,n=i;continue}else if(n===r.i){if(n.l=0,n.t&&(n.t.h=r),n.i&&(n.i.h=i),r.i=n.t,i.t=n.i,n.t=r,n.i=i,i===this.N)this.N=n,this.A.h=n;else{var s=i.h;s.t===i?s.t=n:s.i=n}n.h=i.h,r.h=n,i.h=n,i.l=1}else{r.l=0,i===this.N?this.N=i.I():i.I(),i.l=1;return}}else{var a=i.t;if(a&&a.l===1){if(a.l=r.l=0,i===this.N)return;i.l=1,n=i;continue}else if(n===r.t){if(n.l=0,n.t&&(n.t.h=i),n.i&&(n.i.h=r),i.i=n.t,r.t=n.i,n.t=i,n.i=r,i===this.N)this.N=n,this.A.h=n;else{var s=i.h;s.t===i?s.t=n:s.i=n}n.h=i.h,r.h=n,i.h=n,i.l=1}else{r.l=0,i===this.N?this.N=i.T():i.T(),i.l=1;return}}this.enableIndex&&(r.M(),i.M(),n.M());return}},t.prototype.D=function(n,r,i){if(this.N===void 0)return this._+=1,this.N=new this.S(n,r,0),this.N.h=this.A,this.A.h=this.A.t=this.A.i=this.N,this._;var a,s=this.A.t,o=this.g(s.u,n);if(o===0)return s.o=r,this._;if(o>0)s.t=new this.S(n,r),s.t.h=s,a=s.t,this.A.t=a;else{var c=this.A.i,u=this.g(c.u,n);if(u===0)return c.o=r,this._;if(u<0)c.i=new this.S(n,r),c.i.h=c,a=c.i,this.A.i=a;else{if(i!==void 0){var d=i.C;if(d!==this.A){var p=this.g(d.u,n);if(p===0)return d.o=r,this._;if(p>0){var h=d.v(),_=this.g(h.u,n);if(_===0)return h.o=r,this._;_<0&&(a=new this.S(n,r),h.i===void 0?(h.i=a,a.h=h):(d.t=a,a.h=d))}}}if(a===void 0)for(a=this.N;;){var I=this.g(a.u,n);if(I>0){if(a.t===void 0){a.t=new this.S(n,r),a.t.h=a,a=a.t;break}a=a.t}else if(I<0){if(a.i===void 0){a.i=new this.S(n,r),a.i.h=a,a=a.i;break}a=a.i}else return a.o=r,this._}}}if(this.enableIndex)for(var v=a.h;v!==this.A;)v.O+=1,v=v.h;return this.q(a),this._+=1,this._},t.prototype.F=function(n,r){for(;n;){var i=this.g(n.u,r);if(i<0)n=n.i;else if(i>0)n=n.t;else return n}return n||this.A},t.prototype.clear=function(){this._=0,this.N=void 0,this.A.h=void 0,this.A.t=this.A.i=void 0},t.prototype.updateKeyByIterator=function(n,r){var i=n.C;if(i===this.A&&bs(),this._===1)return i.u=r,!0;var a=i.p().u;if(i===this.A.t)return this.g(a,r)>0?(i.u=r,!0):!1;var s=i.v().u;return i===this.A.i?this.g(s,r)<0?(i.u=r,!0):!1:this.g(s,r)>=0||this.g(a,r)<=0?!1:(i.u=r,!0)},t.prototype.eraseElementByPos=function(n){if(n<0||n>this._-1)throw new RangeError;var r=this.P(n);return this.G(r),this._},t.prototype.eraseElementByKey=function(n){if(this._===0)return!1;var r=this.F(this.N,n);return r===this.A?!1:(this.G(r),!0)},t.prototype.eraseElementByIterator=function(n){var r=n.C;r===this.A&&bs();var i=r.i===void 0,a=n.iteratorType===0;return a?i&&n.next():(!i||r.t===void 0)&&n.next(),this.G(r),n},t.prototype.getHeight=function(){if(this._===0)return 0;function n(r){return r?Math.max(n(r.t),n(r.i))+1:0}return n(this.N)},t}(ez),nz=function(e){lu(t,e);function t(n,r,i){var a=e.call(this,i)||this;return a.C=n,a.A=r,a.iteratorType===0?(a.pre=function(){return this.C===this.A.t&&bs(),this.C=this.C.v(),this},a.next=function(){return this.C===this.A&&bs(),this.C=this.C.p(),this}):(a.pre=function(){return this.C===this.A.i&&bs(),this.C=this.C.p(),this},a.next=function(){return this.C===this.A&&bs(),this.C=this.C.v(),this}),a}return Object.defineProperty(t.prototype,"index",{get:function(){var n=this.C,r=this.A.h;if(n===this.A)return r?r.O-1:0;var i=0;for(n.t&&(i+=n.t.O);n!==r;){var a=n.h;n===a.i&&(i+=1,a.t&&(i+=a.t.O)),n=a}return i},enumerable:!1,configurable:!0}),t.prototype.isAccessible=function(){return this.C!==this.A},t}(KJ),Bi=function(e){lu(t,e);function t(n,r,i,a){var s=e.call(this,n,r,a)||this;return s.container=i,s}return Object.defineProperty(t.prototype,"pointer",{get:function(){this.C===this.A&&bs();var n=this;return new Proxy([],{get:function(r,i){return i==="0"?n.C.u:i==="1"?n.C.o:(r[0]=n.C.u,r[1]=n.C.o,r[i])},set:function(r,i,a){if(i!=="1")throw new TypeError("prop must be 1");return n.C.o=a,!0}})},enumerable:!1,configurable:!0}),t.prototype.copy=function(){return new t(this.C,this.A,this.container,this.iteratorType)},t}(nz),rz=function(e){lu(t,e);function t(n,r,i){n===void 0&&(n=[]);var a=e.call(this,r,i)||this,s=a;return n.forEach(function(o){s.setElement(o[0],o[1])}),a}return t.prototype.begin=function(){return new Bi(this.A.t||this.A,this.A,this)},t.prototype.end=function(){return new Bi(this.A,this.A,this)},t.prototype.rBegin=function(){return new Bi(this.A.i||this.A,this.A,this,1)},t.prototype.rEnd=function(){return new Bi(this.A,this.A,this,1)},t.prototype.front=function(){if(this._!==0){var n=this.A.t;return[n.u,n.o]}},t.prototype.back=function(){if(this._!==0){var n=this.A.i;return[n.u,n.o]}},t.prototype.lowerBound=function(n){var r=this.m(this.N,n);return new Bi(r,this.A,this)},t.prototype.upperBound=function(n){var r=this.B(this.N,n);return new Bi(r,this.A,this)},t.prototype.reverseLowerBound=function(n){var r=this.j(this.N,n);return new Bi(r,this.A,this)},t.prototype.reverseUpperBound=function(n){var r=this.k(this.N,n);return new Bi(r,this.A,this)},t.prototype.forEach=function(n){this.P(function(r,i,a){n([r.u,r.o],i,a)})},t.prototype.setElement=function(n,r,i){return this.D(n,r,i)},t.prototype.getElementByPos=function(n){if(n<0||n>this._-1)throw new RangeError;var r=this.P(n);return[r.u,r.o]},t.prototype.find=function(n){var r=this.F(this.N,n);return new Bi(r,this.A,this)},t.prototype.getElementByKey=function(n){var r=this.F(this.N,n);return r.o},t.prototype.union=function(n){var r=this;return n.forEach(function(i){r.setElement(i[0],i[1])}),this._},t.prototype[Symbol.iterator]=function(){var n,r,i,a;return XJ(this,function(s){switch(s.label){case 0:n=this._,r=this.P(),i=0,s.label=1;case 1:return i<n?(a=r[i],[4,[a.u,a.o]]):[3,4];case 2:s.sent(),s.label=3;case 3:return++i,[3,1];case 4:return[2]}})},t}(tz)});var jf=N(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.addAdminServicesToServer=du.registerAdminService=void 0;var VR=[];function iz(e,t){VR.push({getServiceDefinition:e,getHandlers:t})}du.registerAdminService=iz;function az(e){for(let{getServiceDefinition:t,getHandlers:n}of VR)e.addService(t(),n())}du.addAdminServicesToServer=az});var JR=N(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.ClientDuplexStreamImpl=Yn.ClientWritableStreamImpl=Yn.ClientReadableStreamImpl=Yn.ClientUnaryCallImpl=Yn.callErrorFromStatus=void 0;var sz=ye("events"),$y=ye("stream"),Rl=Me();function oz(e,t){let n=`${e.code} ${Rl.Status[e.code]}: ${e.details}`,i=`${new Error(n).stack}
|
|
4
|
+
for call at
|
|
5
|
+
${t}`;return Object.assign(new Error(n),e,{stack:i})}Yn.callErrorFromStatus=oz;var Wy=class extends sz.EventEmitter{constructor(){super()}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(Rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}};Yn.ClientUnaryCallImpl=Wy;var Zy=class extends $y.Readable{constructor(t){super({objectMode:!0}),this.deserialize=t}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(Rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}_read(t){var n;(n=this.call)===null||n===void 0||n.startRead()}};Yn.ClientReadableStreamImpl=Zy;var Yy=class extends $y.Writable{constructor(t){super({objectMode:!0}),this.serialize=t}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(Rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}_write(t,n,r){var i;let a={callback:r},s=Number(n);Number.isNaN(s)||(a.flags=s),(i=this.call)===null||i===void 0||i.sendMessageWithContext(a,t)}_final(t){var n;(n=this.call)===null||n===void 0||n.halfClose(),t()}};Yn.ClientWritableStreamImpl=Yy;var Xy=class extends $y.Duplex{constructor(t,n){super({objectMode:!0}),this.serialize=t,this.deserialize=n}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(Rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}_read(t){var n;(n=this.call)===null||n===void 0||n.startRead()}_write(t,n,r){var i;let a={callback:r},s=Number(n);Number.isNaN(s)||(a.flags=s),(i=this.call)===null||i===void 0||i.sendMessageWithContext(a,t)}_final(t){var n;(n=this.call)===null||n===void 0||n.halfClose(),t()}};Yn.ClientDuplexStreamImpl=Xy});var zR=N(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.InterceptingListenerImpl=fu.isInterceptingListener=void 0;function cz(e){return e.onReceiveMetadata!==void 0&&e.onReceiveMetadata.length===1}fu.isInterceptingListener=cz;var Ky=class{constructor(t,n){this.listener=t,this.nextListener=n,this.processingMetadata=!1,this.hasPendingMessage=!1,this.processingMessage=!1,this.pendingStatus=null}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingStatus(){this.pendingStatus&&this.nextListener.onReceiveStatus(this.pendingStatus)}onReceiveMetadata(t){this.processingMetadata=!0,this.listener.onReceiveMetadata(t,n=>{this.processingMetadata=!1,this.nextListener.onReceiveMetadata(n),this.processPendingMessage(),this.processPendingStatus()})}onReceiveMessage(t){this.processingMessage=!0,this.listener.onReceiveMessage(t,n=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=n,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(n),this.processPendingStatus())})}onReceiveStatus(t){this.listener.onReceiveStatus(t,n=>{this.processingMetadata||this.processingMessage?this.pendingStatus=n:this.nextListener.onReceiveStatus(n)})}};fu.InterceptingListenerImpl=Ky});var ab=N(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.getInterceptingCall=Xn.InterceptingCall=Xn.RequesterBuilder=Xn.ListenerBuilder=Xn.InterceptorConfigurationError=void 0;var uz=an(),GR=zR(),HR=Me(),WR=Lf(),vs=class extends Error{constructor(t){super(t),this.name="InterceptorConfigurationError",Error.captureStackTrace(this,vs)}};Xn.InterceptorConfigurationError=vs;var eb=class{constructor(){this.metadata=void 0,this.message=void 0,this.status=void 0}withOnReceiveMetadata(t){return this.metadata=t,this}withOnReceiveMessage(t){return this.message=t,this}withOnReceiveStatus(t){return this.status=t,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveStatus:this.status}}};Xn.ListenerBuilder=eb;var tb=class{constructor(){this.start=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withStart(t){return this.start=t,this}withSendMessage(t){return this.message=t,this}withHalfClose(t){return this.halfClose=t,this}withCancel(t){return this.cancel=t,this}build(){return{start:this.start,sendMessage:this.message,halfClose:this.halfClose,cancel:this.cancel}}};Xn.RequesterBuilder=tb;var jy={onReceiveMetadata:(e,t)=>{t(e)},onReceiveMessage:(e,t)=>{t(e)},onReceiveStatus:(e,t)=>{t(e)}},kl={start:(e,t,n)=>{n(e,t)},sendMessage:(e,t)=>{t(e)},halfClose:e=>{e()},cancel:e=>{e()}},nb=class{constructor(t,n){var r,i,a,s;this.nextCall=t,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,n?this.requester={start:(r=n.start)!==null&&r!==void 0?r:kl.start,sendMessage:(i=n.sendMessage)!==null&&i!==void 0?i:kl.sendMessage,halfClose:(a=n.halfClose)!==null&&a!==void 0?a:kl.halfClose,cancel:(s=n.cancel)!==null&&s!==void 0?s:kl.cancel}:this.requester=kl}cancelWithStatus(t,n){this.requester.cancel(()=>{this.nextCall.cancelWithStatus(t,n)})}getPeer(){return this.nextCall.getPeer()}processPendingMessage(){this.pendingMessageContext&&(this.nextCall.sendMessageWithContext(this.pendingMessageContext,this.pendingMessage),this.pendingMessageContext=null,this.pendingMessage=null)}processPendingHalfClose(){this.pendingHalfClose&&this.nextCall.halfClose()}start(t,n){var r,i,a,s,o,c;let u={onReceiveMetadata:(i=(r=n?.onReceiveMetadata)===null||r===void 0?void 0:r.bind(n))!==null&&i!==void 0?i:d=>{},onReceiveMessage:(s=(a=n?.onReceiveMessage)===null||a===void 0?void 0:a.bind(n))!==null&&s!==void 0?s:d=>{},onReceiveStatus:(c=(o=n?.onReceiveStatus)===null||o===void 0?void 0:o.bind(n))!==null&&c!==void 0?c:d=>{}};this.processingMetadata=!0,this.requester.start(t,u,(d,p)=>{var h,_,I;this.processingMetadata=!1;let v;if((0,GR.isInterceptingListener)(p))v=p;else{let b={onReceiveMetadata:(h=p.onReceiveMetadata)!==null&&h!==void 0?h:jy.onReceiveMetadata,onReceiveMessage:(_=p.onReceiveMessage)!==null&&_!==void 0?_:jy.onReceiveMessage,onReceiveStatus:(I=p.onReceiveStatus)!==null&&I!==void 0?I:jy.onReceiveStatus};v=new GR.InterceptingListenerImpl(b,u)}this.nextCall.start(d,v),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(t,n){this.processingMessage=!0,this.requester.sendMessage(n,r=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessageContext=t,this.pendingMessage=n):(this.nextCall.sendMessageWithContext(t,r),this.processPendingHalfClose())})}sendMessage(t){this.sendMessageWithContext({},t)}startRead(){this.nextCall.startRead()}halfClose(){this.requester.halfClose(()=>{this.processingMetadata||this.processingMessage?this.pendingHalfClose=!0:this.nextCall.halfClose()})}};Xn.InterceptingCall=nb;function lz(e,t,n){var r,i;let a=(r=n.deadline)!==null&&r!==void 0?r:1/0,s=n.host,o=(i=n.parent)!==null&&i!==void 0?i:null,c=n.propagate_flags,u=n.credentials,d=e.createCall(t,a,s,o,c);return u&&d.setCredentials(u),d}var ep=class{constructor(t,n){this.call=t,this.methodDefinition=n}cancelWithStatus(t,n){this.call.cancelWithStatus(t,n)}getPeer(){return this.call.getPeer()}sendMessageWithContext(t,n){let r;try{r=this.methodDefinition.requestSerialize(n)}catch(i){this.call.cancelWithStatus(HR.Status.INTERNAL,`Request message serialization failure: ${(0,WR.getErrorMessage)(i)}`);return}this.call.sendMessageWithContext(t,r)}sendMessage(t){this.sendMessageWithContext({},t)}start(t,n){let r=null;this.call.start(t,{onReceiveMetadata:i=>{var a;(a=n?.onReceiveMetadata)===null||a===void 0||a.call(n,i)},onReceiveMessage:i=>{var a;let s;try{s=this.methodDefinition.responseDeserialize(i)}catch(o){r={code:HR.Status.INTERNAL,details:`Response message parsing error: ${(0,WR.getErrorMessage)(o)}`,metadata:new uz.Metadata},this.call.cancelWithStatus(r.code,r.details);return}(a=n?.onReceiveMessage)===null||a===void 0||a.call(n,s)},onReceiveStatus:i=>{var a,s;r?(a=n?.onReceiveStatus)===null||a===void 0||a.call(n,r):(s=n?.onReceiveStatus)===null||s===void 0||s.call(n,i)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}},rb=class extends ep{constructor(t,n){super(t,n)}start(t,n){var r,i;let a=!1,s={onReceiveMetadata:(i=(r=n?.onReceiveMetadata)===null||r===void 0?void 0:r.bind(n))!==null&&i!==void 0?i:o=>{},onReceiveMessage:o=>{var c;a=!0,(c=n?.onReceiveMessage)===null||c===void 0||c.call(n,o)},onReceiveStatus:o=>{var c,u;a||(c=n?.onReceiveMessage)===null||c===void 0||c.call(n,null),(u=n?.onReceiveStatus)===null||u===void 0||u.call(n,o)}};super.start(t,s),this.call.startRead()}},ib=class extends ep{};function dz(e,t,n){let r=lz(e,n.path,t);return n.responseStream?new ib(r,n):new rb(r,n)}function fz(e,t,n,r){if(e.clientInterceptors.length>0&&e.clientInterceptorProviders.length>0)throw new vs("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(e.callInterceptors.length>0&&e.callInterceptorProviders.length>0)throw new vs("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let i=[];e.callInterceptors.length>0||e.callInterceptorProviders.length>0?i=[].concat(e.callInterceptors,e.callInterceptorProviders.map(o=>o(t))).filter(o=>o):i=[].concat(e.clientInterceptors,e.clientInterceptorProviders.map(o=>o(t))).filter(o=>o);let a=Object.assign({},n,{method_definition:t});return i.reduceRight((o,c)=>u=>c(u,o),o=>dz(r,o,t))(a)}Xn.getInterceptingCall=fz});var cb=N(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});np.Client=void 0;var ii=JR(),pz=ub(),hz=Wn(),Ca=Me(),pu=an(),tp=ab(),Br=Symbol(),hu=Symbol(),mu=Symbol(),Oi=Symbol();function sb(e){return typeof e=="function"}function gu(e){var t;return((t=e.stack)===null||t===void 0?void 0:t.split(`
|
|
6
|
+
`).slice(1).join(`
|
|
7
|
+
`))||"no stack trace available"}var ob=class{constructor(t,n,r={}){var i,a;if(r=Object.assign({},r),this[hu]=(i=r.interceptors)!==null&&i!==void 0?i:[],delete r.interceptors,this[mu]=(a=r.interceptor_providers)!==null&&a!==void 0?a:[],delete r.interceptor_providers,this[hu].length>0&&this[mu].length>0)throw new Error("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(this[Oi]=r.callInvocationTransformer,delete r.callInvocationTransformer,r.channelOverride)this[Br]=r.channelOverride;else if(r.channelFactoryOverride){let s=r.channelFactoryOverride;delete r.channelFactoryOverride,this[Br]=s(t,n,r)}else this[Br]=new pz.ChannelImplementation(t,n,r)}close(){this[Br].close()}getChannel(){return this[Br]}waitForReady(t,n){let r=i=>{if(i){n(new Error("Failed to connect before the deadline"));return}let a;try{a=this[Br].getConnectivityState(!0)}catch{n(new Error("The channel has been closed"));return}if(a===hz.ConnectivityState.READY)n();else try{this[Br].watchConnectivityState(a,t,r)}catch{n(new Error("The channel has been closed"))}};setImmediate(r)}checkOptionalUnaryResponseArguments(t,n,r){if(sb(t))return{metadata:new pu.Metadata,options:{},callback:t};if(sb(n))return t instanceof pu.Metadata?{metadata:t,options:{},callback:n}:{metadata:new pu.Metadata,options:t,callback:n};if(!(t instanceof pu.Metadata&&n instanceof Object&&sb(r)))throw new Error("Incorrect arguments passed");return{metadata:t,options:n,callback:r}}makeUnaryRequest(t,n,r,i,a,s,o){var c,u;let d=this.checkOptionalUnaryResponseArguments(a,s,o),p={path:t,requestStream:!1,responseStream:!1,requestSerialize:n,responseDeserialize:r},h={argument:i,metadata:d.metadata,call:new ii.ClientUnaryCallImpl,channel:this[Br],methodDefinition:p,callOptions:d.options,callback:d.callback};this[Oi]&&(h=this[Oi](h));let _=h.call,I={clientInterceptors:this[hu],clientInterceptorProviders:this[mu],callInterceptors:(c=h.callOptions.interceptors)!==null&&c!==void 0?c:[],callInterceptorProviders:(u=h.callOptions.interceptor_providers)!==null&&u!==void 0?u:[]},v=(0,tp.getInterceptingCall)(I,h.methodDefinition,h.callOptions,h.channel);_.call=v;let b=null,w=!1,x=new Error;return v.start(h.metadata,{onReceiveMetadata:R=>{_.emit("metadata",R)},onReceiveMessage(R){b!==null&&v.cancelWithStatus(Ca.Status.UNIMPLEMENTED,"Too many responses received"),b=R},onReceiveStatus(R){if(!w){if(w=!0,R.code===Ca.Status.OK)if(b===null){let k=gu(x);h.callback((0,ii.callErrorFromStatus)({code:Ca.Status.UNIMPLEMENTED,details:"No message received",metadata:R.metadata},k))}else h.callback(null,b);else{let k=gu(x);h.callback((0,ii.callErrorFromStatus)(R,k))}x=null,_.emit("status",R)}}}),v.sendMessage(i),v.halfClose(),_}makeClientStreamRequest(t,n,r,i,a,s){var o,c;let u=this.checkOptionalUnaryResponseArguments(i,a,s),d={path:t,requestStream:!0,responseStream:!1,requestSerialize:n,responseDeserialize:r},p={metadata:u.metadata,call:new ii.ClientWritableStreamImpl(n),channel:this[Br],methodDefinition:d,callOptions:u.options,callback:u.callback};this[Oi]&&(p=this[Oi](p));let h=p.call,_={clientInterceptors:this[hu],clientInterceptorProviders:this[mu],callInterceptors:(o=p.callOptions.interceptors)!==null&&o!==void 0?o:[],callInterceptorProviders:(c=p.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},I=(0,tp.getInterceptingCall)(_,p.methodDefinition,p.callOptions,p.channel);h.call=I;let v=null,b=!1,w=new Error;return I.start(p.metadata,{onReceiveMetadata:x=>{h.emit("metadata",x)},onReceiveMessage(x){v!==null&&I.cancelWithStatus(Ca.Status.UNIMPLEMENTED,"Too many responses received"),v=x,I.startRead()},onReceiveStatus(x){if(!b){if(b=!0,x.code===Ca.Status.OK)if(v===null){let R=gu(w);p.callback((0,ii.callErrorFromStatus)({code:Ca.Status.UNIMPLEMENTED,details:"No message received",metadata:x.metadata},R))}else p.callback(null,v);else{let R=gu(w);p.callback((0,ii.callErrorFromStatus)(x,R))}w=null,h.emit("status",x)}}}),h}checkMetadataAndOptions(t,n){let r,i;return t instanceof pu.Metadata?(r=t,n?i=n:i={}):(t?i=t:i={},r=new pu.Metadata),{metadata:r,options:i}}makeServerStreamRequest(t,n,r,i,a,s){var o,c;let u=this.checkMetadataAndOptions(a,s),d={path:t,requestStream:!1,responseStream:!0,requestSerialize:n,responseDeserialize:r},p={argument:i,metadata:u.metadata,call:new ii.ClientReadableStreamImpl(r),channel:this[Br],methodDefinition:d,callOptions:u.options};this[Oi]&&(p=this[Oi](p));let h=p.call,_={clientInterceptors:this[hu],clientInterceptorProviders:this[mu],callInterceptors:(o=p.callOptions.interceptors)!==null&&o!==void 0?o:[],callInterceptorProviders:(c=p.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},I=(0,tp.getInterceptingCall)(_,p.methodDefinition,p.callOptions,p.channel);h.call=I;let v=!1,b=new Error;return I.start(p.metadata,{onReceiveMetadata(w){h.emit("metadata",w)},onReceiveMessage(w){h.push(w)},onReceiveStatus(w){if(!v){if(v=!0,h.push(null),w.code!==Ca.Status.OK){let x=gu(b);h.emit("error",(0,ii.callErrorFromStatus)(w,x))}b=null,h.emit("status",w)}}}),I.sendMessage(i),I.halfClose(),h}makeBidiStreamRequest(t,n,r,i,a){var s,o;let c=this.checkMetadataAndOptions(i,a),u={path:t,requestStream:!0,responseStream:!0,requestSerialize:n,responseDeserialize:r},d={metadata:c.metadata,call:new ii.ClientDuplexStreamImpl(n,r),channel:this[Br],methodDefinition:u,callOptions:c.options};this[Oi]&&(d=this[Oi](d));let p=d.call,h={clientInterceptors:this[hu],clientInterceptorProviders:this[mu],callInterceptors:(s=d.callOptions.interceptors)!==null&&s!==void 0?s:[],callInterceptorProviders:(o=d.callOptions.interceptor_providers)!==null&&o!==void 0?o:[]},_=(0,tp.getInterceptingCall)(h,d.methodDefinition,d.callOptions,d.channel);p.call=_;let I=!1,v=new Error;return _.start(d.metadata,{onReceiveMetadata(b){p.emit("metadata",b)},onReceiveMessage(b){p.push(b)},onReceiveStatus(b){if(!I){if(I=!0,p.push(null),b.code!==Ca.Status.OK){let w=gu(v);p.emit("error",(0,ii.callErrorFromStatus)(b,w))}v=null,p.emit("status",b)}}}),p}};np.Client=ob});var db=N(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.loadPackageDefinition=_u.makeClientConstructor=void 0;var Bl=cb(),mz={unary:Bl.Client.prototype.makeUnaryRequest,server_stream:Bl.Client.prototype.makeServerStreamRequest,client_stream:Bl.Client.prototype.makeClientStreamRequest,bidi:Bl.Client.prototype.makeBidiStreamRequest};function lb(e){return["__proto__","prototype","constructor"].includes(e)}function ZR(e,t,n){n||(n={});class r extends Bl.Client{}return Object.keys(e).forEach(i=>{if(lb(i))return;let a=e[i],s;if(typeof i=="string"&&i.charAt(0)==="$")throw new Error("Method names cannot start with $");a.requestStream?a.responseStream?s="bidi":s="client_stream":a.responseStream?s="server_stream":s="unary";let o=a.requestSerialize,c=a.responseDeserialize,u=gz(mz[s],a.path,o,c);r.prototype[i]=u,Object.assign(r.prototype[i],a),a.originalName&&!lb(a.originalName)&&(r.prototype[a.originalName]=r.prototype[i])}),r.service=e,r.serviceName=t,r}_u.makeClientConstructor=ZR;function gz(e,t,n,r){return function(...i){return e.call(this,t,n,r,...i)}}function _z(e){return"format"in e}function Az(e){let t={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n],i=n.split(".");if(i.some(o=>lb(o)))continue;let a=i[i.length-1],s=t;for(let o of i.slice(0,-1))s[o]||(s[o]={}),s=s[o];_z(r)?s[a]=r:s[a]=ZR(r,a,{})}return t}_u.loadPackageDefinition=Az});var yk=N((ice,Ak)=>{var yz=1/0,bz="[object Symbol]",vz=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wz=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ip="\\ud800-\\udfff",nk="\\u0300-\\u036f\\ufe20-\\ufe23",rk="\\u20d0-\\u20f0",ik="\\u2700-\\u27bf",ak="a-z\\xdf-\\xf6\\xf8-\\xff",Ez="\\xac\\xb1\\xd7\\xf7",Cz="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Iz="\\u2000-\\u206f",Sz=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",sk="A-Z\\xc0-\\xd6\\xd8-\\xde",ok="\\ufe0e\\ufe0f",ck=Ez+Cz+Iz+Sz,pb="['\u2019]",xz="["+ip+"]",YR="["+ck+"]",rp="["+nk+rk+"]",uk="\\d+",Tz="["+ik+"]",lk="["+ak+"]",dk="[^"+ip+ck+uk+ik+ak+sk+"]",fb="\\ud83c[\\udffb-\\udfff]",Nz="(?:"+rp+"|"+fb+")",fk="[^"+ip+"]",hb="(?:\\ud83c[\\udde6-\\uddff]){2}",mb="[\\ud800-\\udbff][\\udc00-\\udfff]",Au="["+sk+"]",pk="\\u200d",XR="(?:"+lk+"|"+dk+")",Rz="(?:"+Au+"|"+dk+")",$R="(?:"+pb+"(?:d|ll|m|re|s|t|ve))?",KR="(?:"+pb+"(?:D|LL|M|RE|S|T|VE))?",hk=Nz+"?",mk="["+ok+"]?",kz="(?:"+pk+"(?:"+[fk,hb,mb].join("|")+")"+mk+hk+")*",gk=mk+hk+kz,Bz="(?:"+[Tz,hb,mb].join("|")+")"+gk,Oz="(?:"+[fk+rp+"?",rp,hb,mb,xz].join("|")+")",Pz=RegExp(pb,"g"),Dz=RegExp(rp,"g"),Mz=RegExp(fb+"(?="+fb+")|"+Oz+gk,"g"),Fz=RegExp([Au+"?"+lk+"+"+$R+"(?="+[YR,Au,"$"].join("|")+")",Rz+"+"+KR+"(?="+[YR,Au+XR,"$"].join("|")+")",Au+"?"+XR+"+"+$R,Au+"+"+KR,uk,Bz].join("|"),"g"),Lz=RegExp("["+pk+ip+nk+rk+ok+"]"),Uz=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qz={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},qz=typeof global=="object"&&global&&global.Object===Object&&global,Vz=typeof self=="object"&&self&&self.Object===Object&&self,Jz=qz||Vz||Function("return this")();function zz(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Gz(e){return e.split("")}function Hz(e){return e.match(vz)||[]}function Wz(e){return function(t){return e?.[t]}}var Zz=Wz(Qz);function _k(e){return Lz.test(e)}function Yz(e){return Uz.test(e)}function Xz(e){return _k(e)?$z(e):Gz(e)}function $z(e){return e.match(Mz)||[]}function Kz(e){return e.match(Fz)||[]}var jz=Object.prototype,e5=jz.toString,jR=Jz.Symbol,ek=jR?jR.prototype:void 0,tk=ek?ek.toString:void 0;function t5(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function n5(e){if(typeof e=="string")return e;if(o5(e))return tk?tk.call(e):"";var t=e+"";return t=="0"&&1/e==-yz?"-0":t}function r5(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:t5(e,t,n)}function i5(e){return function(t){t=ap(t);var n=_k(t)?Xz(t):void 0,r=n?n[0]:t.charAt(0),i=n?r5(n,1).join(""):t.slice(1);return r[e]()+i}}function a5(e){return function(t){return zz(f5(l5(t).replace(Pz,"")),e,"")}}function s5(e){return!!e&&typeof e=="object"}function o5(e){return typeof e=="symbol"||s5(e)&&e5.call(e)==bz}function ap(e){return e==null?"":n5(e)}var c5=a5(function(e,t,n){return t=t.toLowerCase(),e+(n?u5(t):t)});function u5(e){return d5(ap(e).toLowerCase())}function l5(e){return e=ap(e),e&&e.replace(wz,Zz).replace(Dz,"")}var d5=i5("toUpperCase");function f5(e,t,n){return e=ap(e),t=n?void 0:t,t===void 0?Yz(e)?Kz(e):Hz(e):e.match(t)||[]}Ak.exports=c5});var vk=N((ace,bk)=>{"use strict";bk.exports=gb;function gb(e,t){typeof e=="string"&&(t=e,e=void 0);var n=[];function r(a){if(typeof a!="string"){var s=i();if(gb.verbose&&console.log("codegen: "+s),s="return "+s,a){for(var o=Object.keys(a),c=new Array(o.length+1),u=new Array(o.length),d=0;d<o.length;)c[d]=o[d],u[d]=a[o[d++]];return c[d]=s,Function.apply(null,c).apply(null,u)}return Function(s)()}for(var p=new Array(arguments.length-1),h=0;h<p.length;)p[h]=arguments[++h];if(h=0,a=a.replace(/%([%dfijs])/g,function(I,v){var b=p[h++];switch(v){case"d":case"f":return String(Number(b));case"i":return String(Math.floor(b));case"j":return JSON.stringify(b);case"s":return String(b)}return"%"}),h!==p.length)throw Error("parameter count mismatch");return n.push(a),r}function i(a){return"function "+(a||t||"")+"("+(e&&e.join(",")||"")+`){
|
|
8
|
+
`+n.join(`
|
|
9
|
+
`)+`
|
|
10
|
+
}`}return r.toString=i,r}gb.verbose=!1});var Ek=N((sce,wk)=>{"use strict";wk.exports=Ol;var p5=GA(),h5=HA(),_b=h5("fs");function Ol(e,t,n){return typeof t=="function"?(n=t,t={}):t||(t={}),n?!t.xhr&&_b&&_b.readFile?_b.readFile(e,function(i,a){return i&&typeof XMLHttpRequest<"u"?Ol.xhr(e,t,n):i?n(i):n(null,t.binary?a:a.toString("utf8"))}):Ol.xhr(e,t,n):p5(Ol,this,e,t)}Ol.xhr=function(t,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===4){if(i.status!==0&&i.status!==200)return r(Error("status "+i.status));if(n.binary){var s=i.response;if(!s){s=[];for(var o=0;o<i.responseText.length;++o)s.push(i.responseText.charCodeAt(o)&255)}return r(null,typeof Uint8Array<"u"?new Uint8Array(s):s)}return r(null,i.responseText)}},n.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",t),i.send()}});var Sk=N(Ik=>{"use strict";var yb=Ik,Ck=yb.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},Ab=yb.normalize=function(t){t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var n=t.split("/"),r=Ck(t),i="";r&&(i=n.shift()+"/");for(var a=0;a<n.length;)n[a]===".."?a>0&&n[a-1]!==".."?n.splice(--a,2):r?n.splice(a,1):++a:n[a]==="."?n.splice(a,1):++a;return i+n.join("/")};yb.resolve=function(t,n,r){return r||(n=Ab(n)),Ck(n)?n:(r||(t=Ab(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?Ab(t+"/"+n):n)}});var ws=N(xk=>{"use strict";var Pl=xk,m5=Mt(),g5=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function Dl(e,t){var n=0,r={};for(t|=0;n<e.length;)r[g5[n+t]]=e[n++];return r}Pl.basic=Dl([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);Pl.defaults=Dl([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",m5.emptyArray,null]);Pl.long=Dl([0,0,0,1,1],7);Pl.mapKey=Dl([0,0,0,5,5,0,0,0,1,1,0,2],2);Pl.packed=Dl([1,5,0,0,0,5,5,0,0,0,1,1,0])});var Ia=N((uce,Rk)=>{"use strict";Rk.exports=$n;var sp=Es();(($n.prototype=Object.create(sp.prototype)).constructor=$n).className="Field";var Tk=Or(),Nk=ws(),_t=Mt(),bb,_5=/^required|optional|repeated$/;$n.fromJSON=function(t,n){return new $n(t,n.id,n.type,n.rule,n.extend,n.options,n.comment)};function $n(e,t,n,r,i,a,s){if(_t.isObject(r)?(s=i,a=r,r=i=void 0):_t.isObject(i)&&(s=a,a=i,i=void 0),sp.call(this,e,a),!_t.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!_t.isString(n))throw TypeError("type must be a string");if(r!==void 0&&!_5.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(i!==void 0&&!_t.isString(i))throw TypeError("extend must be a string");r==="proto3_optional"&&(r="optional"),this.rule=r&&r!=="optional"?r:void 0,this.type=n,this.id=t,this.extend=i||void 0,this.required=r==="required",this.optional=!this.required,this.repeated=r==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=_t.Long?Nk.long[n]!==void 0:!1,this.bytes=n==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=s}Object.defineProperty($n.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}});$n.prototype.setOption=function(t,n,r){return t==="packed"&&(this._packed=null),sp.prototype.setOption.call(this,t,n,r)};$n.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return _t.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",n?this.comment:void 0])};$n.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=Nk.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof bb?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof Tk&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof Tk))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=_t.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var t;_t.base64.test(this.typeDefault)?_t.base64.decode(this.typeDefault,t=_t.newBuffer(_t.base64.length(this.typeDefault)),0):_t.utf8.write(this.typeDefault,t=_t.newBuffer(_t.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=_t.emptyObject:this.repeated?this.defaultValue=_t.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof bb&&(this.parent.ctor.prototype[this.name]=this.defaultValue),sp.prototype.resolve.call(this)};$n.d=function(t,n,r,i){return typeof n=="function"?n=_t.decorateType(n).name:n&&typeof n=="object"&&(n=_t.decorateEnum(n).name),function(s,o){_t.decorateType(s.constructor).add(new $n(o,t,n,r,{default:i}))}};$n._configure=function(t){bb=t}});var yu=N((lce,Ok)=>{"use strict";Ok.exports=Kn;var cp=Es();((Kn.prototype=Object.create(cp.prototype)).constructor=Kn).className="OneOf";var kk=Ia(),op=Mt();function Kn(e,t,n,r){if(Array.isArray(t)||(n=t,t=void 0),cp.call(this,e,n),!(t===void 0||Array.isArray(t)))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=r}Kn.fromJSON=function(t,n){return new Kn(t,n.oneof,n.options,n.comment)};Kn.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return op.toObject(["options",this.options,"oneof",this.oneof,"comment",n?this.comment:void 0])};function Bk(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}Kn.prototype.add=function(t){if(!(t instanceof kk))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,Bk(this),this};Kn.prototype.remove=function(t){if(!(t instanceof kk))throw TypeError("field must be a Field");var n=this.fieldsArray.indexOf(t);if(n<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(n,1),n=this.oneof.indexOf(t.name),n>-1&&this.oneof.splice(n,1),t.partOf=null,this};Kn.prototype.onAdd=function(t){cp.prototype.onAdd.call(this,t);for(var n=this,r=0;r<this.oneof.length;++r){var i=t.get(this.oneof[r]);i&&!i.partOf&&(i.partOf=n,n.fieldsArray.push(i))}Bk(this)};Kn.prototype.onRemove=function(t){for(var n=0,r;n<this.fieldsArray.length;++n)(r=this.fieldsArray[n]).parent&&r.parent.remove(r);cp.prototype.onRemove.call(this,t)};Kn.d=function(){for(var t=new Array(arguments.length),n=0;n<arguments.length;)t[n]=arguments[n++];return function(i,a){op.decorateType(i.constructor).add(new Kn(a,t)),Object.defineProperty(i,a,{get:op.oneOfGetter(t),set:op.oneOfSetter(t)})}}});var wu=N((dce,Fk)=>{"use strict";Fk.exports=Ue;var vb=Es();((Ue.prototype=Object.create(vb.prototype)).constructor=Ue).className="Namespace";var Pk=Ia(),up=Mt(),A5=yu(),bu,Ml,vu;Ue.fromJSON=function(t,n){return new Ue(t,n.options).addJSON(n.nested)};function Dk(e,t){if(e&&e.length){for(var n={},r=0;r<e.length;++r)n[e[r].name]=e[r].toJSON(t);return n}}Ue.arrayToJSON=Dk;Ue.isReservedId=function(t,n){if(t){for(var r=0;r<t.length;++r)if(typeof t[r]!="string"&&t[r][0]<=n&&t[r][1]>n)return!0}return!1};Ue.isReservedName=function(t,n){if(t){for(var r=0;r<t.length;++r)if(t[r]===n)return!0}return!1};function Ue(e,t){vb.call(this,e,t),this.nested=void 0,this._nestedArray=null}function Mk(e){return e._nestedArray=null,e}Object.defineProperty(Ue.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=up.toArray(this.nested))}});Ue.prototype.toJSON=function(t){return up.toObject(["options",this.options,"nested",Dk(this.nestedArray,t)])};Ue.prototype.addJSON=function(t){var n=this;if(t)for(var r=Object.keys(t),i=0,a;i<r.length;++i)a=t[r[i]],n.add((a.fields!==void 0?bu.fromJSON:a.values!==void 0?vu.fromJSON:a.methods!==void 0?Ml.fromJSON:a.id!==void 0?Pk.fromJSON:Ue.fromJSON)(r[i],a));return this};Ue.prototype.get=function(t){return this.nested&&this.nested[t]||null};Ue.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof vu)return this.nested[t].values;throw Error("no such enum: "+t)};Ue.prototype.add=function(t){if(!(t instanceof Pk&&t.extend!==void 0||t instanceof bu||t instanceof A5||t instanceof vu||t instanceof Ml||t instanceof Ue))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var n=this.get(t.name);if(n)if(n instanceof Ue&&t instanceof Ue&&!(n instanceof bu||n instanceof Ml)){for(var r=n.nestedArray,i=0;i<r.length;++i)t.add(r[i]);this.remove(n),this.nested||(this.nested={}),t.setOptions(n.options,!0)}else throw Error("duplicate name '"+t.name+"' in "+this)}return this.nested[t.name]=t,t.onAdd(this),Mk(this)};Ue.prototype.remove=function(t){if(!(t instanceof vb))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),Mk(this)};Ue.prototype.define=function(t,n){if(up.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&t[0]==="")throw Error("path must be relative");for(var r=this;t.length>0;){var i=t.shift();if(r.nested&&r.nested[i]){if(r=r.nested[i],!(r instanceof Ue))throw Error("path conflicts with non-namespace objects")}else r.add(r=new Ue(i))}return n&&r.addJSON(n),r};Ue.prototype.resolveAll=function(){for(var t=this.nestedArray,n=0;n<t.length;)t[n]instanceof Ue?t[n++].resolveAll():t[n++].resolve();return this.resolve()};Ue.prototype.lookup=function(t,n,r){if(typeof n=="boolean"?(r=n,n=void 0):n&&!Array.isArray(n)&&(n=[n]),up.isString(t)&&t.length){if(t===".")return this.root;t=t.split(".")}else if(!t.length)return this;if(t[0]==="")return this.root.lookup(t.slice(1),n);var i=this.get(t[0]);if(i){if(t.length===1){if(!n||n.indexOf(i.constructor)>-1)return i}else if(i instanceof Ue&&(i=i.lookup(t.slice(1),n,!0)))return i}else for(var a=0;a<this.nestedArray.length;++a)if(this._nestedArray[a]instanceof Ue&&(i=this._nestedArray[a].lookup(t,n,!0)))return i;return this.parent===null||r?null:this.parent.lookup(t,n)};Ue.prototype.lookupType=function(t){var n=this.lookup(t,[bu]);if(!n)throw Error("no such type: "+t);return n};Ue.prototype.lookupEnum=function(t){var n=this.lookup(t,[vu]);if(!n)throw Error("no such Enum '"+t+"' in "+this);return n};Ue.prototype.lookupTypeOrEnum=function(t){var n=this.lookup(t,[bu,vu]);if(!n)throw Error("no such Type or Enum '"+t+"' in "+this);return n};Ue.prototype.lookupService=function(t){var n=this.lookup(t,[Ml]);if(!n)throw Error("no such Service '"+t+"' in "+this);return n};Ue._configure=function(e,t,n){bu=e,Ml=t,vu=n}});var lp=N((fce,Lk)=>{"use strict";Lk.exports=Pi;var wb=Ia();((Pi.prototype=Object.create(wb.prototype)).constructor=Pi).className="MapField";var y5=ws(),Fl=Mt();function Pi(e,t,n,r,i,a){if(wb.call(this,e,t,r,void 0,void 0,i,a),!Fl.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}Pi.fromJSON=function(t,n){return new Pi(t,n.id,n.keyType,n.type,n.options,n.comment)};Pi.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return Fl.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",n?this.comment:void 0])};Pi.prototype.resolve=function(){if(this.resolved)return this;if(y5.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return wb.prototype.resolve.call(this)};Pi.d=function(t,n,r){return typeof r=="function"?r=Fl.decorateType(r).name:r&&typeof r=="object"&&(r=Fl.decorateEnum(r).name),function(a,s){Fl.decorateType(a.constructor).add(new Pi(s,t,n,r))}}});var dp=N((pce,Uk)=>{"use strict";Uk.exports=Cs;var Eb=Es();((Cs.prototype=Object.create(Eb.prototype)).constructor=Cs).className="Method";var Eu=Mt();function Cs(e,t,n,r,i,a,s,o,c){if(Eu.isObject(i)?(s=i,i=a=void 0):Eu.isObject(a)&&(s=a,a=void 0),!(t===void 0||Eu.isString(t)))throw TypeError("type must be a string");if(!Eu.isString(n))throw TypeError("requestType must be a string");if(!Eu.isString(r))throw TypeError("responseType must be a string");Eb.call(this,e,s),this.type=t||"rpc",this.requestType=n,this.requestStream=i?!0:void 0,this.responseType=r,this.responseStream=a?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=o,this.parsedOptions=c}Cs.fromJSON=function(t,n){return new Cs(t,n.type,n.requestType,n.responseType,n.requestStream,n.responseStream,n.options,n.comment,n.parsedOptions)};Cs.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return Eu.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",n?this.comment:void 0,"parsedOptions",this.parsedOptions])};Cs.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),Eb.prototype.resolve.call(this))}});var fp=N((hce,qk)=>{"use strict";qk.exports=jn;var Sa=wu();((jn.prototype=Object.create(Sa.prototype)).constructor=jn).className="Service";var Cb=dp(),Ll=Mt(),b5=iy();function jn(e,t){Sa.call(this,e,t),this.methods={},this._methodsArray=null}jn.fromJSON=function(t,n){var r=new jn(t,n.options);if(n.methods)for(var i=Object.keys(n.methods),a=0;a<i.length;++a)r.add(Cb.fromJSON(i[a],n.methods[i[a]]));return n.nested&&r.addJSON(n.nested),r.comment=n.comment,r};jn.prototype.toJSON=function(t){var n=Sa.prototype.toJSON.call(this,t),r=t?!!t.keepComments:!1;return Ll.toObject(["options",n&&n.options||void 0,"methods",Sa.arrayToJSON(this.methodsArray,t)||{},"nested",n&&n.nested||void 0,"comment",r?this.comment:void 0])};Object.defineProperty(jn.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=Ll.toArray(this.methods))}});function Qk(e){return e._methodsArray=null,e}jn.prototype.get=function(t){return this.methods[t]||Sa.prototype.get.call(this,t)};jn.prototype.resolveAll=function(){for(var t=this.methodsArray,n=0;n<t.length;++n)t[n].resolve();return Sa.prototype.resolve.call(this)};jn.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof Cb?(this.methods[t.name]=t,t.parent=this,Qk(this)):Sa.prototype.add.call(this,t)};jn.prototype.remove=function(t){if(t instanceof Cb){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,Qk(this)}return Sa.prototype.remove.call(this,t)};jn.prototype.create=function(t,n,r){for(var i=new b5.Service(t,n,r),a=0,s;a<this.methodsArray.length;++a){var o=Ll.lcFirst((s=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");i[o]=Ll.codegen(["r","c"],Ll.isReserved(o)?o+"_":o)("return this.rpcCall(m,q,s,r,c)")({m:s,q:s.resolvedRequestType.ctor,s:s.resolvedResponseType.ctor})}return i}});var pp=N((mce,Vk)=>{"use strict";Vk.exports=ai;var v5=Xr();function ai(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}ai.create=function(t){return this.$type.create(t)};ai.encode=function(t,n){return this.$type.encode(t,n)};ai.encodeDelimited=function(t,n){return this.$type.encodeDelimited(t,n)};ai.decode=function(t){return this.$type.decode(t)};ai.decodeDelimited=function(t){return this.$type.decodeDelimited(t)};ai.verify=function(t){return this.$type.verify(t)};ai.fromObject=function(t){return this.$type.fromObject(t)};ai.toObject=function(t,n){return this.$type.toObject(t,n)};ai.prototype.toJSON=function(){return this.$type.toObject(this,v5.toJSONOptions)}});var Ib=N((gce,zk)=>{"use strict";zk.exports=C5;var w5=Or(),Di=ws(),Jk=Mt();function E5(e){return"missing required '"+e.name+"'"}function C5(e){var t=Jk.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter(function(o){return o.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var n=0;n<e.fieldsArray.length;++n){var r=e._fieldsArray[n].resolve(),i=r.resolvedType instanceof w5?"int32":r.type,a="m"+Jk.safeProp(r.name);t("case %i: {",r.id),r.map?(t("if(%s===util.emptyObject)",a)("%s={}",a)("var c2 = r.uint32()+r.pos"),Di.defaults[r.keyType]!==void 0?t("k=%j",Di.defaults[r.keyType]):t("k=null"),Di.defaults[i]!==void 0?t("value=%j",Di.defaults[i]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),Di.basic[i]===void 0?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",i),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),Di.long[r.keyType]!==void 0?t('%s[typeof k==="object"?util.longToHash(k):k]=value',a):t("%s[k]=value",a)):r.repeated?(t("if(!(%s&&%s.length))",a,a)("%s=[]",a),Di.packed[i]!==void 0&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",a,i)("}else"),Di.basic[i]===void 0?t(r.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",a,n):t("%s.push(r.%s())",a,i)):Di.basic[i]===void 0?t(r.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",a,n):t("%s=r.%s()",a,i),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<e._fieldsArray.length;++n){var s=e._fieldsArray[n];s.required&&t("if(!m.hasOwnProperty(%j))",s.name)("throw util.ProtocolError(%j,{instance:m})",E5(s))}return t("return m")}});var Tb=N((_ce,Gk)=>{"use strict";Gk.exports=x5;var I5=Or(),Sb=Mt();function er(e,t){return e.name+": "+t+(e.repeated&&t!=="array"?"[]":e.map&&t!=="object"?"{k:"+e.keyType+"}":"")+" expected"}function xb(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof I5){e("switch(%s){",r)("default:")("return%j",er(t,"enum value"));for(var i=Object.keys(t.resolvedType.values),a=0;a<i.length;++a)e("case %i:",t.resolvedType.values[i[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",n,r)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",r)("return%j",er(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",r,r,r,r)("return%j",er(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',r)("return%j",er(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',r)("return%j",er(t,"boolean"));break;case"string":e("if(!util.isString(%s))",r)("return%j",er(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',r,r,r)("return%j",er(t,"buffer"));break}return e}function S5(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",n)("return%j",er(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",er(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",er(t,"boolean key"));break}return e}function x5(e){var t=Sb.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n=e.oneofsArray,r={};n.length&&t("var p={}");for(var i=0;i<e.fieldsArray.length;++i){var a=e._fieldsArray[i].resolve(),s="m"+Sb.safeProp(a.name);if(a.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",s,a.name),a.map)t("if(!util.isObject(%s))",s)("return%j",er(a,"object"))("var k=Object.keys(%s)",s)("for(var i=0;i<k.length;++i){"),S5(t,a,"k[i]"),xb(t,a,i,s+"[k[i]]")("}");else if(a.repeated)t("if(!Array.isArray(%s))",s)("return%j",er(a,"array"))("for(var i=0;i<%s.length;++i){",s),xb(t,a,i,s+"[i]")("}");else{if(a.partOf){var o=Sb.safeProp(a.partOf.name);r[a.partOf.name]===1&&t("if(p%s===1)",o)("return%j",a.partOf.name+": multiple values"),r[a.partOf.name]=1,t("p%s=1",o)}xb(t,a,i,s)}a.optional&&t("}")}return t("return null")}});var kb=N(Wk=>{"use strict";var Hk=Wk,Ul=Or(),si=Mt();function Nb(e,t,n,r){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof Ul){e("switch(d%s){",r);for(var a=t.resolvedType.values,s=Object.keys(a),o=0;o<s.length;++o)a[s[o]]===t.typeDefault&&!i&&(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',r,r,r),t.repeated||e("break"),i=!0),e("case%j:",s[o])("case %i:",a[s[o]])("m%s=%j",r,a[s[o]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r);break}}return e}Hk.fromObject=function(t){var n=t.fieldsArray,r=si.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!n.length)return r("return new this.ctor");r("var m=new this.ctor");for(var i=0;i<n.length;++i){var a=n[i].resolve(),s=si.safeProp(a.name);a.map?(r("if(d%s){",s)('if(typeof d%s!=="object")',s)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),Nb(r,a,i,s+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",s)("for(var i=0;i<d%s.length;++i){",s),Nb(r,a,i,s+"[i]")("}")("}")):(a.resolvedType instanceof Ul||r("if(d%s!=null){",s),Nb(r,a,i,s),a.resolvedType instanceof Ul||r("}"))}return r("return m")};function Rb(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof Ul?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r);break}}return e}Hk.toObject=function(t){var n=t.fieldsArray.slice().sort(si.compareFieldsById);if(!n.length)return si.codegen()("return {}");for(var r=si.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),i=[],a=[],s=[],o=0;o<n.length;++o)n[o].partOf||(n[o].resolve().repeated?i:n[o].map?a:s).push(n[o]);if(i.length){for(r("if(o.arrays||o.defaults){"),o=0;o<i.length;++o)r("d%s=[]",si.safeProp(i[o].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),o=0;o<a.length;++o)r("d%s={}",si.safeProp(a[o].name));r("}")}if(s.length){for(r("if(o.defaults){"),o=0;o<s.length;++o){var c=s[o],u=si.safeProp(c.name);if(c.resolvedType instanceof Ul)r("d%s=o.enums===String?%j:%j",u,c.resolvedType.valuesById[c.typeDefault],c.typeDefault);else if(c.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",c.typeDefault.low,c.typeDefault.high,c.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",u)("}else")("d%s=o.longs===String?%j:%i",u,c.typeDefault.toString(),c.typeDefault.toNumber());else if(c.bytes){var d="["+Array.prototype.slice.call(c.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",u,String.fromCharCode.apply(String,c.typeDefault))("else{")("d%s=%s",u,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",u,u)("}")}else r("d%s=%j",u,c.typeDefault)}r("}")}var p=!1;for(o=0;o<n.length;++o){var c=n[o],h=t._fieldsArray.indexOf(c),u=si.safeProp(c.name);c.map?(p||(p=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",u,u)("d%s={}",u)("for(var j=0;j<ks2.length;++j){"),Rb(r,c,h,u+"[ks2[j]]")("}")):c.repeated?(r("if(m%s&&m%s.length){",u,u)("d%s=[]",u)("for(var j=0;j<m%s.length;++j){",u),Rb(r,c,h,u+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",u,c.name),Rb(r,c,h,u),c.partOf&&r("if(o.oneofs)")("d%s=%j",si.safeProp(c.partOf.name),c.name)),r("}")}return r("return d")}});var Bb=N(Zk=>{"use strict";var T5=Zk,N5=pp();T5[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);if(n){var r=e["@type"].charAt(0)==="."?e["@type"].slice(1):e["@type"];return r.indexOf("/")===-1&&(r="/"+r),this.create({type_url:r,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="type.googleapis.com/",r="",i="";if(t&&t.json&&e.type_url&&e.value){i=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var a=this.lookup(i);a&&(e=a.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof N5){var s=e.$type.toObject(e,t),o=e.$type.fullName[0]==="."?e.$type.fullName.slice(1):e.$type.fullName;return r===""&&(r=n),i=r+o,s["@type"]=i,s}return this.toObject(e,t)}}});var gp=N((bce,Xk)=>{"use strict";Xk.exports=je;var Pr=wu();((je.prototype=Object.create(Pr.prototype)).constructor=je).className="Type";var R5=Or(),Db=yu(),hp=Ia(),k5=lp(),B5=fp(),Ob=pp(),Pb=vf(),O5=yf(),Kt=Mt(),P5=Mb(),D5=Ib(),M5=Tb(),Yk=kb(),F5=Bb();function je(e,t){Pr.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(je.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],r=n.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=n}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=Kt.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=Kt.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=je.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof Ob||((e.prototype=new Ob).constructor=e,Kt.merge(e.prototype,t)),e.$type=e.prototype.$type=this,Kt.merge(e,Ob,!0),this._ctor=e;for(var n=0;n<this.fieldsArray.length;++n)this._fieldsArray[n].resolve();var r={};for(n=0;n<this.oneofsArray.length;++n)r[this._oneofsArray[n].resolve().name]={get:Kt.oneOfGetter(this._oneofsArray[n].oneof),set:Kt.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}});je.generateConstructor=function(t){for(var n=Kt.codegen(["p"],t.name),r=0,i;r<t.fieldsArray.length;++r)(i=t._fieldsArray[r]).map?n("this%s={}",Kt.safeProp(i.name)):i.repeated&&n("this%s=[]",Kt.safeProp(i.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function mp(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}je.fromJSON=function(t,n){var r=new je(t,n.options);r.extensions=n.extensions,r.reserved=n.reserved;for(var i=Object.keys(n.fields),a=0;a<i.length;++a)r.add((typeof n.fields[i[a]].keyType<"u"?k5.fromJSON:hp.fromJSON)(i[a],n.fields[i[a]]));if(n.oneofs)for(i=Object.keys(n.oneofs),a=0;a<i.length;++a)r.add(Db.fromJSON(i[a],n.oneofs[i[a]]));if(n.nested)for(i=Object.keys(n.nested),a=0;a<i.length;++a){var s=n.nested[i[a]];r.add((s.id!==void 0?hp.fromJSON:s.fields!==void 0?je.fromJSON:s.values!==void 0?R5.fromJSON:s.methods!==void 0?B5.fromJSON:Pr.fromJSON)(i[a],s))}return n.extensions&&n.extensions.length&&(r.extensions=n.extensions),n.reserved&&n.reserved.length&&(r.reserved=n.reserved),n.group&&(r.group=!0),n.comment&&(r.comment=n.comment),r};je.prototype.toJSON=function(t){var n=Pr.prototype.toJSON.call(this,t),r=t?!!t.keepComments:!1;return Kt.toObject(["options",n&&n.options||void 0,"oneofs",Pr.arrayToJSON(this.oneofsArray,t),"fields",Pr.arrayToJSON(this.fieldsArray.filter(function(i){return!i.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",n&&n.nested||void 0,"comment",r?this.comment:void 0])};je.prototype.resolveAll=function(){for(var t=this.fieldsArray,n=0;n<t.length;)t[n++].resolve();var r=this.oneofsArray;for(n=0;n<r.length;)r[n++].resolve();return Pr.prototype.resolveAll.call(this)};je.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null};je.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof hp&&t.extend===void 0){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),mp(this)}return t instanceof Db?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),mp(this)):Pr.prototype.add.call(this,t)};je.prototype.remove=function(t){if(t instanceof hp&&t.extend===void 0){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),mp(this)}if(t instanceof Db){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),mp(this)}return Pr.prototype.remove.call(this,t)};je.prototype.isReservedId=function(t){return Pr.isReservedId(this.reserved,t)};je.prototype.isReservedName=function(t){return Pr.isReservedName(this.reserved,t)};je.prototype.create=function(t){return new this.ctor(t)};je.prototype.setup=function(){for(var t=this.fullName,n=[],r=0;r<this.fieldsArray.length;++r)n.push(this._fieldsArray[r].resolve().resolvedType);this.encode=P5(this)({Writer:O5,types:n,util:Kt}),this.decode=D5(this)({Reader:Pb,types:n,util:Kt}),this.verify=M5(this)({types:n,util:Kt}),this.fromObject=Yk.fromObject(this)({types:n,util:Kt}),this.toObject=Yk.toObject(this)({types:n,util:Kt});var i=F5[t];if(i){var a=Object.create(this);a.fromObject=this.fromObject,this.fromObject=i.fromObject.bind(a),a.toObject=this.toObject,this.toObject=i.toObject.bind(a)}return this};je.prototype.encode=function(t,n){return this.setup().encode(t,n)};je.prototype.encodeDelimited=function(t,n){return this.encode(t,n&&n.len?n.fork():n).ldelim()};je.prototype.decode=function(t,n){return this.setup().decode(t,n)};je.prototype.decodeDelimited=function(t){return t instanceof Pb||(t=Pb.create(t)),this.decode(t,t.uint32())};je.prototype.verify=function(t){return this.setup().verify(t)};je.prototype.fromObject=function(t){return this.setup().fromObject(t)};je.prototype.toObject=function(t,n){return this.setup().toObject(t,n)};je.d=function(t){return function(r){Kt.decorateType(r,t)}}});var yp=N((vce,tB)=>{"use strict";tB.exports=On;var Ap=wu();((On.prototype=Object.create(Ap.prototype)).constructor=On).className="Root";var Lb=Ia(),Kk=Or(),L5=yu(),xa=Mt(),jk,Fb,Ql;function On(e){Ap.call(this,"",e),this.deferred=[],this.files=[]}On.fromJSON=function(t,n){return n||(n=new On),t.options&&n.setOptions(t.options),n.addJSON(t.nested)};On.prototype.resolvePath=xa.path.resolve;On.prototype.fetch=xa.fetch;function eB(){}On.prototype.load=function e(t,n,r){typeof n=="function"&&(r=n,n=void 0);var i=this;if(!r)return xa.asPromise(e,i,t,n);var a=r===eB;function s(_,I){if(r){if(a)throw _;var v=r;r=null,v(_,I)}}function o(_){var I=_.lastIndexOf("google/protobuf/");if(I>-1){var v=_.substring(I);if(v in Ql)return v}return null}function c(_,I){try{if(xa.isString(I)&&I.charAt(0)==="{"&&(I=JSON.parse(I)),!xa.isString(I))i.setOptions(I.options).addJSON(I.nested);else{Fb.filename=_;var v=Fb(I,i,n),b,w=0;if(v.imports)for(;w<v.imports.length;++w)(b=o(v.imports[w])||i.resolvePath(_,v.imports[w]))&&u(b);if(v.weakImports)for(w=0;w<v.weakImports.length;++w)(b=o(v.weakImports[w])||i.resolvePath(_,v.weakImports[w]))&&u(b,!0)}}catch(x){s(x)}!a&&!d&&s(null,i)}function u(_,I){if(_=o(_)||_,!(i.files.indexOf(_)>-1)){if(i.files.push(_),_ in Ql){a?c(_,Ql[_]):(++d,setTimeout(function(){--d,c(_,Ql[_])}));return}if(a){var v;try{v=xa.fs.readFileSync(_).toString("utf8")}catch(b){I||s(b);return}c(_,v)}else++d,i.fetch(_,function(b,w){if(--d,!!r){if(b){I?d||s(null,i):s(b);return}c(_,w)}})}}var d=0;xa.isString(t)&&(t=[t]);for(var p=0,h;p<t.length;++p)(h=i.resolvePath("",t[p]))&&u(h);if(a)return i;d||s(null,i)};On.prototype.loadSync=function(t,n){if(!xa.isNode)throw Error("not supported");return this.load(t,n,eB)};On.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return Ap.prototype.resolveAll.call(this)};var _p=/^[A-Z]/;function $k(e,t){var n=t.parent.lookup(t.extend);if(n){var r=new Lb(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.get(r.name)||(r.declaringField=t,t.extensionField=r,n.add(r)),!0}return!1}On.prototype._handleAdd=function(t){if(t instanceof Lb)t.extend!==void 0&&!t.extensionField&&($k(this,t)||this.deferred.push(t));else if(t instanceof Kk)_p.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof L5)){if(t instanceof jk)for(var n=0;n<this.deferred.length;)$k(this,this.deferred[n])?this.deferred.splice(n,1):++n;for(var r=0;r<t.nestedArray.length;++r)this._handleAdd(t._nestedArray[r]);_p.test(t.name)&&(t.parent[t.name]=t)}};On.prototype._handleRemove=function(t){if(t instanceof Lb){if(t.extend!==void 0)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var n=this.deferred.indexOf(t);n>-1&&this.deferred.splice(n,1)}}else if(t instanceof Kk)_p.test(t.name)&&delete t.parent[t.name];else if(t instanceof Ap){for(var r=0;r<t.nestedArray.length;++r)this._handleRemove(t._nestedArray[r]);_p.test(t.name)&&delete t.parent[t.name]}};On._configure=function(e,t,n){jk=e,Fb=t,Ql=n}});var Mt=N((wce,rB)=>{"use strict";var gt=rB.exports=Xr(),nB=ay(),Ub,Qb;gt.codegen=vk();gt.fetch=Ek();gt.path=Sk();gt.fs=gt.inquire("fs");gt.toArray=function(t){if(t){for(var n=Object.keys(t),r=new Array(n.length),i=0;i<n.length;)r[i]=t[n[i++]];return r}return[]};gt.toObject=function(t){for(var n={},r=0;r<t.length;){var i=t[r++],a=t[r++];a!==void 0&&(n[i]=a)}return n};var U5=/\\/g,Q5=/"/g;gt.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)};gt.safeProp=function(t){return!/^[$\w_]+$/.test(t)||gt.isReserved(t)?'["'+t.replace(U5,"\\\\").replace(Q5,'\\"')+'"]':"."+t};gt.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var q5=/_([a-z])/g;gt.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(q5,function(n,r){return r.toUpperCase()})};gt.compareFieldsById=function(t,n){return t.id-n.id};gt.decorateType=function(t,n){if(t.$type)return n&&t.$type.name!==n&&(gt.decorateRoot.remove(t.$type),t.$type.name=n,gt.decorateRoot.add(t.$type)),t.$type;Ub||(Ub=gp());var r=new Ub(n||t.name);return gt.decorateRoot.add(r),r.ctor=t,Object.defineProperty(t,"$type",{value:r,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:r,enumerable:!1}),r};var V5=0;gt.decorateEnum=function(t){if(t.$type)return t.$type;Qb||(Qb=Or());var n=new Qb("Enum"+V5++,t);return gt.decorateRoot.add(n),Object.defineProperty(t,"$type",{value:n,enumerable:!1}),n};gt.setProperty=function(t,n,r){function i(a,s,o){var c=s.shift();if(c==="__proto__"||c==="prototype")return a;if(s.length>0)a[c]=i(a[c]||{},s,o);else{var u=a[c];u&&(o=[].concat(u).concat(o)),a[c]=o}return a}if(typeof t!="object")throw TypeError("dst must be an object");if(!n)throw TypeError("path must be specified");return n=n.split("."),i(t,n,r)};Object.defineProperty(gt,"decorateRoot",{get:function(){return nB.decorated||(nB.decorated=new(yp()))}})});var Es=N((Ece,iB)=>{"use strict";iB.exports=Pn;Pn.className="ReflectionObject";var bp=Mt(),vp;function Pn(e,t){if(!bp.isString(e))throw TypeError("name must be a string");if(t&&!bp.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(Pn.prototype,{root:{get:function(){for(var e=this;e.parent!==null;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}});Pn.prototype.toJSON=function(){throw Error()};Pn.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var n=t.root;n instanceof vp&&n._handleAdd(this)};Pn.prototype.onRemove=function(t){var n=t.root;n instanceof vp&&n._handleRemove(this),this.parent=null,this.resolved=!1};Pn.prototype.resolve=function(){return this.resolved?this:(this.root instanceof vp&&(this.resolved=!0),this)};Pn.prototype.getOption=function(t){if(this.options)return this.options[t]};Pn.prototype.setOption=function(t,n,r){return(!r||!this.options||this.options[t]===void 0)&&((this.options||(this.options={}))[t]=n),this};Pn.prototype.setParsedOption=function(t,n,r){this.parsedOptions||(this.parsedOptions=[]);var i=this.parsedOptions;if(r){var a=i.find(function(c){return Object.prototype.hasOwnProperty.call(c,t)});if(a){var s=a[t];bp.setProperty(s,r,n)}else a={},a[t]=bp.setProperty({},r,n),i.push(a)}else{var o={};o[t]=n,i.push(o)}return this};Pn.prototype.setOptions=function(t,n){if(t)for(var r=Object.keys(t),i=0;i<r.length;++i)this.setOption(r[i],t[r[i]],n);return this};Pn.prototype.toString=function(){var t=this.constructor.className,n=this.fullName;return n.length?t+" "+n:t};Pn._configure=function(e){vp=e}});var Or=N((Cce,oB)=>{"use strict";oB.exports=oi;var aB=Es();((oi.prototype=Object.create(aB.prototype)).constructor=oi).className="Enum";var sB=wu(),wp=Mt();function oi(e,t,n,r,i,a){if(aB.call(this,e,n),t&&typeof t!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=i||{},this.valuesOptions=a,this.reserved=void 0,t)for(var s=Object.keys(t),o=0;o<s.length;++o)typeof t[s[o]]=="number"&&(this.valuesById[this.values[s[o]]=t[s[o]]]=s[o])}oi.fromJSON=function(t,n){var r=new oi(t,n.values,n.options,n.comment,n.comments);return r.reserved=n.reserved,r};oi.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return wp.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",n?this.comment:void 0,"comments",n?this.comments:void 0])};oi.prototype.add=function(t,n,r,i){if(!wp.isString(t))throw TypeError("name must be a string");if(!wp.isInteger(n))throw TypeError("id must be an integer");if(this.values[t]!==void 0)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(n))throw Error("id "+n+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[n]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+n+" in "+this);this.values[t]=n}else this.valuesById[this.values[t]=n]=t;return i&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[t]=i||null),this.comments[t]=r||null,this};oi.prototype.remove=function(t){if(!wp.isString(t))throw TypeError("name must be a string");var n=this.values[t];if(n==null)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[n],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this};oi.prototype.isReservedId=function(t){return sB.isReservedId(this.reserved,t)};oi.prototype.isReservedName=function(t){return sB.isReservedName(this.reserved,t)}});var Mb=N((Ice,uB)=>{"use strict";uB.exports=z5;var J5=Or(),qb=ws(),Vb=Mt();function cB(e,t,n,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}function z5(e){for(var t=Vb.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),n,r,i=e.fieldsArray.slice().sort(Vb.compareFieldsById),n=0;n<i.length;++n){var a=i[n].resolve(),s=e._fieldsArray.indexOf(a),o=a.resolvedType instanceof J5?"int32":a.type,c=qb.basic[o];r="m"+Vb.safeProp(a.name),a.map?(t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",r,a.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(a.id<<3|2)>>>0,8|qb.mapKey[a.keyType],a.keyType),c===void 0?t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",s,r):t(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|c,o,r),t("}")("}")):a.repeated?(t("if(%s!=null&&%s.length){",r,r),a.packed&&qb.packed[o]!==void 0?t("w.uint32(%i).fork()",(a.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",o,r)("w.ldelim()"):(t("for(var i=0;i<%s.length;++i)",r),c===void 0?cB(t,a,s,r+"[i]"):t("w.uint32(%i).%s(%s[i])",(a.id<<3|c)>>>0,o,r)),t("}")):(a.optional&&t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",r,a.name),c===void 0?cB(t,a,s,r):t("w.uint32(%i).%s(%s)",(a.id<<3|c)>>>0,o,r))}return t("return w")}});var dB=N((Sce,lB)=>{"use strict";var Oe=lB.exports=sy();Oe.build="light";function G5(e,t,n){return typeof t=="function"?(n=t,t=new Oe.Root):t||(t=new Oe.Root),t.load(e,n)}Oe.load=G5;function H5(e,t){return t||(t=new Oe.Root),t.loadSync(e)}Oe.loadSync=H5;Oe.encoder=Mb();Oe.decoder=Ib();Oe.verifier=Tb();Oe.converter=kb();Oe.ReflectionObject=Es();Oe.Namespace=wu();Oe.Root=yp();Oe.Enum=Or();Oe.Type=gp();Oe.Field=Ia();Oe.OneOf=yu();Oe.MapField=lp();Oe.Service=fp();Oe.Method=dp();Oe.Message=pp();Oe.wrappers=Bb();Oe.types=ws();Oe.util=Mt();Oe.ReflectionObject._configure(Oe.Root);Oe.Namespace._configure(Oe.Type,Oe.Service,Oe.Enum);Oe.Root._configure(Oe.Type);Oe.Field._configure(Oe.Type)});var zb=N((xce,hB)=>{"use strict";hB.exports=pB;var Jb=/[\s{}=;:[\],'"()<>]/g,W5=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,Z5=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,Y5=/^ *[*/]+ */,X5=/^\s*\*?\/*/,$5=/\n/g,K5=/\s/,j5=/\\(.?)/g,eG={0:"\0",r:"\r",n:`
|
|
11
|
+
`,t:" "};function fB(e){return e.replace(j5,function(t,n){switch(n){case"\\":case"":return n;default:return eG[n]||""}})}pB.unescape=fB;function pB(e,t){e=e.toString();var n=0,r=e.length,i=1,a=0,s={},o=[],c=null;function u(k){return Error("illegal "+k+" (line "+i+")")}function d(){var k=c==="'"?Z5:W5;k.lastIndex=n-1;var q=k.exec(e);if(!q)throw u("string");return n=k.lastIndex,b(c),c=null,fB(q[1])}function p(k){return e.charAt(k)}function h(k,q,U){var V={type:e.charAt(k++),lineEmpty:!1,leading:U},Z;t?Z=2:Z=3;var X=k-Z,de;do if(--X<0||(de=e.charAt(X))===`
|
|
12
|
+
`){V.lineEmpty=!0;break}while(de===" "||de===" ");for(var O=e.substring(k,q).split($5),ie=0;ie<O.length;++ie)O[ie]=O[ie].replace(t?X5:Y5,"").trim();V.text=O.join(`
|
|
13
|
+
`).trim(),s[i]=V,a=i}function _(k){var q=I(k),U=e.substring(k,q),V=/^\s*\/\//.test(U);return V}function I(k){for(var q=k;q<r&&p(q)!==`
|
|
14
|
+
`;)q++;return q}function v(){if(o.length>0)return o.shift();if(c)return d();var k,q,U,V,Z,X=n===0;do{if(n===r)return null;for(k=!1;K5.test(U=p(n));)if(U===`
|
|
15
|
+
`&&(X=!0,++i),++n===r)return null;if(p(n)==="/"){if(++n===r)throw u("comment");if(p(n)==="/")if(t){if(V=n,Z=!1,_(n-1)){Z=!0;do if(n=I(n),n===r||(n++,!X))break;while(_(n))}else n=Math.min(r,I(n)+1);Z&&(h(V,n,X),X=!0),i++,k=!0}else{for(Z=p(V=n+1)==="/";p(++n)!==`
|
|
16
|
+
`;)if(n===r)return null;++n,Z&&(h(V,n-1,X),X=!0),++i,k=!0}else if((U=p(n))==="*"){V=n+1,Z=t||p(V)==="*";do{if(U===`
|
|
17
|
+
`&&++i,++n===r)throw u("comment");q=U,U=p(n)}while(q!=="*"||U!=="/");++n,Z&&(h(V,n-2,X),X=!0),k=!0}else return"/"}}while(k);var de=n;Jb.lastIndex=0;var O=Jb.test(p(de++));if(!O)for(;de<r&&!Jb.test(p(de));)++de;var ie=e.substring(n,n=de);return(ie==='"'||ie==="'")&&(c=ie),ie}function b(k){o.push(k)}function w(){if(!o.length){var k=v();if(k===null)return null;b(k)}return o[0]}function x(k,q){var U=w(),V=U===k;if(V)return v(),!0;if(!q)throw u("token '"+U+"', '"+k+"' expected");return!1}function R(k){var q=null,U;return k===void 0?(U=s[i-1],delete s[i-1],U&&(t||U.type==="*"||U.lineEmpty)&&(q=U.leading?U.text:null)):(a<k&&w(),U=s[k],delete s[k],U&&!U.lineEmpty&&(t||U.type==="/")&&(q=U.leading?null:U.text)),q}return Object.defineProperty({next:v,peek:w,push:b,skip:x,cmnt:R},"line",{get:function(){return i}})}});var bB=N((Tce,yB)=>{"use strict";yB.exports=Mi;Mi.filename=null;Mi.defaults={keepCase:!1};var tG=zb(),mB=yp(),gB=gp(),_B=Ia(),nG=lp(),AB=yu(),rG=Or(),iG=fp(),aG=dp(),Gb=ws(),Hb=Mt(),sG=/^[1-9][0-9]*$/,oG=/^-?[1-9][0-9]*$/,cG=/^0[x][0-9a-fA-F]+$/,uG=/^-?0[x][0-9a-fA-F]+$/,lG=/^0[0-7]+$/,dG=/^-?0[0-7]+$/,fG=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,ci=/^[a-zA-Z_][a-zA-Z_0-9]*$/,ui=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,pG=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function Mi(e,t,n){t instanceof mB||(n=t,t=new mB),n||(n=Mi.defaults);var r=n.preferTrailingComment||!1,i=tG(e,n.alternateCommentMode||!1),a=i.next,s=i.push,o=i.peek,c=i.skip,u=i.cmnt,d=!0,p,h,_,I,v=!1,b=t,w=n.keepCase?function(Q){return Q}:Hb.camelCase;function x(Q,J,H){var ae=Mi.filename;return H||(Mi.filename=null),Error("illegal "+(J||"token")+" '"+Q+"' ("+(ae?ae+", ":"")+"line "+i.line+")")}function R(){var Q=[],J;do{if((J=a())!=='"'&&J!=="'")throw x(J);Q.push(a()),c(J),J=o()}while(J==='"'||J==="'");return Q.join("")}function k(Q){var J=a();switch(J){case"'":case'"':return s(J),R();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return U(J,!0)}catch{if(Q&&ui.test(J))return J;throw x(J,"value")}}function q(Q,J){var H,ae;do J&&((H=o())==='"'||H==="'")?Q.push(R()):Q.push([ae=V(a()),c("to",!0)?V(a()):ae]);while(c(",",!0));var ee={options:void 0};ee.setOption=function(Ae,Ye){this.options===void 0&&(this.options={}),this.options[Ae]=Ye},ie(ee,function(Ye){if(Ye==="option")pe(ee,Ye),c(";");else throw x(Ye)},function(){We(ee)})}function U(Q,J){var H=1;switch(Q.charAt(0)==="-"&&(H=-1,Q=Q.substring(1)),Q){case"inf":case"INF":case"Inf":return H*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(sG.test(Q))return H*parseInt(Q,10);if(cG.test(Q))return H*parseInt(Q,16);if(lG.test(Q))return H*parseInt(Q,8);if(fG.test(Q))return H*parseFloat(Q);throw x(Q,"number",J)}function V(Q,J){switch(Q){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!J&&Q.charAt(0)==="-")throw x(Q,"id");if(oG.test(Q))return parseInt(Q,10);if(uG.test(Q))return parseInt(Q,16);if(dG.test(Q))return parseInt(Q,8);throw x(Q,"id")}function Z(){if(p!==void 0)throw x("package");if(p=a(),!ui.test(p))throw x(p,"name");b=b.define(p),c(";")}function X(){var Q=o(),J;switch(Q){case"weak":J=_||(_=[]),a();break;case"public":a();default:J=h||(h=[]);break}Q=R(),c(";"),J.push(Q)}function de(){if(c("="),I=R(),v=I==="proto3",!v&&I!=="proto2")throw x(I,"syntax");c(";")}function O(Q,J){switch(J){case"option":return pe(Q,J),c(";"),!0;case"message":return F(Q,J),!0;case"enum":return ne(Q,J),!0;case"service":return Ze(Q,J),!0;case"extend":return Lr(Q,J),!0}return!1}function ie(Q,J,H){var ae=i.line;if(Q&&(typeof Q.comment!="string"&&(Q.comment=u()),Q.filename=Mi.filename),c("{",!0)){for(var ee;(ee=a())!=="}";)J(ee);c(";",!0)}else H&&H(),c(";"),Q&&(typeof Q.comment!="string"||r)&&(Q.comment=u(ae)||Q.comment)}function F(Q,J){if(!ci.test(J=a()))throw x(J,"type name");var H=new gB(J);ie(H,function(ee){if(!O(H,ee))switch(ee){case"map":z(H,ee);break;case"required":case"repeated":g(H,ee);break;case"optional":v?g(H,"proto3_optional"):g(H,"optional");break;case"oneof":K(H,ee);break;case"extensions":q(H.extensions||(H.extensions=[]));break;case"reserved":q(H.reserved||(H.reserved=[]),!0);break;default:if(!v||!ui.test(ee))throw x(ee);s(ee),g(H,"optional");break}}),Q.add(H)}function g(Q,J,H){var ae=a();if(ae==="group"){B(Q,J);return}for(;ae.endsWith(".")||o().startsWith(".");)ae+=a();if(!ui.test(ae))throw x(ae,"type");var ee=a();if(!ci.test(ee))throw x(ee,"name");ee=w(ee),c("=");var Ae=new _B(ee,V(a()),ae,J,H);if(ie(Ae,function(En){if(En==="option")pe(Ae,En),c(";");else throw x(En)},function(){We(Ae)}),J==="proto3_optional"){var Ye=new AB("_"+ee);Ae.setOption("proto3_optional",!0),Ye.add(Ae),Q.add(Ye)}else Q.add(Ae);!v&&Ae.repeated&&(Gb.packed[ae]!==void 0||Gb.basic[ae]===void 0)&&Ae.setOption("packed",!1,!0)}function B(Q,J){var H=a();if(!ci.test(H))throw x(H,"name");var ae=Hb.lcFirst(H);H===ae&&(H=Hb.ucFirst(H)),c("=");var ee=V(a()),Ae=new gB(H);Ae.group=!0;var Ye=new _B(ae,ee,H,J);Ye.filename=Mi.filename,ie(Ae,function(En){switch(En){case"option":pe(Ae,En),c(";");break;case"required":case"repeated":g(Ae,En);break;case"optional":v?g(Ae,"proto3_optional"):g(Ae,"optional");break;case"message":F(Ae,En);break;case"enum":ne(Ae,En);break;default:throw x(En)}}),Q.add(Ae).add(Ye)}function z(Q){c("<");var J=a();if(Gb.mapKey[J]===void 0)throw x(J,"type");c(",");var H=a();if(!ui.test(H))throw x(H,"type");c(">");var ae=a();if(!ci.test(ae))throw x(ae,"name");c("=");var ee=new nG(w(ae),V(a()),J,H);ie(ee,function(Ye){if(Ye==="option")pe(ee,Ye),c(";");else throw x(Ye)},function(){We(ee)}),Q.add(ee)}function K(Q,J){if(!ci.test(J=a()))throw x(J,"name");var H=new AB(w(J));ie(H,function(ee){ee==="option"?(pe(H,ee),c(";")):(s(ee),g(H,"optional"))}),Q.add(H)}function ne(Q,J){if(!ci.test(J=a()))throw x(J,"name");var H=new rG(J);ie(H,function(ee){switch(ee){case"option":pe(H,ee),c(";");break;case"reserved":q(H.reserved||(H.reserved=[]),!0);break;default:he(H,ee)}}),Q.add(H)}function he(Q,J){if(!ci.test(J))throw x(J,"name");c("=");var H=V(a(),!0),ae={options:void 0};ae.setOption=function(ee,Ae){this.options===void 0&&(this.options={}),this.options[ee]=Ae},ie(ae,function(Ae){if(Ae==="option")pe(ae,Ae),c(";");else throw x(Ae)},function(){We(ae)}),Q.add(J,H,ae.comment,ae.options)}function pe(Q,J){var H=c("(",!0);if(!ui.test(J=a()))throw x(J,"name");var ae=J,ee=ae,Ae;H&&(c(")"),ae="("+ae+")",ee=ae,J=o(),pG.test(J)&&(Ae=J.slice(1),ae+=J,a())),c("=");var Ye=Ie(Q,ae);Be(Q,ee,Ye,Ae)}function Ie(Q,J){if(c("{",!0)){for(var H={};!c("}",!0);){if(!ci.test(rt=a()))throw x(rt,"name");if(rt===null)throw x(rt,"end of input");var ae,ee=rt;if(c(":",!0),o()==="{")ae=Ie(Q,J+"."+rt);else if(o()==="["){ae=[];var Ae;if(c("[",!0)){do Ae=k(!0),ae.push(Ae);while(c(",",!0));c("]"),typeof Ae<"u"&&Fe(Q,J+"."+rt,Ae)}}else ae=k(!0),Fe(Q,J+"."+rt,ae);var Ye=H[ee];Ye&&(ae=[].concat(Ye).concat(ae)),H[ee]=ae,c(",",!0),c(";",!0)}return H}var Ji=k(!0);return Fe(Q,J,Ji),Ji}function Fe(Q,J,H){Q.setOption&&Q.setOption(J,H)}function Be(Q,J,H,ae){Q.setParsedOption&&Q.setParsedOption(J,H,ae)}function We(Q){if(c("[",!0)){do pe(Q,"option");while(c(",",!0));c("]")}return Q}function Ze(Q,J){if(!ci.test(J=a()))throw x(J,"service name");var H=new iG(J);ie(H,function(ee){if(!O(H,ee))if(ee==="rpc")nt(H,ee);else throw x(ee)}),Q.add(H)}function nt(Q,J){var H=u(),ae=J;if(!ci.test(J=a()))throw x(J,"name");var ee=J,Ae,Ye,Ji,En;if(c("("),c("stream",!0)&&(Ye=!0),!ui.test(J=a())||(Ae=J,c(")"),c("returns"),c("("),c("stream",!0)&&(En=!0),!ui.test(J=a())))throw x(J);Ji=J,c(")");var md=new aG(ee,ae,Ae,Ji,Ye,En);md.comment=H,ie(md,function(Yh){if(Yh==="option")pe(md,Yh),c(";");else throw x(Yh)}),Q.add(md)}function Lr(Q,J){if(!ui.test(J=a()))throw x(J,"reference");var H=J;ie(null,function(ee){switch(ee){case"required":case"repeated":g(Q,ee,H);break;case"optional":v?g(Q,"proto3_optional",H):g(Q,"optional",H);break;default:if(!v||!ui.test(ee))throw x(ee);s(ee),g(Q,"optional",H);break}})}for(var rt;(rt=a())!==null;)switch(rt){case"package":if(!d)throw x(rt);Z();break;case"import":if(!d)throw x(rt);X();break;case"syntax":if(!d)throw x(rt);de();break;case"option":pe(b,rt),c(";");break;default:if(O(b,rt)){d=!1;continue}throw x(rt)}return Mi.filename=null,{package:p,imports:h,weakImports:_,syntax:I,root:t}}});var EB=N((Nce,wB)=>{"use strict";wB.exports=Dr;var hG=/\/|\./;function Dr(e,t){hG.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),Dr[e]=t}Dr("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var vB;Dr("duration",{Duration:vB={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});Dr("timestamp",{Timestamp:vB});Dr("empty",{Empty:{fields:{}}});Dr("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});Dr("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});Dr("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});Dr.get=function(t){return Dr[t]||null}});var IB=N((Rce,CB)=>{"use strict";var Ta=CB.exports=dB();Ta.build="full";Ta.tokenize=zb();Ta.parse=bB();Ta.common=EB();Ta.Root._configure(Ta.Type,Ta.parse,Ta.common)});var Ep=N((kce,SB)=>{"use strict";SB.exports=IB()});var Wb=N((Bce,mG)=>{mG.exports={nested:{google:{nested:{protobuf:{nested:{FileDescriptorSet:{fields:{file:{rule:"repeated",type:"FileDescriptorProto",id:1}}},FileDescriptorProto:{fields:{name:{type:"string",id:1},package:{type:"string",id:2},dependency:{rule:"repeated",type:"string",id:3},publicDependency:{rule:"repeated",type:"int32",id:10,options:{packed:!1}},weakDependency:{rule:"repeated",type:"int32",id:11,options:{packed:!1}},messageType:{rule:"repeated",type:"DescriptorProto",id:4},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:5},service:{rule:"repeated",type:"ServiceDescriptorProto",id:6},extension:{rule:"repeated",type:"FieldDescriptorProto",id:7},options:{type:"FileOptions",id:8},sourceCodeInfo:{type:"SourceCodeInfo",id:9},syntax:{type:"string",id:12}}},DescriptorProto:{fields:{name:{type:"string",id:1},field:{rule:"repeated",type:"FieldDescriptorProto",id:2},extension:{rule:"repeated",type:"FieldDescriptorProto",id:6},nestedType:{rule:"repeated",type:"DescriptorProto",id:3},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:4},extensionRange:{rule:"repeated",type:"ExtensionRange",id:5},oneofDecl:{rule:"repeated",type:"OneofDescriptorProto",id:8},options:{type:"MessageOptions",id:7},reservedRange:{rule:"repeated",type:"ReservedRange",id:9},reservedName:{rule:"repeated",type:"string",id:10}},nested:{ExtensionRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}},ReservedRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}}}},FieldDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:3},label:{type:"Label",id:4},type:{type:"Type",id:5},typeName:{type:"string",id:6},extendee:{type:"string",id:2},defaultValue:{type:"string",id:7},oneofIndex:{type:"int32",id:9},jsonName:{type:"string",id:10},options:{type:"FieldOptions",id:8}},nested:{Type:{values:{TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Label:{values:{LABEL_OPTIONAL:1,LABEL_REQUIRED:2,LABEL_REPEATED:3}}}},OneofDescriptorProto:{fields:{name:{type:"string",id:1},options:{type:"OneofOptions",id:2}}},EnumDescriptorProto:{fields:{name:{type:"string",id:1},value:{rule:"repeated",type:"EnumValueDescriptorProto",id:2},options:{type:"EnumOptions",id:3}}},EnumValueDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{type:"EnumValueOptions",id:3}}},ServiceDescriptorProto:{fields:{name:{type:"string",id:1},method:{rule:"repeated",type:"MethodDescriptorProto",id:2},options:{type:"ServiceOptions",id:3}}},MethodDescriptorProto:{fields:{name:{type:"string",id:1},inputType:{type:"string",id:2},outputType:{type:"string",id:3},options:{type:"MethodOptions",id:4},clientStreaming:{type:"bool",id:5},serverStreaming:{type:"bool",id:6}}},FileOptions:{fields:{javaPackage:{type:"string",id:1},javaOuterClassname:{type:"string",id:8},javaMultipleFiles:{type:"bool",id:10},javaGenerateEqualsAndHash:{type:"bool",id:20,options:{deprecated:!0}},javaStringCheckUtf8:{type:"bool",id:27},optimizeFor:{type:"OptimizeMode",id:9,options:{default:"SPEED"}},goPackage:{type:"string",id:11},ccGenericServices:{type:"bool",id:16},javaGenericServices:{type:"bool",id:17},pyGenericServices:{type:"bool",id:18},deprecated:{type:"bool",id:23},ccEnableArenas:{type:"bool",id:31},objcClassPrefix:{type:"string",id:36},csharpNamespace:{type:"string",id:37},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[38,38]],nested:{OptimizeMode:{values:{SPEED:1,CODE_SIZE:2,LITE_RUNTIME:3}}}},MessageOptions:{fields:{messageSetWireFormat:{type:"bool",id:1},noStandardDescriptorAccessor:{type:"bool",id:2},deprecated:{type:"bool",id:3},mapEntry:{type:"bool",id:7},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[8,8]]},FieldOptions:{fields:{ctype:{type:"CType",id:1,options:{default:"STRING"}},packed:{type:"bool",id:2},jstype:{type:"JSType",id:6,options:{default:"JS_NORMAL"}},lazy:{type:"bool",id:5},deprecated:{type:"bool",id:3},weak:{type:"bool",id:10},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[4,4]],nested:{CType:{values:{STRING:0,CORD:1,STRING_PIECE:2}},JSType:{values:{JS_NORMAL:0,JS_STRING:1,JS_NUMBER:2}}}},OneofOptions:{fields:{uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumOptions:{fields:{allowAlias:{type:"bool",id:2},deprecated:{type:"bool",id:3},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumValueOptions:{fields:{deprecated:{type:"bool",id:1},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},ServiceOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},MethodOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},UninterpretedOption:{fields:{name:{rule:"repeated",type:"NamePart",id:2},identifierValue:{type:"string",id:3},positiveIntValue:{type:"uint64",id:4},negativeIntValue:{type:"int64",id:5},doubleValue:{type:"double",id:6},stringValue:{type:"bytes",id:7},aggregateValue:{type:"string",id:8}},nested:{NamePart:{fields:{namePart:{rule:"required",type:"string",id:1},isExtension:{rule:"required",type:"bool",id:2}}}}},SourceCodeInfo:{fields:{location:{rule:"repeated",type:"Location",id:1}},nested:{Location:{fields:{path:{rule:"repeated",type:"int32",id:1},span:{rule:"repeated",type:"int32",id:2},leadingComments:{type:"string",id:3},trailingComments:{type:"string",id:4},leadingDetachedComments:{rule:"repeated",type:"string",id:6}}}}},GeneratedCodeInfo:{fields:{annotation:{rule:"repeated",type:"Annotation",id:1}},nested:{Annotation:{fields:{path:{rule:"repeated",type:"int32",id:1},sourceFile:{type:"string",id:2},begin:{type:"int32",id:3},end:{type:"int32",id:4}}}}}}}}}}}});var kB=N((Te,RB)=>{"use strict";var sn=Ep();RB.exports=Te=sn.descriptor=sn.Root.fromJSON(Wb()).lookup(".google.protobuf");var xB=sn.Namespace,ql=sn.Root,Fi=sn.Enum,Na=sn.Type,Ra=sn.Field,gG=sn.MapField,Cp=sn.OneOf,Vl=sn.Service,Ip=sn.Method;ql.fromDescriptor=function(t){typeof t.length=="number"&&(t=Te.FileDescriptorSet.decode(t));var n=new ql;if(t.file)for(var r,i,a=0,s;a<t.file.length;++a){if(i=n,(r=t.file[a]).package&&r.package.length&&(i=n.define(r.package)),r.name&&r.name.length&&n.files.push(i.filename=r.name),r.messageType)for(s=0;s<r.messageType.length;++s)i.add(Na.fromDescriptor(r.messageType[s],r.syntax));if(r.enumType)for(s=0;s<r.enumType.length;++s)i.add(Fi.fromDescriptor(r.enumType[s]));if(r.extension)for(s=0;s<r.extension.length;++s)i.add(Ra.fromDescriptor(r.extension[s]));if(r.service)for(s=0;s<r.service.length;++s)i.add(Vl.fromDescriptor(r.service[s]));var o=Cu(r.options,Te.FileOptions);if(o){var c=Object.keys(o);for(s=0;s<c.length;++s)i.setOption(c[s],o[c[s]])}}return n};ql.prototype.toDescriptor=function(t){var n=Te.FileDescriptorSet.create();return TB(this,n.file,t),n};function TB(e,t,n){var r=Te.FileDescriptorProto.create({name:e.filename||(e.fullName.substring(1).replace(/\./g,"_")||"root")+".proto"});n&&(r.syntax=n),e instanceof ql||(r.package=e.fullName.substring(1));for(var i=0,a;i<e.nestedArray.length;++i)(a=e._nestedArray[i])instanceof Na?r.messageType.push(a.toDescriptor(n)):a instanceof Fi?r.enumType.push(a.toDescriptor()):a instanceof Ra?r.extension.push(a.toDescriptor(n)):a instanceof Vl?r.service.push(a.toDescriptor()):a instanceof xB&&TB(a,t,n);r.options=Iu(e.options,Te.FileOptions),r.messageType.length+r.enumType.length+r.extension.length+r.service.length&&t.push(r)}var _G=0;Na.fromDescriptor=function(t,n){typeof t.length=="number"&&(t=Te.DescriptorProto.decode(t));var r=new Na(t.name.length?t.name:"Type"+_G++,Cu(t.options,Te.MessageOptions)),i;if(t.oneofDecl)for(i=0;i<t.oneofDecl.length;++i)r.add(Cp.fromDescriptor(t.oneofDecl[i]));if(t.field)for(i=0;i<t.field.length;++i){var a=Ra.fromDescriptor(t.field[i],n);r.add(a),t.field[i].hasOwnProperty("oneofIndex")&&r.oneofsArray[t.field[i].oneofIndex].add(a)}if(t.extension)for(i=0;i<t.extension.length;++i)r.add(Ra.fromDescriptor(t.extension[i],n));if(t.nestedType)for(i=0;i<t.nestedType.length;++i)r.add(Na.fromDescriptor(t.nestedType[i],n)),t.nestedType[i].options&&t.nestedType[i].options.mapEntry&&r.setOption("map_entry",!0);if(t.enumType)for(i=0;i<t.enumType.length;++i)r.add(Fi.fromDescriptor(t.enumType[i]));if(t.extensionRange&&t.extensionRange.length)for(r.extensions=[],i=0;i<t.extensionRange.length;++i)r.extensions.push([t.extensionRange[i].start,t.extensionRange[i].end]);if(t.reservedRange&&t.reservedRange.length||t.reservedName&&t.reservedName.length){if(r.reserved=[],t.reservedRange)for(i=0;i<t.reservedRange.length;++i)r.reserved.push([t.reservedRange[i].start,t.reservedRange[i].end]);if(t.reservedName)for(i=0;i<t.reservedName.length;++i)r.reserved.push(t.reservedName[i])}return r};Na.prototype.toDescriptor=function(t){var n=Te.DescriptorProto.create({name:this.name}),r;for(r=0;r<this.fieldsArray.length;++r){var i;if(n.field.push(i=this._fieldsArray[r].toDescriptor(t)),this._fieldsArray[r]instanceof gG){var a=Zb(this._fieldsArray[r].keyType,this._fieldsArray[r].resolvedKeyType),s=Zb(this._fieldsArray[r].type,this._fieldsArray[r].resolvedType),o=s===11||s===14?this._fieldsArray[r].resolvedType&&NB(this.parent,this._fieldsArray[r].resolvedType)||this._fieldsArray[r].type:void 0;n.nestedType.push(Te.DescriptorProto.create({name:i.typeName,field:[Te.FieldDescriptorProto.create({name:"key",number:1,label:1,type:a}),Te.FieldDescriptorProto.create({name:"value",number:2,label:1,type:s,typeName:o})],options:Te.MessageOptions.create({mapEntry:!0})}))}}for(r=0;r<this.oneofsArray.length;++r)n.oneofDecl.push(this._oneofsArray[r].toDescriptor());for(r=0;r<this.nestedArray.length;++r)this._nestedArray[r]instanceof Ra?n.field.push(this._nestedArray[r].toDescriptor(t)):this._nestedArray[r]instanceof Na?n.nestedType.push(this._nestedArray[r].toDescriptor(t)):this._nestedArray[r]instanceof Fi&&n.enumType.push(this._nestedArray[r].toDescriptor());if(this.extensions)for(r=0;r<this.extensions.length;++r)n.extensionRange.push(Te.DescriptorProto.ExtensionRange.create({start:this.extensions[r][0],end:this.extensions[r][1]}));if(this.reserved)for(r=0;r<this.reserved.length;++r)typeof this.reserved[r]=="string"?n.reservedName.push(this.reserved[r]):n.reservedRange.push(Te.DescriptorProto.ReservedRange.create({start:this.reserved[r][0],end:this.reserved[r][1]}));return n.options=Iu(this.options,Te.MessageOptions),n};var AG=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;Ra.fromDescriptor=function(t,n){if(typeof t.length=="number"&&(t=Te.DescriptorProto.decode(t)),typeof t.number!="number")throw Error("missing field id");var r;t.typeName&&t.typeName.length?r=t.typeName:r=EG(t.type);var i;switch(t.label){case 1:i=void 0;break;case 2:i="required";break;case 3:i="repeated";break;default:throw Error("illegal label: "+t.label)}var a=t.extendee;t.extendee!==void 0&&(a=a.length?a:void 0);var s=new Ra(t.name.length?t.name:"field"+t.number,t.number,r,i,a);if(s.options=Cu(t.options,Te.FieldOptions),t.defaultValue&&t.defaultValue.length){var o=t.defaultValue;switch(o){case"true":case"TRUE":o=!0;break;case"false":case"FALSE":o=!1;break;default:var c=AG.exec(o);c&&(o=parseInt(o));break}s.setOption("default",o)}return CG(t.type)&&(n==="proto3"?t.options&&!t.options.packed&&s.setOption("packed",!1):t.options&&t.options.packed||s.setOption("packed",!1)),s};Ra.prototype.toDescriptor=function(t){var n=Te.FieldDescriptorProto.create({name:this.name,number:this.id});if(this.map)n.type=11,n.typeName=sn.util.ucFirst(this.name),n.label=3;else{switch(n.type=Zb(this.type,this.resolve().resolvedType)){case 10:case 11:case 14:n.typeName=this.resolvedType?NB(this.parent,this.resolvedType):this.type;break}switch(this.rule){case"repeated":n.label=3;break;case"required":n.label=2;break;default:n.label=1;break}}if(n.extendee=this.extensionField?this.extensionField.parent.fullName:this.extend,this.partOf&&(n.oneofIndex=this.parent.oneofsArray.indexOf(this.partOf))<0)throw Error("missing oneof");return this.options&&(n.options=Iu(this.options,Te.FieldOptions),this.options.default!=null&&(n.defaultValue=String(this.options.default))),t==="proto3"?this.packed||((n.options||(n.options=Te.FieldOptions.create())).packed=!1):this.packed&&((n.options||(n.options=Te.FieldOptions.create())).packed=!0),n};var yG=0;Fi.fromDescriptor=function(t){typeof t.length=="number"&&(t=Te.EnumDescriptorProto.decode(t));var n={};if(t.value)for(var r=0;r<t.value.length;++r){var i=t.value[r].name,a=t.value[r].number||0;n[i&&i.length?i:"NAME"+a]=a}return new Fi(t.name&&t.name.length?t.name:"Enum"+yG++,n,Cu(t.options,Te.EnumOptions))};Fi.prototype.toDescriptor=function(){for(var t=[],n=0,r=Object.keys(this.values);n<r.length;++n)t.push(Te.EnumValueDescriptorProto.create({name:r[n],number:this.values[r[n]]}));return Te.EnumDescriptorProto.create({name:this.name,value:t,options:Iu(this.options,Te.EnumOptions)})};var bG=0;Cp.fromDescriptor=function(t){return typeof t.length=="number"&&(t=Te.OneofDescriptorProto.decode(t)),new Cp(t.name&&t.name.length?t.name:"oneof"+bG++)};Cp.prototype.toDescriptor=function(){return Te.OneofDescriptorProto.create({name:this.name})};var vG=0;Vl.fromDescriptor=function(t){typeof t.length=="number"&&(t=Te.ServiceDescriptorProto.decode(t));var n=new Vl(t.name&&t.name.length?t.name:"Service"+vG++,Cu(t.options,Te.ServiceOptions));if(t.method)for(var r=0;r<t.method.length;++r)n.add(Ip.fromDescriptor(t.method[r]));return n};Vl.prototype.toDescriptor=function(){for(var t=[],n=0;n<this.methodsArray.length;++n)t.push(this._methodsArray[n].toDescriptor());return Te.ServiceDescriptorProto.create({name:this.name,method:t,options:Iu(this.options,Te.ServiceOptions)})};var wG=0;Ip.fromDescriptor=function(t){return typeof t.length=="number"&&(t=Te.MethodDescriptorProto.decode(t)),new Ip(t.name&&t.name.length?t.name:"Method"+wG++,"rpc",t.inputType,t.outputType,!!t.clientStreaming,!!t.serverStreaming,Cu(t.options,Te.MethodOptions))};Ip.prototype.toDescriptor=function(){return Te.MethodDescriptorProto.create({name:this.name,inputType:this.resolvedRequestType?this.resolvedRequestType.fullName:this.requestType,outputType:this.resolvedResponseType?this.resolvedResponseType.fullName:this.responseType,clientStreaming:this.requestStream,serverStreaming:this.responseStream,options:Iu(this.options,Te.MethodOptions)})};function EG(e){switch(e){case 1:return"double";case 2:return"float";case 3:return"int64";case 4:return"uint64";case 5:return"int32";case 6:return"fixed64";case 7:return"fixed32";case 8:return"bool";case 9:return"string";case 12:return"bytes";case 13:return"uint32";case 15:return"sfixed32";case 16:return"sfixed64";case 17:return"sint32";case 18:return"sint64"}throw Error("illegal type: "+e)}function CG(e){switch(e){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 13:case 14:case 15:case 16:case 17:case 18:return!0}return!1}function Zb(e,t){switch(e){case"double":return 1;case"float":return 2;case"int64":return 3;case"uint64":return 4;case"int32":return 5;case"fixed64":return 6;case"fixed32":return 7;case"bool":return 8;case"string":return 9;case"bytes":return 12;case"uint32":return 13;case"sfixed32":return 15;case"sfixed64":return 16;case"sint32":return 17;case"sint64":return 18}if(t instanceof Fi)return 14;if(t instanceof Na)return t.group?10:11;throw Error("illegal type: "+e)}function Cu(e,t){if(e){for(var n=[],r=0,i,a,s;r<t.fieldsArray.length;++r)(a=(i=t._fieldsArray[r]).name)!=="uninterpretedOption"&&e.hasOwnProperty(a)&&(s=e[a],i.resolvedType instanceof Fi&&typeof s=="number"&&i.resolvedType.valuesById[s]!==void 0&&(s=i.resolvedType.valuesById[s]),n.push(IG(a),s));return n.length?sn.util.toObject(n):void 0}}function Iu(e,t){if(e){for(var n=[],r=0,i=Object.keys(e),a,s;r<i.length;++r)if(s=e[a=i[r]],a!=="default"){var o=t.fields[a];!o&&!(o=t.fields[a=sn.util.camelCase(a)])||n.push(a,s)}return n.length?t.fromObject(sn.util.toObject(n)):void 0}}function NB(e,t){var n=e.fullName.split("."),r=t.fullName.split("."),i=0,a=0,s=r.length-1;if(!(e instanceof ql)&&t instanceof xB)for(;i<n.length&&a<s&&n[i]===r[a];){var o=t.lookup(n[i++],!0);if(o!==null&&o!==t)break;++a}else for(;i<n.length&&a<s&&n[i]===r[a];++i,++a);return r.slice(a).join(".")}function IG(e){return e.substring(0,1)+e.substring(1).replace(/([A-Z])(?=[a-z]|$)/g,function(t,n){return"_"+n.toLowerCase()})}});var BB=N((Oce,SG)=>{SG.exports={nested:{google:{nested:{protobuf:{nested:{Api:{fields:{name:{type:"string",id:1},methods:{rule:"repeated",type:"Method",id:2},options:{rule:"repeated",type:"Option",id:3},version:{type:"string",id:4},sourceContext:{type:"SourceContext",id:5},mixins:{rule:"repeated",type:"Mixin",id:6},syntax:{type:"Syntax",id:7}}},Method:{fields:{name:{type:"string",id:1},requestTypeUrl:{type:"string",id:2},requestStreaming:{type:"bool",id:3},responseTypeUrl:{type:"string",id:4},responseStreaming:{type:"bool",id:5},options:{rule:"repeated",type:"Option",id:6},syntax:{type:"Syntax",id:7}}},Mixin:{fields:{name:{type:"string",id:1},root:{type:"string",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}}}}}}}}});var OB=N((Pce,xG)=>{xG.exports={nested:{google:{nested:{protobuf:{nested:{SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var PB=N((Dce,TG)=>{TG.exports={nested:{google:{nested:{protobuf:{nested:{Type:{fields:{name:{type:"string",id:1},fields:{rule:"repeated",type:"Field",id:2},oneofs:{rule:"repeated",type:"string",id:3},options:{rule:"repeated",type:"Option",id:4},sourceContext:{type:"SourceContext",id:5},syntax:{type:"Syntax",id:6}}},Field:{fields:{kind:{type:"Kind",id:1},cardinality:{type:"Cardinality",id:2},number:{type:"int32",id:3},name:{type:"string",id:4},typeUrl:{type:"string",id:6},oneofIndex:{type:"int32",id:7},packed:{type:"bool",id:8},options:{rule:"repeated",type:"Option",id:9},jsonName:{type:"string",id:10},defaultValue:{type:"string",id:11}},nested:{Kind:{values:{TYPE_UNKNOWN:0,TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Cardinality:{values:{CARDINALITY_UNKNOWN:0,CARDINALITY_OPTIONAL:1,CARDINALITY_REQUIRED:2,CARDINALITY_REPEATED:3}}}},Enum:{fields:{name:{type:"string",id:1},enumvalue:{rule:"repeated",type:"EnumValue",id:2},options:{rule:"repeated",type:"Option",id:3},sourceContext:{type:"SourceContext",id:4},syntax:{type:"Syntax",id:5}}},EnumValue:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{rule:"repeated",type:"Option",id:3}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}},Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var LB=N(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.addCommonProtos=ka.loadProtosWithOptionsSync=ka.loadProtosWithOptions=void 0;var DB=ye("fs"),MB=ye("path"),Su=Ep();function FB(e,t){let n=e.resolvePath;e.resolvePath=(r,i)=>{if(MB.isAbsolute(i))return i;for(let a of t){let s=MB.join(a,i);try{return DB.accessSync(s,DB.constants.R_OK),s}catch{continue}}return process.emitWarning(`${i} not found in any of the include paths ${t}`),n(r,i)}}async function NG(e,t){let n=new Su.Root;if(t=t||{},t.includeDirs){if(!Array.isArray(t.includeDirs))return Promise.reject(new Error("The includeDirs option must be an array"));FB(n,t.includeDirs)}let r=await n.load(e,t);return r.resolveAll(),r}ka.loadProtosWithOptions=NG;function RG(e,t){let n=new Su.Root;if(t=t||{},t.includeDirs){if(!Array.isArray(t.includeDirs))throw new Error("The includeDirs option must be an array");FB(n,t.includeDirs)}let r=n.loadSync(e,t);return r.resolveAll(),r}ka.loadProtosWithOptionsSync=RG;function kG(){let e=BB(),t=Wb(),n=OB(),r=PB();Su.common("api",e.nested.google.nested.protobuf.nested),Su.common("descriptor",t.nested.google.nested.protobuf.nested),Su.common("source_context",n.nested.google.nested.protobuf.nested),Su.common("type",r.nested.google.nested.protobuf.nested)}ka.addCommonProtos=kG});var qB=N((QB,Yb)=>{var UB=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function n(F,g,B){this.low=F|0,this.high=g|0,this.unsigned=!!B}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0});function r(F){return(F&&F.__isLong__)===!0}function i(F){var g=Math.clz32(F&-F);return F?31-g:g}n.isLong=r;var a={},s={};function o(F,g){var B,z,K;return g?(F>>>=0,(K=0<=F&&F<256)&&(z=s[F],z)?z:(B=u(F,0,!0),K&&(s[F]=B),B)):(F|=0,(K=-128<=F&&F<128)&&(z=a[F],z)?z:(B=u(F,F<0?-1:0,!1),K&&(a[F]=B),B))}n.fromInt=o;function c(F,g){if(isNaN(F))return g?k:R;if(g){if(F<0)return k;if(F>=b)return X}else{if(F<=-w)return de;if(F+1>=w)return Z}return F<0?c(-F,g).neg():u(F%v|0,F/v|0,g)}n.fromNumber=c;function u(F,g,B){return new n(F,g,B)}n.fromBits=u;var d=Math.pow;function p(F,g,B){if(F.length===0)throw Error("empty string");if(typeof g=="number"?(B=g,g=!1):g=!!g,F==="NaN"||F==="Infinity"||F==="+Infinity"||F==="-Infinity")return g?k:R;if(B=B||10,B<2||36<B)throw RangeError("radix");var z;if((z=F.indexOf("-"))>0)throw Error("interior hyphen");if(z===0)return p(F.substring(1),g,B).neg();for(var K=c(d(B,8)),ne=R,he=0;he<F.length;he+=8){var pe=Math.min(8,F.length-he),Ie=parseInt(F.substring(he,he+pe),B);if(pe<8){var Fe=c(d(B,pe));ne=ne.mul(Fe).add(c(Ie))}else ne=ne.mul(K),ne=ne.add(c(Ie))}return ne.unsigned=g,ne}n.fromString=p;function h(F,g){return typeof F=="number"?c(F,g):typeof F=="string"?p(F,g):u(F.low,F.high,typeof g=="boolean"?g:F.unsigned)}n.fromValue=h;var _=65536,I=1<<24,v=_*_,b=v*v,w=b/2,x=o(I),R=o(0);n.ZERO=R;var k=o(0,!0);n.UZERO=k;var q=o(1);n.ONE=q;var U=o(1,!0);n.UONE=U;var V=o(-1);n.NEG_ONE=V;var Z=u(-1,2147483647,!1);n.MAX_VALUE=Z;var X=u(-1,-1,!0);n.MAX_UNSIGNED_VALUE=X;var de=u(0,-2147483648,!1);n.MIN_VALUE=de;var O=n.prototype;O.toInt=function(){return this.unsigned?this.low>>>0:this.low},O.toNumber=function(){return this.unsigned?(this.high>>>0)*v+(this.low>>>0):this.high*v+(this.low>>>0)},O.toString=function(g){if(g=g||10,g<2||36<g)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(de)){var B=c(g),z=this.div(B),K=z.mul(B).sub(this);return z.toString(g)+K.toInt().toString(g)}else return"-"+this.neg().toString(g);for(var ne=c(d(g,6),this.unsigned),he=this,pe="";;){var Ie=he.div(ne),Fe=he.sub(Ie.mul(ne)).toInt()>>>0,Be=Fe.toString(g);if(he=Ie,he.isZero())return Be+pe;for(;Be.length<6;)Be="0"+Be;pe=""+Be+pe}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(de)?64:this.neg().getNumBitsAbs();for(var g=this.high!=0?this.high:this.low,B=31;B>0&&!(g&1<<B);B--);return this.high!=0?B+33:B+1},O.isZero=function(){return this.high===0&&this.low===0},O.eqz=O.isZero,O.isNegative=function(){return!this.unsigned&&this.high<0},O.isPositive=function(){return this.unsigned||this.high>=0},O.isOdd=function(){return(this.low&1)===1},O.isEven=function(){return(this.low&1)===0},O.equals=function(g){return r(g)||(g=h(g)),this.unsigned!==g.unsigned&&this.high>>>31===1&&g.high>>>31===1?!1:this.high===g.high&&this.low===g.low},O.eq=O.equals,O.notEquals=function(g){return!this.eq(g)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(g){return this.comp(g)<0},O.lt=O.lessThan,O.lessThanOrEqual=function(g){return this.comp(g)<=0},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(g){return this.comp(g)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(g){return this.comp(g)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(g){if(r(g)||(g=h(g)),this.eq(g))return 0;var B=this.isNegative(),z=g.isNegative();return B&&!z?-1:!B&&z?1:this.unsigned?g.high>>>0>this.high>>>0||g.high===this.high&&g.low>>>0>this.low>>>0?-1:1:this.sub(g).isNegative()?-1:1},O.comp=O.compare,O.negate=function(){return!this.unsigned&&this.eq(de)?de:this.not().add(q)},O.neg=O.negate,O.add=function(g){r(g)||(g=h(g));var B=this.high>>>16,z=this.high&65535,K=this.low>>>16,ne=this.low&65535,he=g.high>>>16,pe=g.high&65535,Ie=g.low>>>16,Fe=g.low&65535,Be=0,We=0,Ze=0,nt=0;return nt+=ne+Fe,Ze+=nt>>>16,nt&=65535,Ze+=K+Ie,We+=Ze>>>16,Ze&=65535,We+=z+pe,Be+=We>>>16,We&=65535,Be+=B+he,Be&=65535,u(Ze<<16|nt,Be<<16|We,this.unsigned)},O.subtract=function(g){return r(g)||(g=h(g)),this.add(g.neg())},O.sub=O.subtract,O.multiply=function(g){if(this.isZero())return this;if(r(g)||(g=h(g)),t){var B=t.mul(this.low,this.high,g.low,g.high);return u(B,t.get_high(),this.unsigned)}if(g.isZero())return this.unsigned?k:R;if(this.eq(de))return g.isOdd()?de:R;if(g.eq(de))return this.isOdd()?de:R;if(this.isNegative())return g.isNegative()?this.neg().mul(g.neg()):this.neg().mul(g).neg();if(g.isNegative())return this.mul(g.neg()).neg();if(this.lt(x)&&g.lt(x))return c(this.toNumber()*g.toNumber(),this.unsigned);var z=this.high>>>16,K=this.high&65535,ne=this.low>>>16,he=this.low&65535,pe=g.high>>>16,Ie=g.high&65535,Fe=g.low>>>16,Be=g.low&65535,We=0,Ze=0,nt=0,Lr=0;return Lr+=he*Be,nt+=Lr>>>16,Lr&=65535,nt+=ne*Be,Ze+=nt>>>16,nt&=65535,nt+=he*Fe,Ze+=nt>>>16,nt&=65535,Ze+=K*Be,We+=Ze>>>16,Ze&=65535,Ze+=ne*Fe,We+=Ze>>>16,Ze&=65535,Ze+=he*Ie,We+=Ze>>>16,Ze&=65535,We+=z*Be+K*Fe+ne*Ie+he*pe,We&=65535,u(nt<<16|Lr,We<<16|Ze,this.unsigned)},O.mul=O.multiply,O.divide=function(g){if(r(g)||(g=h(g)),g.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&g.low===-1&&g.high===-1)return this;var B=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,g.low,g.high);return u(B,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?k:R;var z,K,ne;if(this.unsigned){if(g.unsigned||(g=g.toUnsigned()),g.gt(this))return k;if(g.gt(this.shru(1)))return U;ne=k}else{if(this.eq(de)){if(g.eq(q)||g.eq(V))return de;if(g.eq(de))return q;var he=this.shr(1);return z=he.div(g).shl(1),z.eq(R)?g.isNegative()?q:V:(K=this.sub(g.mul(z)),ne=z.add(K.div(g)),ne)}else if(g.eq(de))return this.unsigned?k:R;if(this.isNegative())return g.isNegative()?this.neg().div(g.neg()):this.neg().div(g).neg();if(g.isNegative())return this.div(g.neg()).neg();ne=R}for(K=this;K.gte(g);){z=Math.max(1,Math.floor(K.toNumber()/g.toNumber()));for(var pe=Math.ceil(Math.log(z)/Math.LN2),Ie=pe<=48?1:d(2,pe-48),Fe=c(z),Be=Fe.mul(g);Be.isNegative()||Be.gt(K);)z-=Ie,Fe=c(z,this.unsigned),Be=Fe.mul(g);Fe.isZero()&&(Fe=q),ne=ne.add(Fe),K=K.sub(Be)}return ne},O.div=O.divide,O.modulo=function(g){if(r(g)||(g=h(g)),t){var B=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,g.low,g.high);return u(B,t.get_high(),this.unsigned)}return this.sub(this.div(g).mul(g))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return u(~this.low,~this.high,this.unsigned)},O.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},O.clz=O.countLeadingZeros,O.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},O.ctz=O.countTrailingZeros,O.and=function(g){return r(g)||(g=h(g)),u(this.low&g.low,this.high&g.high,this.unsigned)},O.or=function(g){return r(g)||(g=h(g)),u(this.low|g.low,this.high|g.high,this.unsigned)},O.xor=function(g){return r(g)||(g=h(g)),u(this.low^g.low,this.high^g.high,this.unsigned)},O.shiftLeft=function(g){return r(g)&&(g=g.toInt()),(g&=63)===0?this:g<32?u(this.low<<g,this.high<<g|this.low>>>32-g,this.unsigned):u(0,this.low<<g-32,this.unsigned)},O.shl=O.shiftLeft,O.shiftRight=function(g){return r(g)&&(g=g.toInt()),(g&=63)===0?this:g<32?u(this.low>>>g|this.high<<32-g,this.high>>g,this.unsigned):u(this.high>>g-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(g){return r(g)&&(g=g.toInt()),(g&=63)===0?this:g<32?u(this.low>>>g|this.high<<32-g,this.high>>>g,this.unsigned):g===32?u(this.high,0,this.unsigned):u(this.high>>>g-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.rotateLeft=function(g){var B;return r(g)&&(g=g.toInt()),(g&=63)===0?this:g===32?u(this.high,this.low,this.unsigned):g<32?(B=32-g,u(this.low<<g|this.high>>>B,this.high<<g|this.low>>>B,this.unsigned)):(g-=32,B=32-g,u(this.high<<g|this.low>>>B,this.low<<g|this.high>>>B,this.unsigned))},O.rotl=O.rotateLeft,O.rotateRight=function(g){var B;return r(g)&&(g=g.toInt()),(g&=63)===0?this:g===32?u(this.high,this.low,this.unsigned):g<32?(B=32-g,u(this.high<<B|this.low>>>g,this.low<<B|this.high>>>g,this.unsigned)):(g-=32,B=32-g,u(this.low<<B|this.high>>>g,this.high<<B|this.low>>>g,this.unsigned))},O.rotr=O.rotateRight,O.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},O.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},O.toBytes=function(g){return g?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var g=this.high,B=this.low;return[B&255,B>>>8&255,B>>>16&255,B>>>24,g&255,g>>>8&255,g>>>16&255,g>>>24]},O.toBytesBE=function(){var g=this.high,B=this.low;return[g>>>24,g>>>16&255,g>>>8&255,g&255,B>>>24,B>>>16&255,B>>>8&255,B&255]},n.fromBytes=function(g,B,z){return z?n.fromBytesLE(g,B):n.fromBytesBE(g,B)},n.fromBytesLE=function(g,B){return new n(g[0]|g[1]<<8|g[2]<<16|g[3]<<24,g[4]|g[5]<<8|g[6]<<16|g[7]<<24,B)},n.fromBytesBE=function(g,B){return new n(g[4]<<24|g[5]<<16|g[6]<<8|g[7],g[0]<<24|g[1]<<16|g[2]<<8|g[3],B)};var ie=n;return e.default=ie,"default"in e?e.default:e}({});typeof define=="function"&&define.amd?define([],function(){return UB}):typeof Yb=="object"&&typeof QB=="object"&&(Yb.exports=UB)});var ZB=N(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.loadFileDescriptorSetFromObject=Et.loadFileDescriptorSetFromBuffer=Et.fromJSON=Et.loadSync=Et.load=Et.IdempotencyLevel=Et.isAnyExtension=Et.Long=void 0;var BG=yk(),li=Ep(),$b=kB(),Kb=LB(),OG=qB();Et.Long=OG;function PG(e){return"@type"in e&&typeof e["@type"]=="string"}Et.isAnyExtension=PG;var zB;(function(e){e.IDEMPOTENCY_UNKNOWN="IDEMPOTENCY_UNKNOWN",e.NO_SIDE_EFFECTS="NO_SIDE_EFFECTS",e.IDEMPOTENT="IDEMPOTENT"})(zB=Et.IdempotencyLevel||(Et.IdempotencyLevel={}));var GB={longs:String,enums:String,bytes:String,defaults:!0,oneofs:!0,json:!0};function DG(e,t){return e===""?t:e+"."+t}function MG(e){return e instanceof li.Service||e instanceof li.Type||e instanceof li.Enum}function FG(e){return e instanceof li.Namespace||e instanceof li.Root}function HB(e,t){let n=DG(t,e.name);return MG(e)?[[n,e]]:FG(e)&&typeof e.nested<"u"?Object.keys(e.nested).map(r=>HB(e.nested[r],n)).reduce((r,i)=>r.concat(i),[]):[]}function VB(e,t){return function(r){return e.toObject(e.decode(r),t)}}function JB(e){return function(n){if(Array.isArray(n))throw new Error(`Failed to serialize message: expected object with ${e.name} structure, got array instead`);let r=e.fromObject(n);return e.encode(r).finish()}}function LG(e){return(e||[]).reduce((t,n)=>{for(let[r,i]of Object.entries(n))switch(r){case"uninterpreted_option":t.uninterpreted_option.push(n.uninterpreted_option);break;default:t[r]=i}return t},{deprecated:!1,idempotency_level:zB.IDEMPOTENCY_UNKNOWN,uninterpreted_option:[]})}function UG(e,t,n,r){let i=e.resolvedRequestType,a=e.resolvedResponseType;return{path:"/"+t+"/"+e.name,requestStream:!!e.requestStream,responseStream:!!e.responseStream,requestSerialize:JB(i),requestDeserialize:VB(i,n),responseSerialize:JB(a),responseDeserialize:VB(a,n),originalName:BG(e.name),requestType:Xb(i,r),responseType:Xb(a,r),options:LG(e.parsedOptions)}}function QG(e,t,n,r){let i={};for(let a of e.methodsArray)i[a.name]=UG(a,t,n,r);return i}function Xb(e,t){let n=e.toDescriptor("proto3");return{format:"Protocol Buffer 3 DescriptorProto",type:n.$type.toObject(n,GB),fileDescriptorProtos:t}}function qG(e,t){let n=e.toDescriptor("proto3");return{format:"Protocol Buffer 3 EnumDescriptorProto",type:n.$type.toObject(n,GB),fileDescriptorProtos:t}}function VG(e,t,n,r){if(e instanceof li.Service)return QG(e,t,n,r);if(e instanceof li.Type)return Xb(e,r);if(e instanceof li.Enum)return qG(e,r);throw new Error("Type mismatch in reflection object handling")}function Sp(e,t){let n={};e.resolveAll();let i=e.toDescriptor("proto3").file.map(a=>Buffer.from($b.FileDescriptorProto.encode(a).finish()));for(let[a,s]of HB(e,""))n[a]=VG(s,a,t,i);return n}function WB(e,t){t=t||{};let n=li.Root.fromDescriptor(e);return n.resolveAll(),Sp(n,t)}function JG(e,t){return(0,Kb.loadProtosWithOptions)(e,t).then(n=>Sp(n,t))}Et.load=JG;function zG(e,t){let n=(0,Kb.loadProtosWithOptionsSync)(e,t);return Sp(n,t)}Et.loadSync=zG;function GG(e,t){t=t||{};let n=li.Root.fromJSON(e);return n.resolveAll(),Sp(n,t)}Et.fromJSON=GG;function HG(e,t){let n=$b.FileDescriptorSet.decode(e);return WB(n,t)}Et.loadFileDescriptorSetFromBuffer=HG;function WG(e,t){let n=$b.FileDescriptorSet.fromObject(e);return WB(n,t)}Et.loadFileDescriptorSetFromObject=WG;(0,Kb.addCommonProtos)()});var Ss=N(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.setup=Ve.getChannelzServiceDefinition=Ve.getChannelzHandlers=Ve.unregisterChannelzRef=Ve.registerChannelzSocket=Ve.registerChannelzServer=Ve.registerChannelzSubchannel=Ve.registerChannelzChannel=Ve.ChannelzCallTrackerStub=Ve.ChannelzCallTracker=Ve.ChannelzChildrenTrackerStub=Ve.ChannelzChildrenTracker=Ve.ChannelzTrace=Ve.ChannelzTraceStub=void 0;var YB=ye("net"),Is=(qR(),ar(QR)),Jl=Wn(),zl=Me(),ZG=kr(),YG=jf(),XG=db();function jb(e){return{channel_id:e.id,name:e.name}}function iv(e){return{subchannel_id:e.id,name:e.name}}function $G(e){return{server_id:e.id}}function Rp(e){return{socket_id:e.id,name:e.name}}var XB=32,av=100,ev=class{constructor(){this.events=[],this.creationTimestamp=new Date,this.eventsLogged=0}addTrace(){}getTraceMessage(){return{creation_timestamp:di(this.creationTimestamp),num_events_logged:this.eventsLogged,events:[]}}};Ve.ChannelzTraceStub=ev;var tv=class{constructor(){this.events=[],this.eventsLogged=0,this.creationTimestamp=new Date}addTrace(t,n,r){let i=new Date;this.events.push({description:n,severity:t,timestamp:i,childChannel:r?.kind==="channel"?r:void 0,childSubchannel:r?.kind==="subchannel"?r:void 0}),this.events.length>=XB*2&&(this.events=this.events.slice(XB)),this.eventsLogged+=1}getTraceMessage(){return{creation_timestamp:di(this.creationTimestamp),num_events_logged:this.eventsLogged,events:this.events.map(t=>({description:t.description,severity:t.severity,timestamp:di(t.timestamp),channel_ref:t.childChannel?jb(t.childChannel):null,subchannel_ref:t.childSubchannel?iv(t.childSubchannel):null}))}}};Ve.ChannelzTrace=tv;var Tp=class{constructor(){this.channelChildren=new Is.OrderedMap,this.subchannelChildren=new Is.OrderedMap,this.socketChildren=new Is.OrderedMap,this.trackerMap={channel:this.channelChildren,subchannel:this.subchannelChildren,socket:this.socketChildren}}refChild(t){let n=this.trackerMap[t.kind],r=n.find(t.id);r.equals(n.end())?n.setElement(t.id,{ref:t,count:1},r):r.pointer[1].count+=1}unrefChild(t){let n=this.trackerMap[t.kind],r=n.getElementByKey(t.id);r!==void 0&&(r.count-=1,r.count===0&&n.eraseElementByKey(t.id))}getChildLists(){return{channels:this.channelChildren,subchannels:this.subchannelChildren,sockets:this.socketChildren}}};Ve.ChannelzChildrenTracker=Tp;var nv=class extends Tp{refChild(){}unrefChild(){}};Ve.ChannelzChildrenTrackerStub=nv;var Np=class{constructor(){this.callsStarted=0,this.callsSucceeded=0,this.callsFailed=0,this.lastCallStartedTimestamp=null}addCallStarted(){this.callsStarted+=1,this.lastCallStartedTimestamp=new Date}addCallSucceeded(){this.callsSucceeded+=1}addCallFailed(){this.callsFailed+=1}};Ve.ChannelzCallTracker=Np;var rv=class extends Np{addCallStarted(){}addCallSucceeded(){}addCallFailed(){}};Ve.ChannelzCallTrackerStub=rv;var Li={channel:new Is.OrderedMap,subchannel:new Is.OrderedMap,server:new Is.OrderedMap,socket:new Is.OrderedMap},kp=e=>{let t=1;function n(){return t++}let r=Li[e];return(i,a,s)=>{let o=n(),c={id:o,name:i,kind:e};return s&&r.setElement(o,{ref:c,getInfo:a}),c}};Ve.registerChannelzChannel=kp("channel");Ve.registerChannelzSubchannel=kp("subchannel");Ve.registerChannelzServer=kp("server");Ve.registerChannelzSocket=kp("socket");function KG(e){Li[e.kind].eraseElementByKey(e.id)}Ve.unregisterChannelzRef=KG;function jG(e){let t=Number.parseInt(e,16);return[t/256|0,t%256]}function $B(e){if(e==="")return[];let t=e.split(":").map(r=>jG(r));return[].concat(...t)}function e7(e){if((0,YB.isIPv4)(e))return Buffer.from(Uint8Array.from(e.split(".").map(t=>Number.parseInt(t))));if((0,YB.isIPv6)(e)){let t,n,r=e.indexOf("::");r===-1?(t=e,n=""):(t=e.substring(0,r),n=e.substring(r+2));let i=Buffer.from($B(t)),a=Buffer.from($B(n)),s=Buffer.alloc(16-i.length-a.length,0);return Buffer.concat([i,s,a])}else return null}function jB(e){switch(e){case Jl.ConnectivityState.CONNECTING:return{state:"CONNECTING"};case Jl.ConnectivityState.IDLE:return{state:"IDLE"};case Jl.ConnectivityState.READY:return{state:"READY"};case Jl.ConnectivityState.SHUTDOWN:return{state:"SHUTDOWN"};case Jl.ConnectivityState.TRANSIENT_FAILURE:return{state:"TRANSIENT_FAILURE"};default:return{state:"UNKNOWN"}}}function di(e){if(!e)return null;let t=e.getTime();return{seconds:t/1e3|0,nanos:t%1e3*1e6}}function eO(e){let t=e.getInfo(),n=[],r=[];return t.children.channels.forEach(i=>{n.push(jb(i[1].ref))}),t.children.subchannels.forEach(i=>{r.push(iv(i[1].ref))}),{ref:jb(e.ref),data:{target:t.target,state:jB(t.state),calls_started:t.callTracker.callsStarted,calls_succeeded:t.callTracker.callsSucceeded,calls_failed:t.callTracker.callsFailed,last_call_started_timestamp:di(t.callTracker.lastCallStartedTimestamp),trace:t.trace.getTraceMessage()},channel_ref:n,subchannel_ref:r}}function t7(e,t){let n=parseInt(e.request.channel_id,10),r=Li.channel.getElementByKey(n);if(r===void 0){t({code:zl.Status.NOT_FOUND,details:"No channel data found for id "+n});return}t(null,{channel:eO(r)})}function n7(e,t){let n=parseInt(e.request.max_results,10)||av,r=[],i=parseInt(e.request.start_channel_id,10),a=Li.channel,s;for(s=a.lowerBound(i);!s.equals(a.end())&&r.length<n;s=s.next())r.push(eO(s.pointer[1]));t(null,{channel:r,end:s.equals(a.end())})}function tO(e){let t=e.getInfo(),n=[];return t.listenerChildren.sockets.forEach(r=>{n.push(Rp(r[1].ref))}),{ref:$G(e.ref),data:{calls_started:t.callTracker.callsStarted,calls_succeeded:t.callTracker.callsSucceeded,calls_failed:t.callTracker.callsFailed,last_call_started_timestamp:di(t.callTracker.lastCallStartedTimestamp),trace:t.trace.getTraceMessage()},listen_socket:n}}function r7(e,t){let n=parseInt(e.request.server_id,10),i=Li.server.getElementByKey(n);if(i===void 0){t({code:zl.Status.NOT_FOUND,details:"No server data found for id "+n});return}t(null,{server:tO(i)})}function i7(e,t){let n=parseInt(e.request.max_results,10)||av,r=parseInt(e.request.start_server_id,10),i=Li.server,a=[],s;for(s=i.lowerBound(r);!s.equals(i.end())&&a.length<n;s=s.next())a.push(tO(s.pointer[1]));t(null,{server:a,end:s.equals(i.end())})}function a7(e,t){let n=parseInt(e.request.subchannel_id,10),r=Li.subchannel.getElementByKey(n);if(r===void 0){t({code:zl.Status.NOT_FOUND,details:"No subchannel data found for id "+n});return}let i=r.getInfo(),a=[];i.children.sockets.forEach(o=>{a.push(Rp(o[1].ref))});let s={ref:iv(r.ref),data:{target:i.target,state:jB(i.state),calls_started:i.callTracker.callsStarted,calls_succeeded:i.callTracker.callsSucceeded,calls_failed:i.callTracker.callsFailed,last_call_started_timestamp:di(i.callTracker.lastCallStartedTimestamp),trace:i.trace.getTraceMessage()},socket_ref:a};t(null,{subchannel:s})}function KB(e){var t;return(0,ZG.isTcpSubchannelAddress)(e)?{address:"tcpip_address",tcpip_address:{ip_address:(t=e7(e.host))!==null&&t!==void 0?t:void 0,port:e.port}}:{address:"uds_address",uds_address:{filename:e.path}}}function s7(e,t){var n,r,i,a,s;let o=parseInt(e.request.socket_id,10),c=Li.socket.getElementByKey(o);if(c===void 0){t({code:zl.Status.NOT_FOUND,details:"No socket data found for id "+o});return}let u=c.getInfo(),d=u.security?{model:"tls",tls:{cipher_suite:u.security.cipherSuiteStandardName?"standard_name":"other_name",standard_name:(n=u.security.cipherSuiteStandardName)!==null&&n!==void 0?n:void 0,other_name:(r=u.security.cipherSuiteOtherName)!==null&&r!==void 0?r:void 0,local_certificate:(i=u.security.localCertificate)!==null&&i!==void 0?i:void 0,remote_certificate:(a=u.security.remoteCertificate)!==null&&a!==void 0?a:void 0}}:null,p={ref:Rp(c.ref),local:u.localAddress?KB(u.localAddress):null,remote:u.remoteAddress?KB(u.remoteAddress):null,remote_name:(s=u.remoteName)!==null&&s!==void 0?s:void 0,security:d,data:{keep_alives_sent:u.keepAlivesSent,streams_started:u.streamsStarted,streams_succeeded:u.streamsSucceeded,streams_failed:u.streamsFailed,last_local_stream_created_timestamp:di(u.lastLocalStreamCreatedTimestamp),last_remote_stream_created_timestamp:di(u.lastRemoteStreamCreatedTimestamp),messages_received:u.messagesReceived,messages_sent:u.messagesSent,last_message_received_timestamp:di(u.lastMessageReceivedTimestamp),last_message_sent_timestamp:di(u.lastMessageSentTimestamp),local_flow_control_window:u.localFlowControlWindow?{value:u.localFlowControlWindow}:null,remote_flow_control_window:u.remoteFlowControlWindow?{value:u.remoteFlowControlWindow}:null}};t(null,{socket:p})}function o7(e,t){let n=parseInt(e.request.server_id,10),r=Li.server.getElementByKey(n);if(r===void 0){t({code:zl.Status.NOT_FOUND,details:"No server data found for id "+n});return}let i=parseInt(e.request.start_socket_id,10),a=parseInt(e.request.max_results,10)||av,o=r.getInfo().sessionChildren.sockets,c=[],u;for(u=o.lowerBound(i);!u.equals(o.end())&&c.length<a;u=u.next())c.push(Rp(u.pointer[1].ref));t(null,{socket_ref:c,end:u.equals(o.end())})}function nO(){return{GetChannel:t7,GetTopChannels:n7,GetServer:r7,GetServers:i7,GetSubchannel:a7,GetSocket:s7,GetServerSockets:o7}}Ve.getChannelzHandlers=nO;var xp=null;function rO(){if(xp)return xp;let e=ZB().loadSync,t=e("channelz.proto",{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0,includeDirs:[`${__dirname}/../../proto`]});return xp=(0,XG.loadPackageDefinition)(t).grpc.channelz.v1.Channelz.service,xp}Ve.getChannelzServiceDefinition=rO;function c7(){(0,YG.registerAdminService)(rO,nO)}Ve.setup=c7});var iO=N(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});Op.Subchannel=void 0;var et=Wn(),u7=Sl(),sv=ot(),Bp=Me(),l7=Bn(),d7=kr(),fi=Ss(),f7="subchannel",p7=~(1<<31),ov=class{constructor(t,n,r,i,a){var s;this.channelTarget=t,this.subchannelAddress=n,this.options=r,this.credentials=i,this.connector=a,this.connectivityState=et.ConnectivityState.IDLE,this.transport=null,this.continueConnecting=!1,this.stateListeners=new Set,this.refcount=0,this.channelzEnabled=!0;let o={initialDelay:r["grpc.initial_reconnect_backoff_ms"],maxDelay:r["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new u7.BackoffTimeout(()=>{this.handleBackoffTimer()},o),this.backoffTimeout.unref(),this.subchannelAddressString=(0,d7.subchannelAddressToString)(n),this.keepaliveTime=(s=r["grpc.keepalive_time_ms"])!==null&&s!==void 0?s:-1,r["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new fi.ChannelzTraceStub,this.callTracker=new fi.ChannelzCallTrackerStub,this.childrenTracker=new fi.ChannelzChildrenTrackerStub,this.streamTracker=new fi.ChannelzCallTrackerStub):(this.channelzTrace=new fi.ChannelzTrace,this.callTracker=new fi.ChannelzCallTracker,this.childrenTracker=new fi.ChannelzChildrenTracker,this.streamTracker=new fi.ChannelzCallTracker),this.channelzRef=(0,fi.registerChannelzSubchannel)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Subchannel created"),this.trace("Subchannel constructed with options "+JSON.stringify(r,void 0,2))}getChannelzInfo(){return{state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists(),target:this.subchannelAddressString}}trace(t){sv.trace(Bp.LogVerbosity.DEBUG,f7,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}refTrace(t){sv.trace(Bp.LogVerbosity.DEBUG,"subchannel_refcount","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}handleBackoffTimer(){this.continueConnecting?this.transitionToState([et.ConnectivityState.TRANSIENT_FAILURE],et.ConnectivityState.CONNECTING):this.transitionToState([et.ConnectivityState.TRANSIENT_FAILURE],et.ConnectivityState.IDLE)}startBackoff(){this.backoffTimeout.runOnce()}stopBackoff(){this.backoffTimeout.stop(),this.backoffTimeout.reset()}startConnectingInternal(){let t=this.options;if(t["grpc.keepalive_time_ms"]){let n=Math.min(this.keepaliveTime,p7);t=Object.assign(Object.assign({},t),{"grpc.keepalive_time_ms":n})}this.connector.connect(this.subchannelAddress,this.credentials,t).then(n=>{this.transitionToState([et.ConnectivityState.CONNECTING],et.ConnectivityState.READY)?(this.transport=n,this.channelzEnabled&&this.childrenTracker.refChild(n.getChannelzRef()),n.addDisconnectListener(r=>{this.transitionToState([et.ConnectivityState.READY],et.ConnectivityState.IDLE),r&&this.keepaliveTime>0&&(this.keepaliveTime*=2,sv.log(Bp.LogVerbosity.ERROR,`Connection to ${(0,l7.uriToString)(this.channelTarget)} at ${this.subchannelAddressString} rejected by server because of excess pings. Increasing ping interval to ${this.keepaliveTime} ms`))})):n.shutdown()},n=>{this.transitionToState([et.ConnectivityState.CONNECTING],et.ConnectivityState.TRANSIENT_FAILURE,`${n}`)})}transitionToState(t,n,r){var i,a;if(t.indexOf(this.connectivityState)===-1)return!1;this.trace(et.ConnectivityState[this.connectivityState]+" -> "+et.ConnectivityState[n]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+et.ConnectivityState[n]);let s=this.connectivityState;switch(this.connectivityState=n,n){case et.ConnectivityState.READY:this.stopBackoff();break;case et.ConnectivityState.CONNECTING:this.startBackoff(),this.startConnectingInternal(),this.continueConnecting=!1;break;case et.ConnectivityState.TRANSIENT_FAILURE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(i=this.transport)===null||i===void 0||i.shutdown(),this.transport=null,this.backoffTimeout.isRunning()||process.nextTick(()=>{this.handleBackoffTimer()});break;case et.ConnectivityState.IDLE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(a=this.transport)===null||a===void 0||a.shutdown(),this.transport=null;break;default:throw new Error(`Invalid state: unknown ConnectivityState ${n}`)}for(let o of this.stateListeners)o(this,s,n,this.keepaliveTime,r);return!0}ref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount+1)),this.refcount+=1}unref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount-1)),this.refcount-=1,this.refcount===0&&(this.channelzTrace.addTrace("CT_INFO","Shutting down"),(0,fi.unregisterChannelzRef)(this.channelzRef),process.nextTick(()=>{this.transitionToState([et.ConnectivityState.CONNECTING,et.ConnectivityState.READY],et.ConnectivityState.IDLE)}))}unrefIfOneRef(){return this.refcount===1?(this.unref(),!0):!1}createCall(t,n,r,i){if(!this.transport)throw new Error("Cannot create call, subchannel not READY");let a;return this.channelzEnabled?(this.callTracker.addCallStarted(),this.streamTracker.addCallStarted(),a={onCallEnd:s=>{s.code===Bp.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()}}):a={},this.transport.createCall(t,n,r,i,a)}startConnecting(){process.nextTick(()=>{this.transitionToState([et.ConnectivityState.IDLE],et.ConnectivityState.CONNECTING)||this.connectivityState===et.ConnectivityState.TRANSIENT_FAILURE&&(this.continueConnecting=!0)})}getConnectivityState(){return this.connectivityState}addConnectivityStateListener(t){this.stateListeners.add(t)}removeConnectivityStateListener(t){this.stateListeners.delete(t)}resetBackoff(){process.nextTick(()=>{this.backoffTimeout.reset(),this.transitionToState([et.ConnectivityState.TRANSIENT_FAILURE],et.ConnectivityState.CONNECTING)})}getAddress(){return this.subchannelAddressString}getChannelzRef(){return this.channelzRef}isHealthy(){return!0}addHealthStateWatcher(t){}removeHealthStateWatcher(t){}getRealSubchannel(){return this}realSubchannelEquals(t){return t.getRealSubchannel()===this}throttleKeepalive(t){t>this.keepaliveTime&&(this.keepaliveTime=t)}};Op.Subchannel=ov});var dv=N(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.setup=Pa.DEFAULT_PORT=void 0;var aO=ri(),oO=ye("dns"),cO=ye("util"),h7=My(),cv=Me(),uv=an(),m7=ot(),g7=Me(),Ba=Bn(),sO=ye("net"),_7=Sl(),A7="dns_resolver";function Oa(e){m7.trace(g7.LogVerbosity.DEBUG,A7,e)}Pa.DEFAULT_PORT=443;var y7=3e4,b7=cO.promisify(oO.resolveTxt),v7=cO.promisify(oO.lookup),lv=class{constructor(t,n,r){var i,a,s;this.target=t,this.listener=n,this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.continueResolving=!1,this.isNextResolutionTimerRunning=!1,this.isServiceConfigEnabled=!0,this.returnedIpResult=!1,Oa("Resolver constructed for target "+(0,Ba.uriToString)(t));let o=(0,Ba.splitHostPort)(t.path);o===null?(this.ipResult=null,this.dnsHostname=null,this.port=null):(0,sO.isIPv4)(o.host)||(0,sO.isIPv6)(o.host)?(this.ipResult=[{addresses:[{host:o.host,port:(i=o.port)!==null&&i!==void 0?i:Pa.DEFAULT_PORT}]}],this.dnsHostname=null,this.port=null):(this.ipResult=null,this.dnsHostname=o.host,this.port=(a=o.port)!==null&&a!==void 0?a:Pa.DEFAULT_PORT),this.percentage=Math.random()*100,r["grpc.service_config_disable_resolution"]===1&&(this.isServiceConfigEnabled=!1),this.defaultResolutionError={code:cv.Status.UNAVAILABLE,details:`Name resolution failed for target ${(0,Ba.uriToString)(this.target)}`,metadata:new uv.Metadata};let c={initialDelay:r["grpc.initial_reconnect_backoff_ms"],maxDelay:r["grpc.max_reconnect_backoff_ms"]};this.backoff=new _7.BackoffTimeout(()=>{this.continueResolving&&this.startResolutionWithBackoff()},c),this.backoff.unref(),this.minTimeBetweenResolutionsMs=(s=r["grpc.dns_min_time_between_resolutions_ms"])!==null&&s!==void 0?s:y7,this.nextResolutionTimer=setTimeout(()=>{},0),clearTimeout(this.nextResolutionTimer)}startResolution(){if(this.ipResult!==null){this.returnedIpResult||(Oa("Returning IP address for target "+(0,Ba.uriToString)(this.target)),setImmediate(()=>{this.listener.onSuccessfulResolution(this.ipResult,null,null,null,{})}),this.returnedIpResult=!0),this.backoff.stop(),this.backoff.reset(),this.stopNextResolutionTimer();return}if(this.dnsHostname===null)Oa("Failed to parse DNS address "+(0,Ba.uriToString)(this.target)),setImmediate(()=>{this.listener.onError({code:cv.Status.UNAVAILABLE,details:`Failed to parse DNS address ${(0,Ba.uriToString)(this.target)}`,metadata:new uv.Metadata})}),this.stopNextResolutionTimer();else{if(this.pendingLookupPromise!==null)return;Oa("Looking up DNS hostname "+this.dnsHostname),this.latestLookupResult=null;let t=this.dnsHostname;this.pendingLookupPromise=v7(t,{all:!0}),this.pendingLookupPromise.then(n=>{if(this.pendingLookupPromise===null)return;this.pendingLookupPromise=null,this.backoff.reset(),this.backoff.stop();let r=n.map(a=>({host:a.address,port:+this.port}));this.latestLookupResult=r.map(a=>({addresses:[a]}));let i="["+r.map(a=>a.host+":"+a.port).join(",")+"]";if(Oa("Resolved addresses for target "+(0,Ba.uriToString)(this.target)+": "+i),this.latestLookupResult.length===0){this.listener.onError(this.defaultResolutionError);return}this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})},n=>{this.pendingLookupPromise!==null&&(Oa("Resolution error for target "+(0,Ba.uriToString)(this.target)+": "+n.message),this.pendingLookupPromise=null,this.stopNextResolutionTimer(),this.listener.onError(this.defaultResolutionError))}),this.isServiceConfigEnabled&&this.pendingTxtPromise===null&&(this.pendingTxtPromise=b7(t),this.pendingTxtPromise.then(n=>{if(this.pendingTxtPromise!==null){this.pendingTxtPromise=null;try{this.latestServiceConfig=(0,h7.extractAndSelectServiceConfig)(n,this.percentage)}catch(r){this.latestServiceConfigError={code:cv.Status.UNAVAILABLE,details:`Parsing service config failed with error ${r.message}`,metadata:new uv.Metadata}}this.latestLookupResult!==null&&this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})}},n=>{}))}}startNextResolutionTimer(){var t,n;clearTimeout(this.nextResolutionTimer),this.nextResolutionTimer=setTimeout(()=>{this.stopNextResolutionTimer(),this.continueResolving&&this.startResolutionWithBackoff()},this.minTimeBetweenResolutionsMs),(n=(t=this.nextResolutionTimer).unref)===null||n===void 0||n.call(t),this.isNextResolutionTimerRunning=!0}stopNextResolutionTimer(){clearTimeout(this.nextResolutionTimer),this.isNextResolutionTimerRunning=!1}startResolutionWithBackoff(){this.pendingLookupPromise===null&&(this.continueResolving=!1,this.backoff.runOnce(),this.startNextResolutionTimer(),this.startResolution())}updateResolution(){this.pendingLookupPromise===null&&(this.isNextResolutionTimerRunning||this.backoff.isRunning()?(this.isNextResolutionTimerRunning?Oa('resolution update delayed by "min time between resolutions" rate limit'):Oa("resolution update delayed by backoff timer until "+this.backoff.getEndTime().toISOString()),this.continueResolving=!0):this.startResolutionWithBackoff())}destroy(){this.continueResolving=!1,this.backoff.reset(),this.backoff.stop(),this.stopNextResolutionTimer(),this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.returnedIpResult=!1}static getDefaultAuthority(t){return t.path}};function w7(){(0,aO.registerResolver)("dns",lv),(0,aO.registerDefaultScheme)("dns")}Pa.setup=w7});var fv=N(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.getProxiedConnection=Nu.mapProxyName=void 0;var Gl=ot(),xu=Me(),E7=ri(),C7=ye("http"),I7=ye("tls"),S7=ot(),uO=kr(),Tu=Bn(),x7=ye("url"),T7=dv(),N7="proxy";function Da(e){S7.trace(xu.LogVerbosity.DEBUG,N7,e)}function R7(){let e="",t="";if(process.env.grpc_proxy)t="grpc_proxy",e=process.env.grpc_proxy;else if(process.env.https_proxy)t="https_proxy",e=process.env.https_proxy;else if(process.env.http_proxy)t="http_proxy",e=process.env.http_proxy;else return{};let n;try{n=new x7.URL(e)}catch{return(0,Gl.log)(xu.LogVerbosity.ERROR,`cannot parse value of "${t}" env var`),{}}if(n.protocol!=="http:")return(0,Gl.log)(xu.LogVerbosity.ERROR,`"${n.protocol}" scheme not supported in proxy URI`),{};let r=null;n.username&&(n.password?((0,Gl.log)(xu.LogVerbosity.INFO,"userinfo found in proxy URI"),r=decodeURIComponent(`${n.username}:${n.password}`)):r=n.username);let i=n.hostname,a=n.port;a===""&&(a="80");let s={address:`${i}:${a}`};return r&&(s.creds=r),Da("Proxy server "+s.address+" set by environment variable "+t),s}function k7(){let e=process.env.no_grpc_proxy,t="no_grpc_proxy";return e||(e=process.env.no_proxy,t="no_proxy"),e?(Da("No proxy server list set by environment variable "+t),e.split(",")):[]}function B7(e,t){var n;let r={target:e,extraOptions:{}};if(((n=t["grpc.enable_http_proxy"])!==null&&n!==void 0?n:1)===0||e.scheme==="unix")return r;let i=R7();if(!i.address)return r;let a=(0,Tu.splitHostPort)(e.path);if(!a)return r;let s=a.host;for(let c of k7())if(c===s)return Da("Not using proxy for target in no_proxy list: "+(0,Tu.uriToString)(e)),r;let o={"grpc.http_connect_target":(0,Tu.uriToString)(e)};return i.creds&&(o["grpc.http_connect_creds"]=i.creds),{target:{scheme:"dns",path:i.address},extraOptions:o}}Nu.mapProxyName=B7;function O7(e,t,n){var r;if(!("grpc.http_connect_target"in t))return Promise.resolve({});let i=t["grpc.http_connect_target"],a=(0,Tu.parseUri)(i);if(a===null)return Promise.resolve({});let s=(0,Tu.splitHostPort)(a.path);if(s===null)return Promise.resolve({});let o=`${s.host}:${(r=s.port)!==null&&r!==void 0?r:T7.DEFAULT_PORT}`,c={method:"CONNECT",path:o},u={Host:o};(0,uO.isTcpSubchannelAddress)(e)?(c.host=e.host,c.port=e.port):c.socketPath=e.path,"grpc.http_connect_creds"in t&&(u["Proxy-Authorization"]="Basic "+Buffer.from(t["grpc.http_connect_creds"]).toString("base64")),c.headers=u;let d=(0,uO.subchannelAddressToString)(e);return Da("Using proxy "+d+" to connect to "+c.path),new Promise((p,h)=>{let _=C7.request(c);_.once("connect",(I,v,b)=>{var w;if(_.removeAllListeners(),v.removeAllListeners(),I.statusCode===200)if(Da("Successfully connected to "+c.path+" through proxy "+d),b.length>0&&v.unshift(b),"secureContext"in n){let x=(0,E7.getDefaultAuthority)(a),R=(0,Tu.splitHostPort)(x),k=(w=R?.host)!==null&&w!==void 0?w:x,q=I7.connect(Object.assign({host:k,servername:k,socket:v},n),()=>{Da("Successfully established a TLS connection to "+c.path+" through proxy "+d),p({socket:q,realTarget:a})});q.on("error",U=>{Da("Failed to establish a TLS connection to "+c.path+" through proxy "+d+" with error "+U.message),h()})}else Da("Successfully established a plaintext connection to "+c.path+" through proxy "+d),p({socket:v,realTarget:a});else(0,Gl.log)(xu.LogVerbosity.ERROR,"Failed to connect to "+c.path+" through proxy "+d+" with status "+I.statusCode),h()}),_.once("error",I=>{_.removeAllListeners(),(0,Gl.log)(xu.LogVerbosity.ERROR,"Failed to connect to proxy "+d+" with error "+I.message),h()}),_.end()})}Nu.getProxiedConnection=O7});var hv=N(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.StreamDecoder=void 0;var pi;(function(e){e[e.NO_DATA=0]="NO_DATA",e[e.READING_SIZE=1]="READING_SIZE",e[e.READING_MESSAGE=2]="READING_MESSAGE"})(pi||(pi={}));var pv=class{constructor(t){this.maxReadMessageLength=t,this.readState=pi.NO_DATA,this.readCompressFlag=Buffer.alloc(1),this.readPartialSize=Buffer.alloc(4),this.readSizeRemaining=4,this.readMessageSize=0,this.readPartialMessage=[],this.readMessageRemaining=0}write(t){let n=0,r,i=[];for(;n<t.length;)switch(this.readState){case pi.NO_DATA:this.readCompressFlag=t.slice(n,n+1),n+=1,this.readState=pi.READING_SIZE,this.readPartialSize.fill(0),this.readSizeRemaining=4,this.readMessageSize=0,this.readMessageRemaining=0,this.readPartialMessage=[];break;case pi.READING_SIZE:if(r=Math.min(t.length-n,this.readSizeRemaining),t.copy(this.readPartialSize,4-this.readSizeRemaining,n,n+r),this.readSizeRemaining-=r,n+=r,this.readSizeRemaining===0){if(this.readMessageSize=this.readPartialSize.readUInt32BE(0),this.maxReadMessageLength!==-1&&this.readMessageSize>this.maxReadMessageLength)throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`);if(this.readMessageRemaining=this.readMessageSize,this.readMessageRemaining>0)this.readState=pi.READING_MESSAGE;else{let a=Buffer.concat([this.readCompressFlag,this.readPartialSize],5);this.readState=pi.NO_DATA,i.push(a)}}break;case pi.READING_MESSAGE:if(r=Math.min(t.length-n,this.readMessageRemaining),this.readPartialMessage.push(t.slice(n,n+r)),this.readMessageRemaining-=r,n+=r,this.readMessageRemaining===0){let a=[this.readCompressFlag,this.readPartialSize].concat(this.readPartialMessage),s=Buffer.concat(a,this.readMessageSize+5);this.readState=pi.NO_DATA,i.push(s)}break;default:throw new Error("Unexpected read state")}return i}};Pp.StreamDecoder=pv});var dO=N(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.Http2SubchannelCall=void 0;var Ui=ye("http2"),P7=ye("os"),He=Me(),Qi=an(),D7=hv(),M7=ot(),F7=Me(),L7="subchannel_call";function U7(e){for(let[t,n]of Object.entries(P7.constants.errno))if(n===e)return t;return"Unknown system error "+e}function lO(e){let t=`Received HTTP status code ${e}`,n;switch(e){case 400:n=He.Status.INTERNAL;break;case 401:n=He.Status.UNAUTHENTICATED;break;case 403:n=He.Status.PERMISSION_DENIED;break;case 404:n=He.Status.UNIMPLEMENTED;break;case 429:case 502:case 503:case 504:n=He.Status.UNAVAILABLE;break;default:n=He.Status.UNKNOWN}return{code:n,details:t,metadata:new Qi.Metadata}}var mv=class{constructor(t,n,r,i,a){var s;this.http2Stream=t,this.callEventTracker=n,this.listener=r,this.transport=i,this.callId=a,this.isReadFilterPending=!1,this.isPushPending=!1,this.canPush=!1,this.readsClosed=!1,this.statusOutput=!1,this.unpushedReadMessages=[],this.finalStatus=null,this.internalError=null,this.serverEndedCall=!1;let o=(s=i.getOptions()["grpc.max_receive_message_length"])!==null&&s!==void 0?s:He.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;this.decoder=new D7.StreamDecoder(o),t.on("response",(c,u)=>{let d="";for(let p of Object.keys(c))d+=" "+p+": "+c[p]+`
|
|
18
|
+
`;if(this.trace(`Received server headers:
|
|
19
|
+
`+d),this.httpStatusCode=c[":status"],u&Ui.constants.NGHTTP2_FLAG_END_STREAM)this.handleTrailers(c);else{let p;try{p=Qi.Metadata.fromHttp2Headers(c)}catch(h){this.endCall({code:He.Status.UNKNOWN,details:h.message,metadata:new Qi.Metadata});return}this.listener.onReceiveMetadata(p)}}),t.on("trailers",c=>{this.handleTrailers(c)}),t.on("data",c=>{if(this.statusOutput)return;this.trace("receive HTTP/2 data frame of length "+c.length);let u;try{u=this.decoder.write(c)}catch(d){this.cancelWithStatus(He.Status.RESOURCE_EXHAUSTED,d.message);return}for(let d of u)this.trace("parsed message of length "+d.length),this.callEventTracker.addMessageReceived(),this.tryPush(d)}),t.on("end",()=>{this.readsClosed=!0,this.maybeOutputStatus()}),t.on("close",()=>{this.serverEndedCall=!0,process.nextTick(()=>{var c;if(this.trace("HTTP/2 stream closed with code "+t.rstCode),((c=this.finalStatus)===null||c===void 0?void 0:c.code)===He.Status.OK)return;let u,d="";switch(t.rstCode){case Ui.constants.NGHTTP2_NO_ERROR:if(this.finalStatus!==null)return;if(this.httpStatusCode&&this.httpStatusCode!==200){let p=lO(this.httpStatusCode);u=p.code,d=p.details}else u=He.Status.INTERNAL,d=`Received RST_STREAM with code ${t.rstCode} (Call ended without gRPC status)`;break;case Ui.constants.NGHTTP2_REFUSED_STREAM:u=He.Status.UNAVAILABLE,d="Stream refused by server";break;case Ui.constants.NGHTTP2_CANCEL:u=He.Status.CANCELLED,d="Call cancelled";break;case Ui.constants.NGHTTP2_ENHANCE_YOUR_CALM:u=He.Status.RESOURCE_EXHAUSTED,d="Bandwidth exhausted or memory limit exceeded";break;case Ui.constants.NGHTTP2_INADEQUATE_SECURITY:u=He.Status.PERMISSION_DENIED,d="Protocol not secure enough";break;case Ui.constants.NGHTTP2_INTERNAL_ERROR:u=He.Status.INTERNAL,this.internalError===null?d=`Received RST_STREAM with code ${t.rstCode} (Internal server error)`:this.internalError.code==="ECONNRESET"||this.internalError.code==="ETIMEDOUT"?(u=He.Status.UNAVAILABLE,d=this.internalError.message):d=`Received RST_STREAM with code ${t.rstCode} triggered by internal client error: ${this.internalError.message}`;break;default:u=He.Status.INTERNAL,d=`Received RST_STREAM with code ${t.rstCode}`}this.endCall({code:u,details:d,metadata:new Qi.Metadata,rstCode:t.rstCode})})}),t.on("error",c=>{c.code!=="ERR_HTTP2_STREAM_ERROR"&&(this.trace("Node error event: message="+c.message+" code="+c.code+" errno="+U7(c.errno)+" syscall="+c.syscall),this.internalError=c),this.callEventTracker.onStreamEnd(!1)})}getDeadlineInfo(){return[`remote_addr=${this.getPeer()}`]}onDisconnect(){this.endCall({code:He.Status.UNAVAILABLE,details:"Connection dropped",metadata:new Qi.Metadata})}outputStatus(){this.statusOutput||(this.statusOutput=!0,this.trace("ended with status: code="+this.finalStatus.code+' details="'+this.finalStatus.details+'"'),this.callEventTracker.onCallEnd(this.finalStatus),process.nextTick(()=>{this.listener.onReceiveStatus(this.finalStatus)}),this.http2Stream.resume())}trace(t){M7.trace(F7.LogVerbosity.DEBUG,L7,"["+this.callId+"] "+t)}endCall(t){(this.finalStatus===null||this.finalStatus.code===He.Status.OK)&&(this.finalStatus=t,this.maybeOutputStatus()),this.destroyHttp2Stream()}maybeOutputStatus(){this.finalStatus!==null&&(this.finalStatus.code!==He.Status.OK||this.readsClosed&&this.unpushedReadMessages.length===0&&!this.isReadFilterPending&&!this.isPushPending)&&this.outputStatus()}push(t){this.trace("pushing to reader message of length "+(t instanceof Buffer?t.length:null)),this.canPush=!1,this.isPushPending=!0,process.nextTick(()=>{this.isPushPending=!1,!this.statusOutput&&(this.listener.onReceiveMessage(t),this.maybeOutputStatus())})}tryPush(t){this.canPush?(this.http2Stream.pause(),this.push(t)):(this.trace("unpushedReadMessages.push message of length "+t.length),this.unpushedReadMessages.push(t))}handleTrailers(t){this.serverEndedCall=!0,this.callEventTracker.onStreamEnd(!0);let n="";for(let s of Object.keys(t))n+=" "+s+": "+t[s]+`
|
|
20
|
+
`;this.trace(`Received server trailers:
|
|
21
|
+
`+n);let r;try{r=Qi.Metadata.fromHttp2Headers(t)}catch{r=new Qi.Metadata}let i=r.getMap(),a;if(typeof i["grpc-status"]=="string"){let s=Number(i["grpc-status"]);this.trace("received status code "+s+" from server"),r.remove("grpc-status");let o="";if(typeof i["grpc-message"]=="string"){try{o=decodeURI(i["grpc-message"])}catch{o=i["grpc-message"]}r.remove("grpc-message"),this.trace('received status details string "'+o+'" from server')}a={code:s,details:o,metadata:r}}else this.httpStatusCode?(a=lO(this.httpStatusCode),a.metadata=r):a={code:He.Status.UNKNOWN,details:"No status information received",metadata:r};this.endCall(a)}destroyHttp2Stream(){var t;if(!this.http2Stream.destroyed)if(this.serverEndedCall)this.http2Stream.end();else{let n;((t=this.finalStatus)===null||t===void 0?void 0:t.code)===He.Status.OK?n=Ui.constants.NGHTTP2_NO_ERROR:n=Ui.constants.NGHTTP2_CANCEL,this.trace("close http2 stream with code "+n),this.http2Stream.close(n)}}cancelWithStatus(t,n){this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),this.endCall({code:t,details:n,metadata:new Qi.Metadata})}getStatus(){return this.finalStatus}getPeer(){return this.transport.getPeerName()}getCallNumber(){return this.callId}startRead(){if(this.finalStatus!==null&&this.finalStatus.code!==He.Status.OK){this.readsClosed=!0,this.maybeOutputStatus();return}if(this.canPush=!0,this.unpushedReadMessages.length>0){let t=this.unpushedReadMessages.shift();this.push(t);return}this.http2Stream.resume()}sendMessageWithContext(t,n){this.trace("write() called with message of length "+n.length);let r=i=>{process.nextTick(()=>{var a;let s=He.Status.UNAVAILABLE;i?.code==="ERR_STREAM_WRITE_AFTER_END"&&(s=He.Status.INTERNAL),i&&this.cancelWithStatus(s,`Write error: ${i.message}`),(a=t.callback)===null||a===void 0||a.call(t)})};this.trace("sending data chunk of length "+n.length),this.callEventTracker.addMessageSent();try{this.http2Stream.write(n,r)}catch(i){this.endCall({code:He.Status.UNAVAILABLE,details:`Write failed with error ${i.message}`,metadata:new Qi.Metadata})}}halfClose(){this.trace("end() called"),this.trace("calling end() on HTTP/2 stream"),this.http2Stream.end()}};Dp.Http2SubchannelCall=mv});var gv=N(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.getNextCallNumber=void 0;var Q7=0;function q7(){return Q7++}Mp.getNextCallNumber=q7});var hO=N(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.Http2SubchannelConnector=void 0;var bv=ye("http2"),fO=ye("tls"),Fp=Ss(),Hl=Me(),V7=fv(),ku=ot(),pO=ri(),Lp=kr(),Ru=Bn(),J7=ye("net"),z7=dO(),G7=gv(),_v="transport",H7="transport_flowctrl",W7=Iy().version,{HTTP2_HEADER_AUTHORITY:Z7,HTTP2_HEADER_CONTENT_TYPE:Y7,HTTP2_HEADER_METHOD:X7,HTTP2_HEADER_PATH:$7,HTTP2_HEADER_TE:K7,HTTP2_HEADER_USER_AGENT:j7}=bv.constants,eH=2e4,tH=Buffer.from("too_many_pings","ascii"),Av=class{constructor(t,n,r,i){this.session=t,this.options=r,this.remoteName=i,this.keepaliveTimer=null,this.pendingSendKeepalivePing=!1,this.activeCalls=new Set,this.disconnectListeners=[],this.disconnectHandled=!1,this.channelzEnabled=!0,this.keepalivesSent=0,this.messagesSent=0,this.messagesReceived=0,this.lastMessageSentTimestamp=null,this.lastMessageReceivedTimestamp=null,this.subchannelAddressString=(0,Lp.subchannelAddressToString)(n),r["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.streamTracker=new Fp.ChannelzCallTrackerStub):this.streamTracker=new Fp.ChannelzCallTracker,this.channelzRef=(0,Fp.registerChannelzSocket)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.userAgent=[r["grpc.primary_user_agent"],`grpc-node-js/${W7}`,r["grpc.secondary_user_agent"]].filter(a=>a).join(" "),"grpc.keepalive_time_ms"in r?this.keepaliveTimeMs=r["grpc.keepalive_time_ms"]:this.keepaliveTimeMs=-1,"grpc.keepalive_timeout_ms"in r?this.keepaliveTimeoutMs=r["grpc.keepalive_timeout_ms"]:this.keepaliveTimeoutMs=eH,"grpc.keepalive_permit_without_calls"in r?this.keepaliveWithoutCalls=r["grpc.keepalive_permit_without_calls"]===1:this.keepaliveWithoutCalls=!1,t.once("close",()=>{this.trace("session closed"),this.handleDisconnect()}),t.once("goaway",(a,s,o)=>{let c=!1;a===bv.constants.NGHTTP2_ENHANCE_YOUR_CALM&&o&&o.equals(tH)&&(c=!0),this.trace("connection closed by GOAWAY with code "+a+" and data "+o?.toString()),this.reportDisconnectToOwner(c)}),t.once("error",a=>{this.trace("connection closed with error "+a.message)}),ku.isTracerEnabled(_v)&&(t.on("remoteSettings",a=>{this.trace("new settings received"+(this.session!==t?" on the old connection":"")+": "+JSON.stringify(a))}),t.on("localSettings",a=>{this.trace("local settings acknowledged by remote"+(this.session!==t?" on the old connection":"")+": "+JSON.stringify(a))})),this.keepaliveWithoutCalls&&this.maybeStartKeepalivePingTimer()}getChannelzInfo(){var t,n,r;let i=this.session.socket,a=i.remoteAddress?(0,Lp.stringToSubchannelAddress)(i.remoteAddress,i.remotePort):null,s=i.localAddress?(0,Lp.stringToSubchannelAddress)(i.localAddress,i.localPort):null,o;if(this.session.encrypted){let u=i,d=u.getCipher(),p=u.getCertificate(),h=u.getPeerCertificate();o={cipherSuiteStandardName:(t=d.standardName)!==null&&t!==void 0?t:null,cipherSuiteOtherName:d.standardName?null:d.name,localCertificate:p&&"raw"in p?p.raw:null,remoteCertificate:h&&"raw"in h?h.raw:null}}else o=null;return{remoteAddress:a,localAddress:s,security:o,remoteName:this.remoteName,streamsStarted:this.streamTracker.callsStarted,streamsSucceeded:this.streamTracker.callsSucceeded,streamsFailed:this.streamTracker.callsFailed,messagesSent:this.messagesSent,messagesReceived:this.messagesReceived,keepAlivesSent:this.keepalivesSent,lastLocalStreamCreatedTimestamp:this.streamTracker.lastCallStartedTimestamp,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:this.lastMessageSentTimestamp,lastMessageReceivedTimestamp:this.lastMessageReceivedTimestamp,localFlowControlWindow:(n=this.session.state.localWindowSize)!==null&&n!==void 0?n:null,remoteFlowControlWindow:(r=this.session.state.remoteWindowSize)!==null&&r!==void 0?r:null}}trace(t){ku.trace(Hl.LogVerbosity.DEBUG,_v,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}keepaliveTrace(t){ku.trace(Hl.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}flowControlTrace(t){ku.trace(Hl.LogVerbosity.DEBUG,H7,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}internalsTrace(t){ku.trace(Hl.LogVerbosity.DEBUG,"transport_internals","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}reportDisconnectToOwner(t){this.disconnectHandled||(this.disconnectHandled=!0,this.disconnectListeners.forEach(n=>n(t)))}handleDisconnect(){this.clearKeepaliveTimeout(),this.reportDisconnectToOwner(!1),setImmediate(()=>{for(let t of this.activeCalls)t.onDisconnect();this.session.destroy()})}addDisconnectListener(t){this.disconnectListeners.push(t)}canSendPing(){return!this.session.destroyed&&this.keepaliveTimeMs>0&&(this.keepaliveWithoutCalls||this.activeCalls.size>0)}maybeSendPing(){var t,n;if(!this.canSendPing()){this.pendingSendKeepalivePing=!0;return}if(this.keepaliveTimer){console.error("keepaliveTimeout is not null");return}this.channelzEnabled&&(this.keepalivesSent+=1),this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms"),this.keepaliveTimer=setTimeout(()=>{this.keepaliveTimer=null,this.keepaliveTrace("Ping timeout passed without response"),this.handleDisconnect()},this.keepaliveTimeoutMs),(n=(t=this.keepaliveTimer).unref)===null||n===void 0||n.call(t);let r="";try{this.session.ping((a,s,o)=>{this.clearKeepaliveTimeout(),a?(this.keepaliveTrace("Ping failed with error "+a.message),this.handleDisconnect()):(this.keepaliveTrace("Received ping response"),this.maybeStartKeepalivePingTimer())})||(r="Ping returned false")}catch(i){r=(i instanceof Error?i.message:"")||"Unknown error"}r&&(this.keepaliveTrace("Ping send failed: "+r),this.handleDisconnect())}maybeStartKeepalivePingTimer(){var t,n;this.canSendPing()&&(this.pendingSendKeepalivePing?(this.pendingSendKeepalivePing=!1,this.maybeSendPing()):this.keepaliveTimer||(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),this.keepaliveTimer=setTimeout(()=>{this.keepaliveTimer=null,this.maybeSendPing()},this.keepaliveTimeMs),(n=(t=this.keepaliveTimer).unref)===null||n===void 0||n.call(t)))}clearKeepaliveTimeout(){this.keepaliveTimer&&(clearTimeout(this.keepaliveTimer),this.keepaliveTimer=null)}removeActiveCall(t){this.activeCalls.delete(t),this.activeCalls.size===0&&this.session.unref()}addActiveCall(t){this.activeCalls.add(t),this.activeCalls.size===1&&(this.session.ref(),this.keepaliveWithoutCalls||this.maybeStartKeepalivePingTimer())}createCall(t,n,r,i,a){let s=t.toHttp2Headers();s[Z7]=n,s[j7]=this.userAgent,s[Y7]="application/grpc",s[X7]="POST",s[$7]=r,s[K7]="trailers";let o;try{o=this.session.request(s)}catch(d){throw this.handleDisconnect(),d}this.flowControlTrace("local window size: "+this.session.state.localWindowSize+" remote window size: "+this.session.state.remoteWindowSize),this.internalsTrace("session.closed="+this.session.closed+" session.destroyed="+this.session.destroyed+" session.socket.destroyed="+this.session.socket.destroyed);let c,u;return this.channelzEnabled?(this.streamTracker.addCallStarted(),c={addMessageSent:()=>{var d;this.messagesSent+=1,this.lastMessageSentTimestamp=new Date,(d=a.addMessageSent)===null||d===void 0||d.call(a)},addMessageReceived:()=>{var d;this.messagesReceived+=1,this.lastMessageReceivedTimestamp=new Date,(d=a.addMessageReceived)===null||d===void 0||d.call(a)},onCallEnd:d=>{var p;(p=a.onCallEnd)===null||p===void 0||p.call(a,d),this.removeActiveCall(u)},onStreamEnd:d=>{var p;d?this.streamTracker.addCallSucceeded():this.streamTracker.addCallFailed(),(p=a.onStreamEnd)===null||p===void 0||p.call(a,d)}}):c={addMessageSent:()=>{var d;(d=a.addMessageSent)===null||d===void 0||d.call(a)},addMessageReceived:()=>{var d;(d=a.addMessageReceived)===null||d===void 0||d.call(a)},onCallEnd:d=>{var p;(p=a.onCallEnd)===null||p===void 0||p.call(a,d),this.removeActiveCall(u)},onStreamEnd:d=>{var p;(p=a.onStreamEnd)===null||p===void 0||p.call(a,d)}},u=new z7.Http2SubchannelCall(o,c,i,this,(0,G7.getNextCallNumber)()),this.addActiveCall(u),u}getChannelzRef(){return this.channelzRef}getPeerName(){return this.subchannelAddressString}getOptions(){return this.options}shutdown(){this.session.close(),(0,Fp.unregisterChannelzRef)(this.channelzRef)}},yv=class{constructor(t){this.channelTarget=t,this.session=null,this.isShutdown=!1}trace(t){ku.trace(Hl.LogVerbosity.DEBUG,_v,(0,Ru.uriToString)(this.channelTarget)+" "+t)}createSession(t,n,r,i){return this.isShutdown?Promise.reject():new Promise((a,s)=>{var o,c,u,d;let p;i.realTarget?(p=(0,Ru.uriToString)(i.realTarget),this.trace("creating HTTP/2 session through proxy to "+(0,Ru.uriToString)(i.realTarget))):(p=null,this.trace("creating HTTP/2 session to "+(0,Lp.subchannelAddressToString)(t)));let h=(0,pO.getDefaultAuthority)((o=i.realTarget)!==null&&o!==void 0?o:this.channelTarget),_=n._getConnectionOptions()||{};_.maxSendHeaderBlockLength=Number.MAX_SAFE_INTEGER,"grpc-node.max_session_memory"in r?_.maxSessionMemory=r["grpc-node.max_session_memory"]:_.maxSessionMemory=Number.MAX_SAFE_INTEGER;let I="http://";if("secureContext"in _){if(I="https://",r["grpc.ssl_target_name_override"]){let w=r["grpc.ssl_target_name_override"],x=(c=_.checkServerIdentity)!==null&&c!==void 0?c:fO.checkServerIdentity;_.checkServerIdentity=(R,k)=>x(w,k),_.servername=w}else{let w=(d=(u=(0,Ru.splitHostPort)(h))===null||u===void 0?void 0:u.host)!==null&&d!==void 0?d:"localhost";_.servername=w}i.socket&&(_.createConnection=(w,x)=>i.socket)}else _.createConnection=(w,x)=>i.socket?i.socket:J7.connect(t);_=Object.assign(Object.assign(Object.assign({},_),t),{enableTrace:r["grpc-node.tls_enable_trace"]===1});let v=bv.connect(I+h,_);this.session=v;let b="Failed to connect";v.unref(),v.once("connect",()=>{v.removeAllListeners(),a(new Av(v,t,r,p)),this.session=null}),v.once("close",()=>{this.session=null,setImmediate(()=>{s(`${b} (${new Date().toISOString()})`)})}),v.once("error",w=>{b=w.message,this.trace("connection failed with error "+b)})})}connect(t,n,r){var i,a,s;if(this.isShutdown)return Promise.reject();let o=n._getConnectionOptions()||{};if("secureContext"in o){if(o.ALPNProtocols=["h2"],r["grpc.ssl_target_name_override"]){let c=r["grpc.ssl_target_name_override"],u=(i=o.checkServerIdentity)!==null&&i!==void 0?i:fO.checkServerIdentity;o.checkServerIdentity=(d,p)=>u(c,p),o.servername=c}else if("grpc.http_connect_target"in r){let c=(0,pO.getDefaultAuthority)((a=(0,Ru.parseUri)(r["grpc.http_connect_target"]))!==null&&a!==void 0?a:{path:"localhost"}),u=(0,Ru.splitHostPort)(c);o.servername=(s=u?.host)!==null&&s!==void 0?s:c}r["grpc-node.tls_enable_trace"]&&(o.enableTrace=!0)}return(0,V7.getProxiedConnection)(t,r,o).then(c=>this.createSession(t,n,r,c))}shutdown(){var t;this.isShutdown=!0,(t=this.session)===null||t===void 0||t.close(),this.session=null}};Up.Http2SubchannelConnector=yv});var mO=N(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.getSubchannelPool=Bu.SubchannelPool=void 0;var nH=DR(),rH=iO(),iH=kr(),aH=Bn(),sH=hO(),oH=1e4,Wl=class{constructor(){this.pool=Object.create(null),this.cleanupTimer=null}unrefUnusedSubchannels(){let t=!0;for(let n in this.pool){let i=this.pool[n].filter(a=>!a.subchannel.unrefIfOneRef());i.length>0&&(t=!1),this.pool[n]=i}t&&this.cleanupTimer!==null&&(clearInterval(this.cleanupTimer),this.cleanupTimer=null)}ensureCleanupTask(){var t,n;this.cleanupTimer===null&&(this.cleanupTimer=setInterval(()=>{this.unrefUnusedSubchannels()},oH),(n=(t=this.cleanupTimer).unref)===null||n===void 0||n.call(t))}getOrCreateSubchannel(t,n,r,i){this.ensureCleanupTask();let a=(0,aH.uriToString)(t);if(a in this.pool){let o=this.pool[a];for(let c of o)if((0,iH.subchannelAddressEqual)(n,c.subchannelAddress)&&(0,nH.channelOptionsEqual)(r,c.channelArguments)&&i._equals(c.channelCredentials))return c.subchannel}let s=new rH.Subchannel(t,n,r,i,new sH.Http2SubchannelConnector(t));return a in this.pool||(this.pool[a]=[]),this.pool[a].push({subchannelAddress:n,channelArguments:r,channelCredentials:i,subchannel:s}),s.ref(),s}};Bu.SubchannelPool=Wl;var cH=new Wl;function uH(e){return e?cH:new Wl}Bu.getSubchannelPool=uH});var vv=N(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.FilterStackFactory=Ou.FilterStack=void 0;var Qp=class{constructor(t){this.filters=t}sendMetadata(t){let n=t;for(let r=0;r<this.filters.length;r++)n=this.filters[r].sendMetadata(n);return n}receiveMetadata(t){let n=t;for(let r=this.filters.length-1;r>=0;r--)n=this.filters[r].receiveMetadata(n);return n}sendMessage(t){let n=t;for(let r=0;r<this.filters.length;r++)n=this.filters[r].sendMessage(n);return n}receiveMessage(t){let n=t;for(let r=this.filters.length-1;r>=0;r--)n=this.filters[r].receiveMessage(n);return n}receiveTrailers(t){let n=t;for(let r=this.filters.length-1;r>=0;r--)n=this.filters[r].receiveTrailers(n);return n}push(t){this.filters.unshift(...t)}getFilters(){return this.filters}};Ou.FilterStack=Qp;var Zl=class{constructor(t){this.factories=t}push(t){this.factories.unshift(...t)}clone(){return new Zl([...this.factories])}createFilter(){return new Qp(this.factories.map(t=>t.createFilter()))}};Ou.FilterStackFactory=Zl});var wv=N(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});qp.CompressionAlgorithms=void 0;var gO;(function(e){e[e.identity=0]="identity",e[e.deflate=1]="deflate",e[e.gzip=2]="gzip"})(gO||(qp.CompressionAlgorithms=gO={}))});var Cv=N(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.BaseFilter=void 0;var Ev=class{async sendMetadata(t){return t}receiveMetadata(t){return t}async sendMessage(t){return t}async receiveMessage(t){return t}receiveTrailers(t){return t}};Vp.BaseFilter=Ev});var yO=N(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.CompressionFilterFactory=Mu.CompressionFilter=void 0;var Jp=ye("zlib"),AO=wv(),Pu=Me(),lH=Cv(),dH=ot(),fH=e=>typeof e=="number"&&typeof AO.CompressionAlgorithms[e]=="string",Du=class{async writeMessage(t,n){let r=t;n&&(r=await this.compressMessage(r));let i=Buffer.allocUnsafe(r.length+5);return i.writeUInt8(n?1:0,0),i.writeUInt32BE(r.length,1),r.copy(i,5),i}async readMessage(t){let n=t.readUInt8(0)===1,r=t.slice(5);return n&&(r=await this.decompressMessage(r)),r}},xs=class extends Du{async compressMessage(t){return t}async writeMessage(t,n){let r=Buffer.allocUnsafe(t.length+5);return r.writeUInt8(0,0),r.writeUInt32BE(t.length,1),t.copy(r,5),r}decompressMessage(t){return Promise.reject(new Error('Received compressed message but "grpc-encoding" header was identity'))}},Iv=class extends Du{constructor(t){super(),this.maxRecvMessageLength=t}compressMessage(t){return new Promise((n,r)=>{Jp.deflate(t,(i,a)=>{i?r(i):n(a)})})}decompressMessage(t){return new Promise((n,r)=>{let i=0,a=[],s=Jp.createInflate();s.on("data",o=>{a.push(o),i+=o.byteLength,this.maxRecvMessageLength!==-1&&i>this.maxRecvMessageLength&&(s.destroy(),r({code:Pu.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),s.on("end",()=>{n(Buffer.concat(a))}),s.write(t),s.end()})}},Sv=class extends Du{constructor(t){super(),this.maxRecvMessageLength=t}compressMessage(t){return new Promise((n,r)=>{Jp.gzip(t,(i,a)=>{i?r(i):n(a)})})}decompressMessage(t){return new Promise((n,r)=>{let i=0,a=[],s=Jp.createGunzip();s.on("data",o=>{a.push(o),i+=o.byteLength,this.maxRecvMessageLength!==-1&&i>this.maxRecvMessageLength&&(s.destroy(),r({code:Pu.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),s.on("end",()=>{n(Buffer.concat(a))}),s.write(t),s.end()})}},xv=class extends Du{constructor(t){super(),this.compressionName=t}compressMessage(t){return Promise.reject(new Error(`Received message compressed with unsupported compression method ${this.compressionName}`))}decompressMessage(t){return Promise.reject(new Error(`Compression method not supported: ${this.compressionName}`))}};function _O(e,t){switch(e){case"identity":return new xs;case"deflate":return new Iv(t);case"gzip":return new Sv(t);default:return new xv(e)}}var zp=class extends lH.BaseFilter{constructor(t,n){var r,i,a;super(),this.sharedFilterConfig=n,this.sendCompression=new xs,this.receiveCompression=new xs,this.currentCompressionAlgorithm="identity";let s=t["grpc.default_compression_algorithm"];if(this.maxReceiveMessageLength=(r=t["grpc.max_receive_message_length"])!==null&&r!==void 0?r:Pu.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.maxSendMessageLength=(i=t["grpc.max_send_message_length"])!==null&&i!==void 0?i:Pu.DEFAULT_MAX_SEND_MESSAGE_LENGTH,s!==void 0)if(fH(s)){let o=AO.CompressionAlgorithms[s],c=(a=n.serverSupportedEncodingHeader)===null||a===void 0?void 0:a.split(",");(!c||c.includes(o))&&(this.currentCompressionAlgorithm=o,this.sendCompression=_O(this.currentCompressionAlgorithm,-1))}else dH.log(Pu.LogVerbosity.ERROR,`Invalid value provided for grpc.default_compression_algorithm option: ${s}`)}async sendMetadata(t){let n=await t;return n.set("grpc-accept-encoding","identity,deflate,gzip"),n.set("accept-encoding","identity"),this.currentCompressionAlgorithm==="identity"?n.remove("grpc-encoding"):n.set("grpc-encoding",this.currentCompressionAlgorithm),n}receiveMetadata(t){let n=t.get("grpc-encoding");if(n.length>0){let i=n[0];typeof i=="string"&&(this.receiveCompression=_O(i,this.maxReceiveMessageLength))}t.remove("grpc-encoding");let r=t.get("grpc-accept-encoding")[0];return r&&(this.sharedFilterConfig.serverSupportedEncodingHeader=r,r.split(",").includes(this.currentCompressionAlgorithm)||(this.sendCompression=new xs,this.currentCompressionAlgorithm="identity")),t.remove("grpc-accept-encoding"),t}async sendMessage(t){var n;let r=await t;if(this.maxSendMessageLength!==-1&&r.message.length>this.maxSendMessageLength)throw{code:Pu.Status.RESOURCE_EXHAUSTED,details:`Attempted to send message with a size larger than ${this.maxSendMessageLength}`};let i;return this.sendCompression instanceof xs?i=!1:i=(((n=r.flags)!==null&&n!==void 0?n:0)&2)===0,{message:await this.sendCompression.writeMessage(r.message,i),flags:r.flags}}async receiveMessage(t){return this.receiveCompression.readMessage(await t)}};Mu.CompressionFilter=zp;var Tv=class{constructor(t,n){this.options=n,this.sharedFilterConfig={}}createFilter(){return new zp(this.options,this.sharedFilterConfig)}};Mu.CompressionFilterFactory=Tv});var Yl=N(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.formatDateDifference=tr.deadlineToString=tr.getRelativeTimeout=tr.getDeadlineTimeoutString=tr.minDeadline=void 0;function pH(...e){let t=1/0;for(let n of e){let r=n instanceof Date?n.getTime():n;r<t&&(t=r)}return t}tr.minDeadline=pH;var hH=[["m",1],["S",1e3],["M",60*1e3],["H",60*60*1e3]];function mH(e){let t=new Date().getTime();e instanceof Date&&(e=e.getTime());let n=Math.max(e-t,0);for(let[r,i]of hH){let a=n/i;if(a<1e8)return String(Math.ceil(a))+r}throw new Error("Deadline is too far in the future")}tr.getDeadlineTimeoutString=mH;var gH=2147483647;function _H(e){let t=e instanceof Date?e.getTime():e,n=new Date().getTime(),r=t-n;return r<0?0:r>gH?1/0:r}tr.getRelativeTimeout=_H;function AH(e){if(e instanceof Date)return e.toISOString();{let t=new Date(e);return Number.isNaN(t.getTime())?""+e:t.toISOString()}}tr.deadlineToString=AH;function yH(e,t){return((t.getTime()-e.getTime())/1e3).toFixed(3)+"s"}tr.formatDateDifference=yH});var Hp=N(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});Gp.restrictControlPlaneStatusCode=void 0;var hi=Me(),bH=[hi.Status.OK,hi.Status.INVALID_ARGUMENT,hi.Status.NOT_FOUND,hi.Status.ALREADY_EXISTS,hi.Status.FAILED_PRECONDITION,hi.Status.ABORTED,hi.Status.OUT_OF_RANGE,hi.Status.DATA_LOSS];function vH(e,t){return bH.includes(e)?{code:hi.Status.INTERNAL,details:`Invalid status from control plane: ${e} ${hi.Status[e]} ${t}`}:{code:e,details:t}}Gp.restrictControlPlaneStatusCode=vH});var wO=N(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});Yp.LoadBalancingCall=void 0;var bO=Wn(),Wp=Me(),vO=Yl(),Zp=an(),Xl=Ea(),wH=Bn(),EH=ot(),Nv=Hp(),CH=ye("http2"),IH="load_balancing_call",Rv=class{constructor(t,n,r,i,a,s,o){var c,u;this.channel=t,this.callConfig=n,this.methodName=r,this.host=i,this.credentials=a,this.deadline=s,this.callNumber=o,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.metadata=null,this.listener=null,this.onCallEnded=null,this.childStartTime=null;let d=this.methodName.split("/"),p="";d.length>=2&&(p=d[1]);let h=(u=(c=(0,wH.splitHostPort)(this.host))===null||c===void 0?void 0:c.host)!==null&&u!==void 0?u:"localhost";this.serviceUrl=`https://${h}/${p}`,this.startTime=new Date}getDeadlineInfo(){var t,n;let r=[];return this.childStartTime?(this.childStartTime>this.startTime&&(!((t=this.metadata)===null||t===void 0)&&t.getOptions().waitForReady&&r.push("wait_for_ready"),r.push(`LB pick: ${(0,vO.formatDateDifference)(this.startTime,this.childStartTime)}`)),r.push(...this.child.getDeadlineInfo()),r):(!((n=this.metadata)===null||n===void 0)&&n.getOptions().waitForReady&&r.push("wait_for_ready"),r.push("Waiting for LB pick"),r)}trace(t){EH.trace(Wp.LogVerbosity.DEBUG,IH,"["+this.callNumber+"] "+t)}outputStatus(t,n){var r,i;if(!this.ended){this.ended=!0,this.trace("ended with status: code="+t.code+' details="'+t.details+'" start time='+this.startTime.toISOString());let a=Object.assign(Object.assign({},t),{progress:n});(r=this.listener)===null||r===void 0||r.onReceiveStatus(a),(i=this.onCallEnded)===null||i===void 0||i.call(this,a.code)}}doPick(){var t,n;if(this.ended)return;if(!this.metadata)throw new Error("doPick called before start");this.trace("Pick called");let r=this.metadata.clone(),i=this.channel.doPick(r,this.callConfig.pickInformation),a=i.subchannel?"("+i.subchannel.getChannelzRef().id+") "+i.subchannel.getAddress():""+i.subchannel;switch(this.trace("Pick result: "+Xl.PickResultType[i.pickResultType]+" subchannel: "+a+" status: "+((t=i.status)===null||t===void 0?void 0:t.code)+" "+((n=i.status)===null||n===void 0?void 0:n.details)),i.pickResultType){case Xl.PickResultType.COMPLETE:this.credentials.generateMetadata({service_url:this.serviceUrl}).then(c=>{var u,d,p;if(this.ended){this.trace("Credentials metadata generation finished after call ended");return}if(r.merge(c),r.get("authorization").length>1&&this.outputStatus({code:Wp.Status.INTERNAL,details:'"authorization" metadata cannot have multiple values',metadata:new Zp.Metadata},"PROCESSED"),i.subchannel.getConnectivityState()!==bO.ConnectivityState.READY){this.trace("Picked subchannel "+a+" has state "+bO.ConnectivityState[i.subchannel.getConnectivityState()]+" after getting credentials metadata. Retrying pick"),this.doPick();return}this.deadline!==1/0&&r.set("grpc-timeout",(0,vO.getDeadlineTimeoutString)(this.deadline));try{this.child=i.subchannel.getRealSubchannel().createCall(r,this.host,this.methodName,{onReceiveMetadata:h=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(h)},onReceiveMessage:h=>{this.trace("Received message"),this.listener.onReceiveMessage(h)},onReceiveStatus:h=>{this.trace("Received status"),h.rstCode===CH.constants.NGHTTP2_REFUSED_STREAM?this.outputStatus(h,"REFUSED"):this.outputStatus(h,"PROCESSED")}}),this.childStartTime=new Date}catch(h){this.trace("Failed to start call on picked subchannel "+a+" with error "+h.message),this.outputStatus({code:Wp.Status.INTERNAL,details:"Failed to start HTTP/2 stream with error "+h.message,metadata:new Zp.Metadata},"NOT_STARTED");return}(d=(u=this.callConfig).onCommitted)===null||d===void 0||d.call(u),(p=i.onCallStarted)===null||p===void 0||p.call(i),this.onCallEnded=i.onCallEnded,this.trace("Created child call ["+this.child.getCallNumber()+"]"),this.readPending&&this.child.startRead(),this.pendingMessage&&this.child.sendMessageWithContext(this.pendingMessage.context,this.pendingMessage.message),this.pendingHalfClose&&this.child.halfClose()},c=>{let{code:u,details:d}=(0,Nv.restrictControlPlaneStatusCode)(typeof c.code=="number"?c.code:Wp.Status.UNKNOWN,`Getting metadata from plugin failed with error: ${c.message}`);this.outputStatus({code:u,details:d,metadata:new Zp.Metadata},"PROCESSED")});break;case Xl.PickResultType.DROP:let{code:s,details:o}=(0,Nv.restrictControlPlaneStatusCode)(i.status.code,i.status.details);setImmediate(()=>{this.outputStatus({code:s,details:o,metadata:i.status.metadata},"DROP")});break;case Xl.PickResultType.TRANSIENT_FAILURE:if(this.metadata.getOptions().waitForReady)this.channel.queueCallForPick(this);else{let{code:c,details:u}=(0,Nv.restrictControlPlaneStatusCode)(i.status.code,i.status.details);setImmediate(()=>{this.outputStatus({code:c,details:u,metadata:i.status.metadata},"PROCESSED")})}break;case Xl.PickResultType.QUEUE:this.channel.queueCallForPick(this)}}cancelWithStatus(t,n){var r;this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),(r=this.child)===null||r===void 0||r.cancelWithStatus(t,n),this.outputStatus({code:t,details:n,metadata:new Zp.Metadata},"PROCESSED")}getPeer(){var t,n;return(n=(t=this.child)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:this.channel.getTarget()}start(t,n){this.trace("start called"),this.listener=n,this.metadata=t,this.doPick()}sendMessageWithContext(t,n){this.trace("write() called with message of length "+n.length),this.child?this.child.sendMessageWithContext(t,n):this.pendingMessage={context:t,message:n}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(t){throw new Error("Method not implemented.")}getCallNumber(){return this.callNumber}};Yp.LoadBalancingCall=Rv});var CO=N(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});Xp.ResolvingCall=void 0;var Ts=Me(),Ns=Yl(),EO=an(),SH=ot(),xH=Hp(),TH="resolving_call",kv=class{constructor(t,n,r,i,a,s){this.channel=t,this.method=n,this.filterStackFactory=i,this.credentials=a,this.callNumber=s,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.readFilterPending=!1,this.writeFilterPending=!1,this.pendingChildStatus=null,this.metadata=null,this.listener=null,this.statusWatchers=[],this.deadlineTimer=setTimeout(()=>{},0),this.filterStack=null,this.deadlineStartTime=null,this.configReceivedTime=null,this.childStartTime=null,this.deadline=r.deadline,this.host=r.host,r.parentCall&&(r.flags&Ts.Propagate.CANCELLATION&&r.parentCall.on("cancelled",()=>{this.cancelWithStatus(Ts.Status.CANCELLED,"Cancelled by parent call")}),r.flags&Ts.Propagate.DEADLINE&&(this.trace("Propagating deadline from parent: "+r.parentCall.getDeadline()),this.deadline=(0,Ns.minDeadline)(this.deadline,r.parentCall.getDeadline()))),this.trace("Created"),this.runDeadlineTimer()}trace(t){SH.trace(Ts.LogVerbosity.DEBUG,TH,"["+this.callNumber+"] "+t)}runDeadlineTimer(){clearTimeout(this.deadlineTimer),this.deadlineStartTime=new Date,this.trace("Deadline: "+(0,Ns.deadlineToString)(this.deadline));let t=(0,Ns.getRelativeTimeout)(this.deadline);if(t!==1/0){this.trace("Deadline will be reached in "+t+"ms");let n=()=>{if(!this.deadlineStartTime){this.cancelWithStatus(Ts.Status.DEADLINE_EXCEEDED,"Deadline exceeded");return}let r=[],i=new Date;r.push(`Deadline exceeded after ${(0,Ns.formatDateDifference)(this.deadlineStartTime,i)}`),this.configReceivedTime?(this.configReceivedTime>this.deadlineStartTime&&r.push(`name resolution: ${(0,Ns.formatDateDifference)(this.deadlineStartTime,this.configReceivedTime)}`),this.childStartTime?this.childStartTime>this.configReceivedTime&&r.push(`metadata filters: ${(0,Ns.formatDateDifference)(this.configReceivedTime,this.childStartTime)}`):r.push("waiting for metadata filters")):r.push("waiting for name resolution"),this.child&&r.push(...this.child.getDeadlineInfo()),this.cancelWithStatus(Ts.Status.DEADLINE_EXCEEDED,r.join(","))};t<=0?process.nextTick(n):this.deadlineTimer=setTimeout(n,t)}}outputStatus(t){if(!this.ended){this.ended=!0,this.filterStack||(this.filterStack=this.filterStackFactory.createFilter()),clearTimeout(this.deadlineTimer);let n=this.filterStack.receiveTrailers(t);this.trace("ended with status: code="+n.code+' details="'+n.details+'"'),this.statusWatchers.forEach(r=>r(n)),process.nextTick(()=>{var r;(r=this.listener)===null||r===void 0||r.onReceiveStatus(n)})}}sendMessageOnChild(t,n){if(!this.child)throw new Error("sendMessageonChild called with child not populated");let r=this.child;this.writeFilterPending=!0,this.filterStack.sendMessage(Promise.resolve({message:n,flags:t.flags})).then(i=>{this.writeFilterPending=!1,r.sendMessageWithContext(t,i.message),this.pendingHalfClose&&r.halfClose()},i=>{this.cancelWithStatus(i.code,i.details)})}getConfig(){if(this.ended)return;if(!this.metadata||!this.listener)throw new Error("getConfig called before start");let t=this.channel.getConfig(this.method,this.metadata);if(t.type==="NONE"){this.channel.queueCallForConfig(this);return}else if(t.type==="ERROR"){this.metadata.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(t.error);return}this.configReceivedTime=new Date;let n=t.config;if(n.status!==Ts.Status.OK){let{code:r,details:i}=(0,xH.restrictControlPlaneStatusCode)(n.status,"Failed to route call to method "+this.method);this.outputStatus({code:r,details:i,metadata:new EO.Metadata});return}if(n.methodConfig.timeout){let r=new Date;r.setSeconds(r.getSeconds()+n.methodConfig.timeout.seconds),r.setMilliseconds(r.getMilliseconds()+n.methodConfig.timeout.nanos/1e6),this.deadline=(0,Ns.minDeadline)(this.deadline,r),this.runDeadlineTimer()}this.filterStackFactory.push(n.dynamicFilterFactories),this.filterStack=this.filterStackFactory.createFilter(),this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(r=>{this.child=this.channel.createInnerCall(n,this.method,this.host,this.credentials,this.deadline),this.trace("Created child ["+this.child.getCallNumber()+"]"),this.childStartTime=new Date,this.child.start(r,{onReceiveMetadata:i=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(this.filterStack.receiveMetadata(i))},onReceiveMessage:i=>{this.trace("Received message"),this.readFilterPending=!0,this.filterStack.receiveMessage(i).then(a=>{this.trace("Finished filtering received message"),this.readFilterPending=!1,this.listener.onReceiveMessage(a),this.pendingChildStatus&&this.outputStatus(this.pendingChildStatus)},a=>{this.cancelWithStatus(a.code,a.details)})},onReceiveStatus:i=>{this.trace("Received status"),this.readFilterPending?this.pendingChildStatus=i:this.outputStatus(i)}}),this.readPending&&this.child.startRead(),this.pendingMessage?this.sendMessageOnChild(this.pendingMessage.context,this.pendingMessage.message):this.pendingHalfClose&&this.child.halfClose()},r=>{this.outputStatus(r)})}reportResolverError(t){var n;!((n=this.metadata)===null||n===void 0)&&n.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(t)}cancelWithStatus(t,n){var r;this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),(r=this.child)===null||r===void 0||r.cancelWithStatus(t,n),this.outputStatus({code:t,details:n,metadata:new EO.Metadata})}getPeer(){var t,n;return(n=(t=this.child)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:this.channel.getTarget()}start(t,n){this.trace("start called"),this.metadata=t.clone(),this.listener=n,this.getConfig()}sendMessageWithContext(t,n){this.trace("write() called with message of length "+n.length),this.child?this.sendMessageOnChild(t,n):this.pendingMessage={context:t,message:n}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child&&!this.writeFilterPending?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(t){this.credentials=this.credentials.compose(t)}addStatusWatcher(t){this.statusWatchers.push(t)}getCallNumber(){return this.callNumber}};Xp.ResolvingCall=kv});var IO=N(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.RetryingCall=Ma.MessageBufferTracker=Ma.RetryThrottler=void 0;var $p=Me(),NH=Yl(),RH=an(),kH=ot(),BH="retrying_call",Ov=class{constructor(t,n,r){this.maxTokens=t,this.tokenRatio=n,r?this.tokens=r.tokens*(t/r.maxTokens):this.tokens=t}addCallSucceeded(){this.tokens=Math.max(this.tokens+this.tokenRatio,this.maxTokens)}addCallFailed(){this.tokens=Math.min(this.tokens-1,0)}canRetryCall(){return this.tokens>this.maxTokens/2}};Ma.RetryThrottler=Ov;var Pv=class{constructor(t,n){this.totalLimit=t,this.limitPerCall=n,this.totalAllocated=0,this.allocatedPerCall=new Map}allocate(t,n){var r;let i=(r=this.allocatedPerCall.get(n))!==null&&r!==void 0?r:0;return this.limitPerCall-i<t||this.totalLimit-this.totalAllocated<t?!1:(this.allocatedPerCall.set(n,i+t),this.totalAllocated+=t,!0)}free(t,n){var r;if(this.totalAllocated<t)throw new Error(`Invalid buffer allocation state: call ${n} freed ${t} > total allocated ${this.totalAllocated}`);this.totalAllocated-=t;let i=(r=this.allocatedPerCall.get(n))!==null&&r!==void 0?r:0;if(i<t)throw new Error(`Invalid buffer allocation state: call ${n} freed ${t} > allocated for call ${i}`);this.allocatedPerCall.set(n,i-t)}freeAll(t){var n;let r=(n=this.allocatedPerCall.get(t))!==null&&n!==void 0?n:0;if(this.totalAllocated<r)throw new Error(`Invalid buffer allocation state: call ${t} allocated ${r} > total allocated ${this.totalAllocated}`);this.totalAllocated-=r,this.allocatedPerCall.delete(t)}};Ma.MessageBufferTracker=Pv;var Bv="grpc-previous-rpc-attempts",Dv=class{constructor(t,n,r,i,a,s,o,c,u){if(this.channel=t,this.callConfig=n,this.methodName=r,this.host=i,this.credentials=a,this.deadline=s,this.callNumber=o,this.bufferTracker=c,this.retryThrottler=u,this.listener=null,this.initialMetadata=null,this.underlyingCalls=[],this.writeBuffer=[],this.writeBufferOffset=0,this.readStarted=!1,this.transparentRetryUsed=!1,this.attempts=0,this.hedgingTimer=null,this.committedCallIndex=null,this.initialRetryBackoffSec=0,this.nextRetryBackoffSec=0,n.methodConfig.retryPolicy){this.state="RETRY";let d=n.methodConfig.retryPolicy;this.nextRetryBackoffSec=this.initialRetryBackoffSec=Number(d.initialBackoff.substring(0,d.initialBackoff.length-1))}else n.methodConfig.hedgingPolicy?this.state="HEDGING":this.state="TRANSPARENT_ONLY";this.startTime=new Date}getDeadlineInfo(){if(this.underlyingCalls.length===0)return[];let t=[],n=this.underlyingCalls[this.underlyingCalls.length-1];return this.underlyingCalls.length>1&&t.push(`previous attempts: ${this.underlyingCalls.length-1}`),n.startTime>this.startTime&&t.push(`time to current attempt start: ${(0,NH.formatDateDifference)(this.startTime,n.startTime)}`),t.push(...n.call.getDeadlineInfo()),t}getCallNumber(){return this.callNumber}trace(t){kH.trace($p.LogVerbosity.DEBUG,BH,"["+this.callNumber+"] "+t)}reportStatus(t){this.trace("ended with status: code="+t.code+' details="'+t.details+'" start time='+this.startTime.toISOString()),this.bufferTracker.freeAll(this.callNumber),this.writeBufferOffset=this.writeBufferOffset+this.writeBuffer.length,this.writeBuffer=[],process.nextTick(()=>{var n;(n=this.listener)===null||n===void 0||n.onReceiveStatus({code:t.code,details:t.details,metadata:t.metadata})})}cancelWithStatus(t,n){this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),this.reportStatus({code:t,details:n,metadata:new RH.Metadata});for(let{call:r}of this.underlyingCalls)r.cancelWithStatus(t,n)}getPeer(){return this.committedCallIndex!==null?this.underlyingCalls[this.committedCallIndex].call.getPeer():"unknown"}getBufferEntry(t){var n;return(n=this.writeBuffer[t-this.writeBufferOffset])!==null&&n!==void 0?n:{entryType:"FREED",allocated:!1}}getNextBufferIndex(){return this.writeBufferOffset+this.writeBuffer.length}clearSentMessages(){if(this.state!=="COMMITTED")return;let t=this.underlyingCalls[this.committedCallIndex].nextMessageToSend;for(let n=this.writeBufferOffset;n<t;n++){let r=this.getBufferEntry(n);r.allocated&&this.bufferTracker.free(r.message.message.length,this.callNumber)}this.writeBuffer=this.writeBuffer.slice(t-this.writeBufferOffset),this.writeBufferOffset=t}commitCall(t){if(this.state!=="COMMITTED"&&this.underlyingCalls[t].state!=="COMPLETED"){this.trace("Committing call ["+this.underlyingCalls[t].call.getCallNumber()+"] at index "+t),this.state="COMMITTED",this.committedCallIndex=t;for(let n=0;n<this.underlyingCalls.length;n++)n!==t&&this.underlyingCalls[n].state!=="COMPLETED"&&(this.underlyingCalls[n].state="COMPLETED",this.underlyingCalls[n].call.cancelWithStatus($p.Status.CANCELLED,"Discarded in favor of other hedged attempt"));this.clearSentMessages()}}commitCallWithMostMessages(){if(this.state==="COMMITTED")return;let t=-1,n=-1;for(let[r,i]of this.underlyingCalls.entries())i.state==="ACTIVE"&&i.nextMessageToSend>t&&(t=i.nextMessageToSend,n=r);n===-1?this.state="TRANSPARENT_ONLY":this.commitCall(n)}isStatusCodeInList(t,n){return t.some(r=>r===n||r.toString().toLowerCase()===$p.Status[n].toLowerCase())}getNextRetryBackoffMs(){var t;let n=(t=this.callConfig)===null||t===void 0?void 0:t.methodConfig.retryPolicy;if(!n)return 0;let r=Math.random()*this.nextRetryBackoffSec*1e3,i=Number(n.maxBackoff.substring(0,n.maxBackoff.length-1));return this.nextRetryBackoffSec=Math.min(this.nextRetryBackoffSec*n.backoffMultiplier,i),r}maybeRetryCall(t,n){if(this.state!=="RETRY"){n(!1);return}let r=this.callConfig.methodConfig.retryPolicy;if(this.attempts>=Math.min(r.maxAttempts,5)){n(!1);return}let i;if(t===null)i=this.getNextRetryBackoffMs();else if(t<0){this.state="TRANSPARENT_ONLY",n(!1);return}else i=t,this.nextRetryBackoffSec=this.initialRetryBackoffSec;setTimeout(()=>{var a,s;if(this.state!=="RETRY"){n(!1);return}(!((s=(a=this.retryThrottler)===null||a===void 0?void 0:a.canRetryCall())!==null&&s!==void 0)||s)&&(n(!0),this.attempts+=1,this.startNewAttempt())},i)}countActiveCalls(){let t=0;for(let n of this.underlyingCalls)n?.state==="ACTIVE"&&(t+=1);return t}handleProcessedStatus(t,n,r){var i,a,s;switch(this.state){case"COMMITTED":case"TRANSPARENT_ONLY":this.commitCall(n),this.reportStatus(t);break;case"HEDGING":if(this.isStatusCodeInList((i=this.callConfig.methodConfig.hedgingPolicy.nonFatalStatusCodes)!==null&&i!==void 0?i:[],t.code)){(a=this.retryThrottler)===null||a===void 0||a.addCallFailed();let o;if(r===null)o=0;else if(r<0){this.state="TRANSPARENT_ONLY",this.commitCall(n),this.reportStatus(t);return}else o=r;setTimeout(()=>{this.maybeStartHedgingAttempt(),this.countActiveCalls()===0&&(this.commitCall(n),this.reportStatus(t))},o)}else this.commitCall(n),this.reportStatus(t);break;case"RETRY":this.isStatusCodeInList(this.callConfig.methodConfig.retryPolicy.retryableStatusCodes,t.code)?((s=this.retryThrottler)===null||s===void 0||s.addCallFailed(),this.maybeRetryCall(r,o=>{o||(this.commitCall(n),this.reportStatus(t))})):(this.commitCall(n),this.reportStatus(t));break}}getPushback(t){let n=t.get("grpc-retry-pushback-ms");if(n.length===0)return null;try{return parseInt(n[0])}catch{return-1}}handleChildStatus(t,n){var r;if(this.underlyingCalls[n].state==="COMPLETED")return;if(this.trace("state="+this.state+" handling status with progress "+t.progress+" from child ["+this.underlyingCalls[n].call.getCallNumber()+"] in state "+this.underlyingCalls[n].state),this.underlyingCalls[n].state="COMPLETED",t.code===$p.Status.OK){(r=this.retryThrottler)===null||r===void 0||r.addCallSucceeded(),this.commitCall(n),this.reportStatus(t);return}if(this.state==="COMMITTED"){this.reportStatus(t);return}let i=this.getPushback(t.metadata);switch(t.progress){case"NOT_STARTED":this.startNewAttempt();break;case"REFUSED":this.transparentRetryUsed?this.handleProcessedStatus(t,n,i):(this.transparentRetryUsed=!0,this.startNewAttempt());break;case"DROP":this.commitCall(n),this.reportStatus(t);break;case"PROCESSED":this.handleProcessedStatus(t,n,i);break}}maybeStartHedgingAttempt(){if(this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let t=this.callConfig.methodConfig.hedgingPolicy;this.attempts>=Math.min(t.maxAttempts,5)||(this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer())}maybeStartHedgingTimer(){var t,n,r;if(this.hedgingTimer&&clearTimeout(this.hedgingTimer),this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let i=this.callConfig.methodConfig.hedgingPolicy;if(this.attempts>=Math.min(i.maxAttempts,5))return;let a=(t=i.hedgingDelay)!==null&&t!==void 0?t:"0s",s=Number(a.substring(0,a.length-1));this.hedgingTimer=setTimeout(()=>{this.maybeStartHedgingAttempt()},s*1e3),(r=(n=this.hedgingTimer).unref)===null||r===void 0||r.call(n)}startNewAttempt(){let t=this.channel.createLoadBalancingCall(this.callConfig,this.methodName,this.host,this.credentials,this.deadline);this.trace("Created child call ["+t.getCallNumber()+"] for attempt "+this.attempts);let n=this.underlyingCalls.length;this.underlyingCalls.push({state:"ACTIVE",call:t,nextMessageToSend:0,startTime:new Date});let r=this.attempts-1,i=this.initialMetadata.clone();r>0&&i.set(Bv,`${r}`);let a=!1;t.start(i,{onReceiveMetadata:s=>{this.trace("Received metadata from child ["+t.getCallNumber()+"]"),this.commitCall(n),a=!0,r>0&&s.set(Bv,`${r}`),this.underlyingCalls[n].state==="ACTIVE"&&this.listener.onReceiveMetadata(s)},onReceiveMessage:s=>{this.trace("Received message from child ["+t.getCallNumber()+"]"),this.commitCall(n),this.underlyingCalls[n].state==="ACTIVE"&&this.listener.onReceiveMessage(s)},onReceiveStatus:s=>{this.trace("Received status from child ["+t.getCallNumber()+"]"),!a&&r>0&&s.metadata.set(Bv,`${r}`),this.handleChildStatus(s,n)}}),this.sendNextChildMessage(n),this.readStarted&&t.startRead()}start(t,n){this.trace("start called"),this.listener=n,this.initialMetadata=t,this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer()}handleChildWriteCompleted(t){var n,r;let i=this.underlyingCalls[t],a=i.nextMessageToSend;(r=(n=this.getBufferEntry(a)).callback)===null||r===void 0||r.call(n),this.clearSentMessages(),i.nextMessageToSend+=1,this.sendNextChildMessage(t)}sendNextChildMessage(t){let n=this.underlyingCalls[t];if(n.state!=="COMPLETED"&&this.getBufferEntry(n.nextMessageToSend)){let r=this.getBufferEntry(n.nextMessageToSend);switch(r.entryType){case"MESSAGE":n.call.sendMessageWithContext({callback:i=>{this.handleChildWriteCompleted(t)}},r.message.message);break;case"HALF_CLOSE":n.nextMessageToSend+=1,n.call.halfClose();break;case"FREED":break}}}sendMessageWithContext(t,n){var r;this.trace("write() called with message of length "+n.length);let i={message:n,flags:t.flags},a=this.getNextBufferIndex(),s={entryType:"MESSAGE",message:i,allocated:this.bufferTracker.allocate(n.length,this.callNumber)};if(this.writeBuffer.push(s),s.allocated){(r=t.callback)===null||r===void 0||r.call(t);for(let[o,c]of this.underlyingCalls.entries())c.state==="ACTIVE"&&c.nextMessageToSend===a&&c.call.sendMessageWithContext({callback:u=>{this.handleChildWriteCompleted(o)}},n)}else{if(this.commitCallWithMostMessages(),this.committedCallIndex===null)return;let o=this.underlyingCalls[this.committedCallIndex];s.callback=t.callback,o.state==="ACTIVE"&&o.nextMessageToSend===a&&o.call.sendMessageWithContext({callback:c=>{this.handleChildWriteCompleted(this.committedCallIndex)}},n)}}startRead(){this.trace("startRead called"),this.readStarted=!0;for(let t of this.underlyingCalls)t?.state==="ACTIVE"&&t.call.startRead()}halfClose(){this.trace("halfClose called");let t=this.getNextBufferIndex();this.writeBuffer.push({entryType:"HALF_CLOSE",allocated:!1});for(let n of this.underlyingCalls)n?.state==="ACTIVE"&&n.nextMessageToSend===t&&(n.nextMessageToSend+=1,n.call.halfClose())}setCredentials(t){throw new Error("Method not implemented.")}getMethod(){return this.methodName}getHost(){return this.host}};Ma.RetryingCall=Dv});var jp=N(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.BaseSubchannelWrapper=void 0;var Mv=class{constructor(t){this.child=t,this.healthy=!0,this.healthListeners=new Set,t.addHealthStateWatcher(n=>{this.healthy&&this.updateHealthListeners()})}updateHealthListeners(){for(let t of this.healthListeners)t(this.isHealthy())}getConnectivityState(){return this.child.getConnectivityState()}addConnectivityStateListener(t){this.child.addConnectivityStateListener(t)}removeConnectivityStateListener(t){this.child.removeConnectivityStateListener(t)}startConnecting(){this.child.startConnecting()}getAddress(){return this.child.getAddress()}throttleKeepalive(t){this.child.throttleKeepalive(t)}ref(){this.child.ref()}unref(){this.child.unref()}getChannelzRef(){return this.child.getChannelzRef()}isHealthy(){return this.healthy&&this.child.isHealthy()}addHealthStateWatcher(t){this.healthListeners.add(t)}removeHealthStateWatcher(t){this.healthListeners.delete(t)}setHealthy(t){t!==this.healthy&&(this.healthy=t,this.child.isHealthy()&&this.updateHealthListeners())}getRealSubchannel(){return this.child.getRealSubchannel()}realSubchannelEquals(t){return this.getRealSubchannel()===t.getRealSubchannel()}};Kp.BaseSubchannelWrapper=Mv});var TO=N(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});nh.InternalChannel=void 0;var OH=Jf(),PH=PR(),DH=mO(),SO=Ea(),$l=Me(),MH=vv(),FH=yO(),xO=ri(),Fv=ot(),LH=fv(),eh=Bn(),mi=Wn(),Kl=Ss(),UH=wO(),QH=Yl(),qH=CO(),Lv=gv(),VH=Hp(),Uv=IO(),JH=jp(),zH=2147483647,GH=1e3,HH=30*60*1e3,th=new Map,WH=1<<24,ZH=1<<20,Qv=class extends JH.BaseSubchannelWrapper{constructor(t,n){super(t),this.channel=n,this.refCount=0,this.subchannelStateListener=(r,i,a,s)=>{n.throttleKeepalive(s)},t.addConnectivityStateListener(this.subchannelStateListener)}ref(){this.child.ref(),this.refCount+=1}unref(){this.child.unref(),this.refCount-=1,this.refCount<=0&&(this.child.removeConnectivityStateListener(this.subchannelStateListener),this.channel.removeWrappedSubchannel(this))}},qv=class{constructor(t,n,r){var i,a,s,o,c,u,d,p;if(this.credentials=n,this.options=r,this.connectivityState=mi.ConnectivityState.IDLE,this.currentPicker=new SO.UnavailablePicker,this.configSelectionQueue=[],this.pickQueue=[],this.connectivityStateWatchers=[],this.configSelector=null,this.currentResolutionError=null,this.wrappedSubchannels=new Set,this.callCount=0,this.idleTimer=null,this.channelzEnabled=!0,this.callTracker=new Kl.ChannelzCallTracker,this.childrenTracker=new Kl.ChannelzChildrenTracker,this.randomChannelId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),typeof t!="string")throw new TypeError("Channel target must be a string");if(!(n instanceof OH.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(r&&typeof r!="object")throw new TypeError("Channel options must be an object");this.originalTarget=t;let h=(0,eh.parseUri)(t);if(h===null)throw new Error(`Could not parse target name "${t}"`);let _=(0,xO.mapUriDefaultScheme)(h);if(_===null)throw new Error(`Could not find a default scheme for target name "${t}"`);this.callRefTimer=setInterval(()=>{},zH),(a=(i=this.callRefTimer).unref)===null||a===void 0||a.call(i),this.options["grpc.enable_channelz"]===0&&(this.channelzEnabled=!1),this.channelzTrace=new Kl.ChannelzTrace,this.channelzRef=(0,Kl.registerChannelzChannel)(t,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Channel created"),this.options["grpc.default_authority"]?this.defaultAuthority=this.options["grpc.default_authority"]:this.defaultAuthority=(0,xO.getDefaultAuthority)(_);let I=(0,LH.mapProxyName)(_,r);this.target=I.target,this.options=Object.assign({},this.options,I.extraOptions),this.subchannelPool=(0,DH.getSubchannelPool)(((s=r["grpc.use_local_subchannel_pool"])!==null&&s!==void 0?s:0)===0),this.retryBufferTracker=new Uv.MessageBufferTracker((o=r["grpc.retry_buffer_size"])!==null&&o!==void 0?o:WH,(c=r["grpc.per_rpc_retry_buffer_size"])!==null&&c!==void 0?c:ZH),this.keepaliveTime=(u=r["grpc.keepalive_time_ms"])!==null&&u!==void 0?u:-1,this.idleTimeoutMs=Math.max((d=r["grpc.client_idle_timeout_ms"])!==null&&d!==void 0?d:HH,GH);let v={createSubchannel:(w,x)=>{let R=this.subchannelPool.getOrCreateSubchannel(this.target,w,Object.assign({},this.options,x),this.credentials);R.throttleKeepalive(this.keepaliveTime),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Created subchannel or used existing subchannel",R.getChannelzRef());let k=new Qv(R,this);return this.wrappedSubchannels.add(k),k},updateState:(w,x)=>{this.currentPicker=x;let R=this.pickQueue.slice();this.pickQueue=[],R.length>0&&this.callRefTimerUnref();for(let k of R)k.doPick();this.updateState(w)},requestReresolution:()=>{throw new Error("Resolving load balancer should never call requestReresolution")},addChannelzChild:w=>{this.channelzEnabled&&this.childrenTracker.refChild(w)},removeChannelzChild:w=>{this.channelzEnabled&&this.childrenTracker.unrefChild(w)}};this.resolvingLoadBalancer=new PH.ResolvingLoadBalancer(this.target,v,r,(w,x)=>{w.retryThrottling?th.set(this.getTarget(),new Uv.RetryThrottler(w.retryThrottling.maxTokens,w.retryThrottling.tokenRatio,th.get(this.getTarget()))):th.delete(this.getTarget()),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Address resolution succeeded"),this.configSelector=x,this.currentResolutionError=null,process.nextTick(()=>{let R=this.configSelectionQueue;this.configSelectionQueue=[],R.length>0&&this.callRefTimerUnref();for(let k of R)k.getConfig()})},w=>{this.channelzEnabled&&this.channelzTrace.addTrace("CT_WARNING","Address resolution failed with code "+w.code+' and details "'+w.details+'"'),this.configSelectionQueue.length>0&&this.trace("Name resolution failed with calls queued for config selection"),this.configSelector===null&&(this.currentResolutionError=Object.assign(Object.assign({},(0,VH.restrictControlPlaneStatusCode)(w.code,w.details)),{metadata:w.metadata}));let x=this.configSelectionQueue;this.configSelectionQueue=[],x.length>0&&this.callRefTimerUnref();for(let R of x)R.reportResolverError(w)}),this.filterStackFactory=new MH.FilterStackFactory([new FH.CompressionFilterFactory(this,this.options)]),this.trace("Channel constructed with options "+JSON.stringify(r,void 0,2));let b=new Error;(0,Fv.trace)($l.LogVerbosity.DEBUG,"channel_stacktrace","("+this.channelzRef.id+`) Channel constructed
|
|
22
|
+
`+((p=b.stack)===null||p===void 0?void 0:p.substring(b.stack.indexOf(`
|
|
23
|
+
`)+1))),this.lastActivityTimestamp=new Date}getChannelzInfo(){return{target:this.originalTarget,state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()}}trace(t,n){(0,Fv.trace)(n??$l.LogVerbosity.DEBUG,"channel","("+this.channelzRef.id+") "+(0,eh.uriToString)(this.target)+" "+t)}callRefTimerRef(){var t,n,r,i;!((n=(t=this.callRefTimer).hasRef)===null||n===void 0)&&n.call(t)||(this.trace("callRefTimer.ref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(i=(r=this.callRefTimer).ref)===null||i===void 0||i.call(r))}callRefTimerUnref(){var t,n;(!this.callRefTimer.hasRef||this.callRefTimer.hasRef())&&(this.trace("callRefTimer.unref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(n=(t=this.callRefTimer).unref)===null||n===void 0||n.call(t))}removeConnectivityStateWatcher(t){let n=this.connectivityStateWatchers.findIndex(r=>r===t);n>=0&&this.connectivityStateWatchers.splice(n,1)}updateState(t){(0,Fv.trace)($l.LogVerbosity.DEBUG,"connectivity_state","("+this.channelzRef.id+") "+(0,eh.uriToString)(this.target)+" "+mi.ConnectivityState[this.connectivityState]+" -> "+mi.ConnectivityState[t]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+mi.ConnectivityState[t]),this.connectivityState=t;let n=this.connectivityStateWatchers.slice();for(let r of n)t!==r.currentState&&(r.timer&&clearTimeout(r.timer),this.removeConnectivityStateWatcher(r),r.callback());t!==mi.ConnectivityState.TRANSIENT_FAILURE&&(this.currentResolutionError=null)}throttleKeepalive(t){if(t>this.keepaliveTime){this.keepaliveTime=t;for(let n of this.wrappedSubchannels)n.throttleKeepalive(t)}}removeWrappedSubchannel(t){this.wrappedSubchannels.delete(t)}doPick(t,n){return this.currentPicker.pick({metadata:t,extraPickInfo:n})}queueCallForPick(t){this.pickQueue.push(t),this.callRefTimerRef()}getConfig(t,n){return this.resolvingLoadBalancer.exitIdle(),this.configSelector?{type:"SUCCESS",config:this.configSelector(t,n,this.randomChannelId)}:this.currentResolutionError?{type:"ERROR",error:this.currentResolutionError}:{type:"NONE"}}queueCallForConfig(t){this.configSelectionQueue.push(t),this.callRefTimerRef()}enterIdle(){this.resolvingLoadBalancer.destroy(),this.updateState(mi.ConnectivityState.IDLE),this.currentPicker=new SO.QueuePicker(this.resolvingLoadBalancer),this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}startIdleTimeout(t){var n,r;this.idleTimer=setTimeout(()=>{if(this.callCount>0){this.startIdleTimeout(this.idleTimeoutMs);return}let a=new Date().valueOf()-this.lastActivityTimestamp.valueOf();a>=this.idleTimeoutMs?(this.trace("Idle timer triggered after "+this.idleTimeoutMs+"ms of inactivity"),this.enterIdle()):this.startIdleTimeout(this.idleTimeoutMs-a)},t),(r=(n=this.idleTimer).unref)===null||r===void 0||r.call(n)}maybeStartIdleTimer(){this.connectivityState!==mi.ConnectivityState.SHUTDOWN&&!this.idleTimer&&this.startIdleTimeout(this.idleTimeoutMs)}onCallStart(){this.channelzEnabled&&this.callTracker.addCallStarted(),this.callCount+=1}onCallEnd(t){this.channelzEnabled&&(t.code===$l.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()),this.callCount-=1,this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()}createLoadBalancingCall(t,n,r,i,a){let s=(0,Lv.getNextCallNumber)();return this.trace("createLoadBalancingCall ["+s+'] method="'+n+'"'),new UH.LoadBalancingCall(this,t,n,r,i,a,s)}createRetryingCall(t,n,r,i,a){let s=(0,Lv.getNextCallNumber)();return this.trace("createRetryingCall ["+s+'] method="'+n+'"'),new Uv.RetryingCall(this,t,n,r,i,a,s,this.retryBufferTracker,th.get(this.getTarget()))}createInnerCall(t,n,r,i,a){return this.options["grpc.enable_retries"]===0?this.createLoadBalancingCall(t,n,r,i,a):this.createRetryingCall(t,n,r,i,a)}createResolvingCall(t,n,r,i,a){let s=(0,Lv.getNextCallNumber)();this.trace("createResolvingCall ["+s+'] method="'+t+'", deadline='+(0,QH.deadlineToString)(n));let o={deadline:n,flags:a??$l.Propagate.DEFAULTS,host:r??this.defaultAuthority,parentCall:i},c=new qH.ResolvingCall(this,t,o,this.filterStackFactory.clone(),this.credentials._getCallCredentials(),s);return this.onCallStart(),c.addStatusWatcher(u=>{this.onCallEnd(u)}),c}close(){this.resolvingLoadBalancer.destroy(),this.updateState(mi.ConnectivityState.SHUTDOWN),clearInterval(this.callRefTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.channelzEnabled&&(0,Kl.unregisterChannelzRef)(this.channelzRef),this.subchannelPool.unrefUnusedSubchannels()}getTarget(){return(0,eh.uriToString)(this.target)}getConnectivityState(t){let n=this.connectivityState;return t&&(this.resolvingLoadBalancer.exitIdle(),this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()),n}watchConnectivityState(t,n,r){if(this.connectivityState===mi.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");let i=null;if(n!==1/0){let s=n instanceof Date?n:new Date(n),o=new Date;if(n===-1/0||s<=o){process.nextTick(r,new Error("Deadline passed without connectivity state change"));return}i=setTimeout(()=>{this.removeConnectivityStateWatcher(a),r(new Error("Deadline passed without connectivity state change"))},s.getTime()-o.getTime())}let a={currentState:t,callback:r,timer:i};this.connectivityStateWatchers.push(a)}getChannelzRef(){return this.channelzRef}createCall(t,n,r,i,a){if(typeof t!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof n=="number"||n instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");if(this.connectivityState===mi.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");return this.createResolvingCall(t,n,r,i,a)}};nh.InternalChannel=qv});var ub=N(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});rh.ChannelImplementation=void 0;var YH=Jf(),XH=TO(),Vv=class{constructor(t,n,r){if(typeof t!="string")throw new TypeError("Channel target must be a string");if(!(n instanceof YH.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(r&&typeof r!="object")throw new TypeError("Channel options must be an object");this.internalChannel=new XH.InternalChannel(t,n,r)}close(){this.internalChannel.close()}getTarget(){return this.internalChannel.getTarget()}getConnectivityState(t){return this.internalChannel.getConnectivityState(t)}watchConnectivityState(t,n,r){this.internalChannel.watchConnectivityState(t,n,r)}getChannelzRef(){return this.internalChannel.getChannelzRef()}createCall(t,n,r,i,a){if(typeof t!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof n=="number"||n instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");return this.internalChannel.createCall(t,n,r,i,a)}};rh.ChannelImplementation=Vv});var RO=N(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.ServerDuplexStreamImpl=nr.ServerWritableStreamImpl=nr.ServerReadableStreamImpl=nr.ServerUnaryCallImpl=nr.serverErrorToStatus=void 0;var $H=ye("events"),Wv=ye("stream"),Zv=Me(),NO=an();function Yv(e,t){var n;let r={code:Zv.Status.UNKNOWN,details:"message"in e?e.message:"Unknown Error",metadata:(n=t??e.metadata)!==null&&n!==void 0?n:null};return"code"in e&&typeof e.code=="number"&&Number.isInteger(e.code)&&(r.code=e.code,"details"in e&&typeof e.details=="string"&&(r.details=e.details)),r}nr.serverErrorToStatus=Yv;var Jv=class extends $H.EventEmitter{constructor(t,n,r,i){super(),this.path=t,this.call=n,this.metadata=r,this.request=i,this.cancelled=!1}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};nr.ServerUnaryCallImpl=Jv;var zv=class extends Wv.Readable{constructor(t,n,r){super({objectMode:!0}),this.path=t,this.call=n,this.metadata=r,this.cancelled=!1}_read(t){this.call.startRead()}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};nr.ServerReadableStreamImpl=zv;var Gv=class extends Wv.Writable{constructor(t,n,r,i){super({objectMode:!0}),this.path=t,this.call=n,this.metadata=r,this.request=i,this.pendingStatus={code:Zv.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new NO.Metadata,this.on("error",a=>{this.pendingStatus=Yv(a),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_write(t,n,r){this.call.sendMessage(t,r)}_final(t){var n;t(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(n=this.pendingStatus.metadata)!==null&&n!==void 0?n:this.trailingMetadata}))}end(t){return t&&(this.trailingMetadata=t),super.end()}};nr.ServerWritableStreamImpl=Gv;var Hv=class extends Wv.Duplex{constructor(t,n,r){super({objectMode:!0}),this.path=t,this.call=n,this.metadata=r,this.pendingStatus={code:Zv.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new NO.Metadata,this.on("error",i=>{this.pendingStatus=Yv(i),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_read(t){this.call.startRead()}_write(t,n,r){this.call.sendMessage(t,r)}_final(t){var n;t(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(n=this.pendingStatus.metadata)!==null&&n!==void 0?n:this.trailingMetadata}))}end(t){return t&&(this.trailingMetadata=t),super.end()}};nr.ServerDuplexStreamImpl=Hv});var Xv=N(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.ServerCredentials=void 0;var kO=Py(),jl=class{static createInsecure(){return new ed}static createSsl(t,n,r=!1){var i;if(t!==null&&!Buffer.isBuffer(t))throw new TypeError("rootCerts must be null or a Buffer");if(!Array.isArray(n))throw new TypeError("keyCertPairs must be an array");if(typeof r!="boolean")throw new TypeError("checkClientCertificate must be a boolean");let a=[],s=[];for(let o=0;o<n.length;o++){let c=n[o];if(c===null||typeof c!="object")throw new TypeError(`keyCertPair[${o}] must be an object`);if(!Buffer.isBuffer(c.private_key))throw new TypeError(`keyCertPair[${o}].private_key must be a Buffer`);if(!Buffer.isBuffer(c.cert_chain))throw new TypeError(`keyCertPair[${o}].cert_chain must be a Buffer`);a.push(c.cert_chain),s.push(c.private_key)}return new td({ca:(i=t??(0,kO.getDefaultRootsData)())!==null&&i!==void 0?i:void 0,cert:a,key:s,requestCert:r,ciphers:kO.CIPHER_SUITES})}};ih.ServerCredentials=jl;var ed=class extends jl{_isSecure(){return!1}_getSettings(){return null}_equals(t){return t instanceof ed}},td=class extends jl{constructor(t){super(),this.options=t}_isSecure(){return!0}_getSettings(){return this.options}_equals(t){if(this===t)return!0;if(!(t instanceof td))return!1;if(Buffer.isBuffer(this.options.ca)&&Buffer.isBuffer(t.options.ca)){if(!this.options.ca.equals(t.options.ca))return!1}else if(this.options.ca!==t.options.ca)return!1;if(Array.isArray(this.options.cert)&&Array.isArray(t.options.cert)){if(this.options.cert.length!==t.options.cert.length)return!1;for(let n=0;n<this.options.cert.length;n++){let r=this.options.cert[n],i=t.options.cert[n];if(Buffer.isBuffer(r)&&Buffer.isBuffer(i)){if(!r.equals(i))return!1}else if(r!==i)return!1}}else if(this.options.cert!==t.options.cert)return!1;if(Array.isArray(this.options.key)&&Array.isArray(t.options.key)){if(this.options.key.length!==t.options.key.length)return!1;for(let n=0;n<this.options.key.length;n++){let r=this.options.key[n],i=t.options.key[n];if(Buffer.isBuffer(r)&&Buffer.isBuffer(i)){if(!r.equals(i))return!1}else if(r!==i)return!1}}else if(this.options.key!==t.options.key)return!1;return this.options.requestCert===t.options.requestCert}}});var rw=N(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.getServerInterceptingCall=wn.BaseServerInterceptingCall=wn.ServerInterceptingCall=wn.ResponderBuilder=wn.isInterceptingServerListener=wn.ServerListenerBuilder=void 0;var BO=an(),vn=Me(),Fu=ye("http2"),OO=Lf(),PO=ye("zlib"),KH=hv(),LO=ot(),UO="server_call";function Rs(e){LO.trace(vn.LogVerbosity.DEBUG,UO,e)}var Kv=class{constructor(){this.metadata=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withOnReceiveMetadata(t){return this.metadata=t,this}withOnReceiveMessage(t){return this.message=t,this}withOnReceiveHalfClose(t){return this.halfClose=t,this}withOnCancel(t){return this.cancel=t,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveHalfClose:this.halfClose,onCancel:this.cancel}}};wn.ServerListenerBuilder=Kv;function jH(e){return e.onReceiveMetadata!==void 0&&e.onReceiveMetadata.length===1}wn.isInterceptingServerListener=jH;var jv=class{constructor(t,n){this.listener=t,this.nextListener=n,this.cancelled=!1,this.processingMetadata=!1,this.hasPendingMessage=!1,this.pendingMessage=null,this.processingMessage=!1,this.hasPendingHalfClose=!1}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingHalfClose(){this.hasPendingHalfClose&&(this.nextListener.onReceiveHalfClose(),this.hasPendingHalfClose=!1)}onReceiveMetadata(t){this.cancelled||(this.processingMetadata=!0,this.listener.onReceiveMetadata(t,n=>{this.processingMetadata=!1,!this.cancelled&&(this.nextListener.onReceiveMetadata(n),this.processPendingMessage(),this.processPendingHalfClose())}))}onReceiveMessage(t){this.cancelled||(this.processingMessage=!0,this.listener.onReceiveMessage(t,n=>{this.processingMessage=!1,!this.cancelled&&(this.processingMetadata?(this.pendingMessage=n,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(n),this.processPendingHalfClose()))}))}onReceiveHalfClose(){this.cancelled||this.listener.onReceiveHalfClose(()=>{this.cancelled||(this.processingMetadata||this.processingMessage?this.hasPendingHalfClose=!0:this.nextListener.onReceiveHalfClose())})}onCancel(){this.cancelled=!0,this.listener.onCancel(),this.nextListener.onCancel()}},ew=class{constructor(){this.start=void 0,this.metadata=void 0,this.message=void 0,this.status=void 0}withStart(t){return this.start=t,this}withSendMetadata(t){return this.metadata=t,this}withSendMessage(t){return this.message=t,this}withSendStatus(t){return this.status=t,this}build(){return{start:this.start,sendMetadata:this.metadata,sendMessage:this.message,sendStatus:this.status}}};wn.ResponderBuilder=ew;var ah={onReceiveMetadata:(e,t)=>{t(e)},onReceiveMessage:(e,t)=>{t(e)},onReceiveHalfClose:e=>{e()},onCancel:()=>{}},sh={start:e=>{e()},sendMetadata:(e,t)=>{t(e)},sendMessage:(e,t)=>{t(e)},sendStatus:(e,t)=>{t(e)}},tw=class{constructor(t,n){var r,i,a,s;this.nextCall=t,this.processingMetadata=!1,this.processingMessage=!1,this.pendingMessage=null,this.pendingMessageCallback=null,this.pendingStatus=null,this.responder={start:(r=n?.start)!==null&&r!==void 0?r:sh.start,sendMetadata:(i=n?.sendMetadata)!==null&&i!==void 0?i:sh.sendMetadata,sendMessage:(a=n?.sendMessage)!==null&&a!==void 0?a:sh.sendMessage,sendStatus:(s=n?.sendStatus)!==null&&s!==void 0?s:sh.sendStatus}}processPendingMessage(){this.pendingMessageCallback&&(this.nextCall.sendMessage(this.pendingMessage,this.pendingMessageCallback),this.pendingMessage=null,this.pendingMessageCallback=null)}processPendingStatus(){this.pendingStatus&&(this.nextCall.sendStatus(this.pendingStatus),this.pendingStatus=null)}start(t){this.responder.start(n=>{var r,i,a,s;let o={onReceiveMetadata:(r=n?.onReceiveMetadata)!==null&&r!==void 0?r:ah.onReceiveMetadata,onReceiveMessage:(i=n?.onReceiveMessage)!==null&&i!==void 0?i:ah.onReceiveMessage,onReceiveHalfClose:(a=n?.onReceiveHalfClose)!==null&&a!==void 0?a:ah.onReceiveHalfClose,onCancel:(s=n?.onCancel)!==null&&s!==void 0?s:ah.onCancel},c=new jv(o,t);this.nextCall.start(c)})}sendMetadata(t){this.processingMetadata=!0,this.responder.sendMetadata(t,n=>{this.processingMetadata=!1,this.nextCall.sendMetadata(n),this.processPendingMessage(),this.processPendingStatus()})}sendMessage(t,n){this.processingMessage=!0,this.responder.sendMessage(t,r=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=r,this.pendingMessageCallback=n):this.nextCall.sendMessage(r,n)})}sendStatus(t){this.responder.sendStatus(t,n=>{this.processingMetadata||this.processingMessage?this.pendingStatus=n:this.nextCall.sendStatus(n)})}startRead(){this.nextCall.startRead()}getPeer(){return this.nextCall.getPeer()}getDeadline(){return this.nextCall.getDeadline()}};wn.ServerInterceptingCall=tw;var QO="grpc-accept-encoding",nw="grpc-encoding",DO="grpc-message",MO="grpc-status",$v="grpc-timeout",e9=/(\d{1,8})\s*([HMSmun])/,t9={H:36e5,M:6e4,S:1e3,m:1,u:.001,n:1e-6},n9={[QO]:"identity,deflate,gzip",[nw]:"identity"},FO={[Fu.constants.HTTP2_HEADER_STATUS]:Fu.constants.HTTP_STATUS_OK,[Fu.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},r9={waitForTrailers:!0},oh=class{constructor(t,n,r,i,a){this.stream=t,this.callEventTracker=r,this.handler=i,this.listener=null,this.deadlineTimer=null,this.deadline=1/0,this.maxSendMessageSize=vn.DEFAULT_MAX_SEND_MESSAGE_LENGTH,this.maxReceiveMessageSize=vn.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.cancelled=!1,this.metadataSent=!1,this.wantTrailers=!1,this.cancelNotified=!1,this.incomingEncoding="identity",this.readQueue=[],this.isReadPending=!1,this.receivedHalfClose=!1,this.streamEnded=!1,this.stream.once("error",u=>{}),this.stream.once("close",()=>{var u;Rs("Request to method "+((u=this.handler)===null||u===void 0?void 0:u.path)+" stream closed with rstCode "+this.stream.rstCode),this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!1),this.callEventTracker.onCallEnd({code:vn.Status.CANCELLED,details:"Stream closed before sending status",metadata:null})),this.notifyOnCancel()}),this.stream.on("data",u=>{this.handleDataFrame(u)}),this.stream.pause(),this.stream.on("end",()=>{this.handleEndEvent()}),"grpc.max_send_message_length"in a&&(this.maxSendMessageSize=a["grpc.max_send_message_length"]),"grpc.max_receive_message_length"in a&&(this.maxReceiveMessageSize=a["grpc.max_receive_message_length"]),this.decoder=new KH.StreamDecoder(this.maxReceiveMessageSize);let s=BO.Metadata.fromHttp2Headers(n);LO.isTracerEnabled(UO)&&Rs("Request to "+this.handler.path+" received headers "+JSON.stringify(s.toJSON()));let o=s.get($v);o.length>0&&this.handleTimeoutHeader(o[0]);let c=s.get(nw);c.length>0&&(this.incomingEncoding=c[0]),s.remove($v),s.remove(nw),s.remove(QO),s.remove(Fu.constants.HTTP2_HEADER_ACCEPT_ENCODING),s.remove(Fu.constants.HTTP2_HEADER_TE),s.remove(Fu.constants.HTTP2_HEADER_CONTENT_TYPE),this.metadata=s}handleTimeoutHeader(t){let n=t.toString().match(e9);if(n===null){let a={code:vn.Status.INTERNAL,details:`Invalid ${$v} value "${t}"`,metadata:null};process.nextTick(()=>{this.sendStatus(a)});return}let r=+n[1]*t9[n[2]]|0,i=new Date;this.deadline=i.setMilliseconds(i.getMilliseconds()+r),this.deadlineTimer=setTimeout(()=>{let a={code:vn.Status.DEADLINE_EXCEEDED,details:"Deadline exceeded",metadata:null};this.sendStatus(a)},r)}checkCancelled(){return!this.cancelled&&(this.stream.destroyed||this.stream.closed)&&(this.notifyOnCancel(),this.cancelled=!0),this.cancelled}notifyOnCancel(){this.cancelNotified||(this.cancelNotified=!0,this.cancelled=!0,process.nextTick(()=>{var t;(t=this.listener)===null||t===void 0||t.onCancel()}),this.deadlineTimer&&clearTimeout(this.deadlineTimer),this.stream.resume())}maybeSendMetadata(){this.metadataSent||this.sendMetadata(new BO.Metadata)}serializeMessage(t){let n=this.handler.serialize(t),r=n.byteLength,i=Buffer.allocUnsafe(r+5);return i.writeUInt8(0,0),i.writeUInt32BE(r,1),n.copy(i,5),i}decompressMessage(t,n){let r=t.subarray(5);if(n==="identity")return r;if(n==="deflate"||n==="gzip"){let i;return n==="deflate"?i=PO.createInflate():i=PO.createGunzip(),new Promise((a,s)=>{let o=0,c=[];i.on("data",u=>{c.push(u),o+=u.byteLength,this.maxReceiveMessageSize!==-1&&o>this.maxReceiveMessageSize&&(i.destroy(),s({code:vn.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}`}))}),i.on("end",()=>{a(Buffer.concat(c))}),i.write(r),i.end()})}else return Promise.reject({code:vn.Status.UNIMPLEMENTED,details:`Received message compressed with unsupported encoding "${n}"`})}async decompressAndMaybePush(t){if(t.type!=="COMPRESSED")throw new Error(`Invalid queue entry type: ${t.type}`);let r=t.compressedMessage.readUInt8(0)===1?this.incomingEncoding:"identity",i;try{i=await this.decompressMessage(t.compressedMessage,r)}catch(a){this.sendStatus(a);return}try{t.parsedMessage=this.handler.deserialize(i)}catch(a){this.sendStatus({code:vn.Status.INTERNAL,details:`Error deserializing request: ${a.message}`});return}t.type="READABLE",this.maybePushNextMessage()}maybePushNextMessage(){if(this.listener&&this.isReadPending&&this.readQueue.length>0&&this.readQueue[0].type!=="COMPRESSED"){this.isReadPending=!1;let t=this.readQueue.shift();t.type==="READABLE"?this.listener.onReceiveMessage(t.parsedMessage):this.listener.onReceiveHalfClose()}}handleDataFrame(t){var n;if(this.checkCancelled())return;Rs("Request to "+this.handler.path+" received data frame of size "+t.length);let r;try{r=this.decoder.write(t)}catch(i){this.sendStatus({code:vn.Status.RESOURCE_EXHAUSTED,details:i.message});return}for(let i of r){this.stream.pause();let a={type:"COMPRESSED",compressedMessage:i,parsedMessage:null};this.readQueue.push(a),this.decompressAndMaybePush(a),(n=this.callEventTracker)===null||n===void 0||n.addMessageReceived()}}handleEndEvent(){this.readQueue.push({type:"HALF_CLOSE",compressedMessage:null,parsedMessage:null}),this.receivedHalfClose=!0,this.maybePushNextMessage()}start(t){Rs("Request to "+this.handler.path+" start called"),!this.checkCancelled()&&(this.listener=t,t.onReceiveMetadata(this.metadata))}sendMetadata(t){if(this.checkCancelled()||this.metadataSent)return;this.metadataSent=!0;let n=t?t.toHttp2Headers():null,r=Object.assign(Object.assign(Object.assign({},FO),n9),n);this.stream.respond(r,r9)}sendMessage(t,n){if(this.checkCancelled())return;let r;try{r=this.serializeMessage(t)}catch(i){this.sendStatus({code:vn.Status.INTERNAL,details:`Error serializing response: ${(0,OO.getErrorMessage)(i)}`,metadata:null});return}if(this.maxSendMessageSize!==-1&&r.length-5>this.maxSendMessageSize){this.sendStatus({code:vn.Status.RESOURCE_EXHAUSTED,details:`Sent message larger than max (${r.length} vs. ${this.maxSendMessageSize})`,metadata:null});return}this.maybeSendMetadata(),Rs("Request to "+this.handler.path+" sent data frame of size "+r.length),this.stream.write(r,i=>{var a;if(i){this.sendStatus({code:vn.Status.INTERNAL,details:`Error writing message: ${(0,OO.getErrorMessage)(i)}`,metadata:null});return}(a=this.callEventTracker)===null||a===void 0||a.addMessageSent(),n()})}sendStatus(t){var n,r;if(!this.checkCancelled())if(Rs("Request to method "+((n=this.handler)===null||n===void 0?void 0:n.path)+" ended with status code: "+vn.Status[t.code]+" details: "+t.details),this.metadataSent)this.wantTrailers?this.notifyOnCancel():(this.wantTrailers=!0,this.stream.once("wantTrailers",()=>{var i;this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(t));let a=Object.assign({[MO]:t.code,[DO]:encodeURI(t.details)},(i=t.metadata)===null||i===void 0?void 0:i.toHttp2Headers());this.stream.sendTrailers(a),this.notifyOnCancel()}),this.stream.end());else{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(t));let i=Object.assign(Object.assign({[MO]:t.code,[DO]:encodeURI(t.details)},FO),(r=t.metadata)===null||r===void 0?void 0:r.toHttp2Headers());this.stream.respond(i,{endStream:!0}),this.notifyOnCancel()}}startRead(){Rs("Request to "+this.handler.path+" startRead called"),!this.checkCancelled()&&(this.isReadPending=!0,this.readQueue.length===0?this.receivedHalfClose||this.stream.resume():this.maybePushNextMessage())}getPeer(){var t;let n=(t=this.stream.session)===null||t===void 0?void 0:t.socket;return n?.remoteAddress?n.remotePort?`${n.remoteAddress}:${n.remotePort}`:n.remoteAddress:"unknown"}getDeadline(){return this.deadline}};wn.BaseServerInterceptingCall=oh;function i9(e,t,n,r,i,a){let s={path:i.path,requestStream:i.type==="clientStream"||i.type==="bidi",responseStream:i.type==="serverStream"||i.type==="bidi",requestDeserialize:i.deserialize,responseSerialize:i.serialize},o=new oh(t,n,r,i,a);return e.reduce((c,u)=>u(s,c),o)}wn.getServerInterceptingCall=i9});var HO=N(La=>{"use strict";var a9=La&&La.__runInitializers||function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},s9=La&&La.__esDecorate||function(e,t,n,r,i,a){function s(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var o=r.kind,c=o==="getter"?"get":o==="setter"?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),p,h=!1,_=n.length-1;_>=0;_--){var I={};for(var v in r)I[v]=v==="access"?{}:r[v];for(var v in r.access)I.access[v]=r.access[v];I.addInitializer=function(w){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(w||null))};var b=(0,n[_])(o==="accessor"?{get:d.get,set:d.set}:d[c],I);if(o==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(p=s(b.get))&&(d.get=p),(p=s(b.set))&&(d.set=p),(p=s(b.init))&&i.unshift(p)}else(p=s(b))&&(o==="field"?i.unshift(p):d[c]=p)}u&&Object.defineProperty(u,r.name,d),h=!0};Object.defineProperty(La,"__esModule",{value:!0});La.Server=void 0;var Dn=ye("http2"),o9=ye("util"),Ct=Me(),Uu=RO(),c9=Xv(),qO=ri(),ch=ot(),Fa=kr(),Mr=Bn(),qt=Ss(),VO=rw(),Lu=~(1<<31),iw=~(1<<31),u9=2e4,JO=~(1<<31),{HTTP2_HEADER_PATH:zO}=Dn.constants,l9="server",GO=Buffer.from("max_age");function d9(){}function f9(e){return function(t,n){return o9.deprecate(t,e)}}function aw(e){return{code:Ct.Status.UNIMPLEMENTED,details:`The server does not implement the method ${e}`}}function p9(e,t){let n=aw(t);switch(e){case"unary":return(r,i)=>{i(n,null)};case"clientStream":return(r,i)=>{i(n,null)};case"serverStream":return r=>{r.emit("error",n)};case"bidi":return r=>{r.emit("error",n)};default:throw new Error(`Invalid handlerType ${e}`)}}var h9=(()=>{var e;let t=[],n;return e=class{constructor(i){var a,s,o,c,u,d;this.boundPorts=(a9(this,t),new Map),this.http2Servers=new Map,this.sessionIdleTimeouts=new Map,this.handlers=new Map,this.sessions=new Map,this.started=!1,this.shutdown=!1,this.serverAddressString="null",this.channelzEnabled=!0,this.options=i??{},this.options["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new qt.ChannelzTraceStub,this.callTracker=new qt.ChannelzCallTrackerStub,this.listenerChildrenTracker=new qt.ChannelzChildrenTrackerStub,this.sessionChildrenTracker=new qt.ChannelzChildrenTrackerStub):(this.channelzTrace=new qt.ChannelzTrace,this.callTracker=new qt.ChannelzCallTracker,this.listenerChildrenTracker=new qt.ChannelzChildrenTracker,this.sessionChildrenTracker=new qt.ChannelzChildrenTracker),this.channelzRef=(0,qt.registerChannelzServer)("server",()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Server created"),this.maxConnectionAgeMs=(a=this.options["grpc.max_connection_age_ms"])!==null&&a!==void 0?a:Lu,this.maxConnectionAgeGraceMs=(s=this.options["grpc.max_connection_age_grace_ms"])!==null&&s!==void 0?s:Lu,this.keepaliveTimeMs=(o=this.options["grpc.keepalive_time_ms"])!==null&&o!==void 0?o:iw,this.keepaliveTimeoutMs=(c=this.options["grpc.keepalive_timeout_ms"])!==null&&c!==void 0?c:u9,this.sessionIdleTimeout=(u=this.options["grpc.max_connection_idle_ms"])!==null&&u!==void 0?u:JO,this.commonServerOptions={maxSendHeaderBlockLength:Number.MAX_SAFE_INTEGER},"grpc-node.max_session_memory"in this.options?this.commonServerOptions.maxSessionMemory=this.options["grpc-node.max_session_memory"]:this.commonServerOptions.maxSessionMemory=Number.MAX_SAFE_INTEGER,"grpc.max_concurrent_streams"in this.options&&(this.commonServerOptions.settings={maxConcurrentStreams:this.options["grpc.max_concurrent_streams"]}),this.interceptors=(d=this.options.interceptors)!==null&&d!==void 0?d:[],this.trace("Server constructed")}getChannelzInfo(){return{trace:this.channelzTrace,callTracker:this.callTracker,listenerChildren:this.listenerChildrenTracker.getChildLists(),sessionChildren:this.sessionChildrenTracker.getChildLists()}}getChannelzSessionInfo(i){var a,s,o;let c=this.sessions.get(i),u=i.socket,d=u.remoteAddress?(0,Fa.stringToSubchannelAddress)(u.remoteAddress,u.remotePort):null,p=u.localAddress?(0,Fa.stringToSubchannelAddress)(u.localAddress,u.localPort):null,h;if(i.encrypted){let I=u,v=I.getCipher(),b=I.getCertificate(),w=I.getPeerCertificate();h={cipherSuiteStandardName:(a=v.standardName)!==null&&a!==void 0?a:null,cipherSuiteOtherName:v.standardName?null:v.name,localCertificate:b&&"raw"in b?b.raw:null,remoteCertificate:w&&"raw"in w?w.raw:null}}else h=null;return{remoteAddress:d,localAddress:p,security:h,remoteName:null,streamsStarted:c.streamTracker.callsStarted,streamsSucceeded:c.streamTracker.callsSucceeded,streamsFailed:c.streamTracker.callsFailed,messagesSent:c.messagesSent,messagesReceived:c.messagesReceived,keepAlivesSent:c.keepAlivesSent,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:c.streamTracker.lastCallStartedTimestamp,lastMessageSentTimestamp:c.lastMessageSentTimestamp,lastMessageReceivedTimestamp:c.lastMessageReceivedTimestamp,localFlowControlWindow:(s=i.state.localWindowSize)!==null&&s!==void 0?s:null,remoteFlowControlWindow:(o=i.state.remoteWindowSize)!==null&&o!==void 0?o:null}}trace(i){ch.trace(Ct.LogVerbosity.DEBUG,l9,"("+this.channelzRef.id+") "+i)}keepaliveTrace(i){ch.trace(Ct.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+i)}addProtoService(){throw new Error("Not implemented. Use addService() instead")}addService(i,a){if(i===null||typeof i!="object"||a===null||typeof a!="object")throw new Error("addService() requires two objects as arguments");let s=Object.keys(i);if(s.length===0)throw new Error("Cannot add an empty service to a server");s.forEach(o=>{let c=i[o],u;c.requestStream?c.responseStream?u="bidi":u="clientStream":c.responseStream?u="serverStream":u="unary";let d=a[o],p;if(d===void 0&&typeof c.originalName=="string"&&(d=a[c.originalName]),d!==void 0?p=d.bind(a):p=p9(u,o),this.register(c.path,p,c.responseSerialize,c.requestDeserialize,u)===!1)throw new Error(`Method handler for ${c.path} already provided.`)})}removeService(i){if(i===null||typeof i!="object")throw new Error("removeService() requires object as argument");Object.keys(i).forEach(s=>{let o=i[s];this.unregister(o.path)})}bind(i,a){throw new Error("Not implemented. Use bindAsync() instead")}registerListenerToChannelz(i){return(0,qt.registerChannelzSocket)((0,Fa.subchannelAddressToString)(i),()=>({localAddress:i,remoteAddress:null,security:null,remoteName:null,streamsStarted:0,streamsSucceeded:0,streamsFailed:0,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null,localFlowControlWindow:null,remoteFlowControlWindow:null}),this.channelzEnabled)}createHttp2Server(i){let a;if(i._isSecure()){let s=Object.assign(this.commonServerOptions,i._getSettings());s.enableTrace=this.options["grpc-node.tls_enable_trace"]===1,a=Dn.createSecureServer(s),a.on("secureConnection",o=>{o.on("error",c=>{this.trace("An incoming TLS connection closed with error: "+c.message)})})}else a=Dn.createServer(this.commonServerOptions);return a.setTimeout(0,d9),this._setupHandlers(a),a}bindOneAddress(i,a){this.trace("Attempting to bind "+(0,Fa.subchannelAddressToString)(i));let s=this.createHttp2Server(a.credentials);return new Promise((o,c)=>{let u=d=>{this.trace("Failed to bind "+(0,Fa.subchannelAddressToString)(i)+" with error "+d.message),o({port:"port"in i?i.port:1,error:d.message})};s.once("error",u),s.listen(i,()=>{let d=s.address(),p;typeof d=="string"?p={path:d}:p={host:d.address,port:d.port};let h=this.registerListenerToChannelz(p);this.listenerChildrenTracker.refChild(h),this.http2Servers.set(s,{channelzRef:h,sessions:new Set}),a.listeningServers.add(s),this.trace("Successfully bound "+(0,Fa.subchannelAddressToString)(p)),o({port:"port"in p?p.port:1}),s.removeListener("error",u)})})}async bindManyPorts(i,a){if(i.length===0)return{count:0,port:0,errors:[]};if((0,Fa.isTcpSubchannelAddress)(i[0])&&i[0].port===0){let s=await this.bindOneAddress(i[0],a);if(s.error){let o=await this.bindManyPorts(i.slice(1),a);return Object.assign(Object.assign({},o),{errors:[s.error,...o.errors]})}else{let o=i.slice(1).map(d=>(0,Fa.isTcpSubchannelAddress)(d)?{host:d.host,port:s.port}:d),c=await Promise.all(o.map(d=>this.bindOneAddress(d,a))),u=[s,...c];return{count:u.filter(d=>d.error===void 0).length,port:s.port,errors:u.filter(d=>d.error).map(d=>d.error)}}}else{let s=await Promise.all(i.map(o=>this.bindOneAddress(o,a)));return{count:s.filter(o=>o.error===void 0).length,port:s[0].port,errors:s.filter(o=>o.error).map(o=>o.error)}}}async bindAddressList(i,a){let s=await this.bindManyPorts(i,a);if(s.count>0)return s.count<i.length&&ch.log(Ct.LogVerbosity.INFO,`WARNING Only ${s.count} addresses added out of total ${i.length} resolved`),s.port;{let o=`No address added out of total ${i.length} resolved`;throw ch.log(Ct.LogVerbosity.ERROR,o),new Error(`${o} errors: [${s.errors.join(",")}]`)}}resolvePort(i){return new Promise((a,s)=>{let o={onSuccessfulResolution:(u,d,p)=>{o.onSuccessfulResolution=()=>{};let h=[].concat(...u.map(_=>_.addresses));if(h.length===0){s(new Error(`No addresses resolved for port ${i}`));return}a(h)},onError:u=>{s(new Error(u.details))}};(0,qO.createResolver)(i,o,this.options).updateResolution()})}async bindPort(i,a){let s=await this.resolvePort(i);if(a.cancelled)throw this.completeUnbind(a),new Error("bindAsync operation cancelled by unbind call");let o=await this.bindAddressList(s,a);if(a.cancelled)throw this.completeUnbind(a),new Error("bindAsync operation cancelled by unbind call");return o}normalizePort(i){let a=(0,Mr.parseUri)(i);if(a===null)throw new Error(`Could not parse port "${i}"`);let s=(0,qO.mapUriDefaultScheme)(a);if(s===null)throw new Error(`Could not get a default scheme for port "${i}"`);return s}bindAsync(i,a,s){if(this.shutdown)throw new Error("bindAsync called after shutdown");if(typeof i!="string")throw new TypeError("port must be a string");if(a===null||!(a instanceof c9.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");if(typeof s!="function")throw new TypeError("callback must be a function");this.trace("bindAsync port="+i);let o=this.normalizePort(i),c=(h,_)=>{process.nextTick(()=>s(h,_))},u=this.boundPorts.get((0,Mr.uriToString)(o));if(u){if(!a._equals(u.credentials)){c(new Error(`${i} already bound with incompatible credentials`),0);return}u.cancelled=!1,u.completionPromise?u.completionPromise.then(h=>s(null,h),h=>s(h,0)):c(null,u.portNumber);return}u={mapKey:(0,Mr.uriToString)(o),originalUri:o,completionPromise:null,cancelled:!1,portNumber:0,credentials:a,listeningServers:new Set};let d=(0,Mr.splitHostPort)(o.path),p=this.bindPort(o,u);u.completionPromise=p,d?.port===0?p.then(h=>{let _={scheme:o.scheme,authority:o.authority,path:(0,Mr.combineHostPort)({host:d.host,port:h})};u.mapKey=(0,Mr.uriToString)(_),u.completionPromise=null,u.portNumber=h,this.boundPorts.set(u.mapKey,u),s(null,h)},h=>{s(h,0)}):(this.boundPorts.set(u.mapKey,u),p.then(h=>{u.completionPromise=null,u.portNumber=h,s(null,h)},h=>{s(h,0)}))}closeServer(i,a){this.trace("Closing server with address "+JSON.stringify(i.address()));let s=this.http2Servers.get(i);i.close(()=>{s&&(this.listenerChildrenTracker.unrefChild(s.channelzRef),(0,qt.unregisterChannelzRef)(s.channelzRef)),this.http2Servers.delete(i),a?.()})}closeSession(i,a){var s;this.trace("Closing session initiated by "+((s=i.socket)===null||s===void 0?void 0:s.remoteAddress));let o=this.sessions.get(i),c=()=>{o&&(this.sessionChildrenTracker.unrefChild(o.ref),(0,qt.unregisterChannelzRef)(o.ref)),a?.()};i.closed?queueMicrotask(c):i.close(c)}completeUnbind(i){for(let a of i.listeningServers){let s=this.http2Servers.get(a);if(this.closeServer(a,()=>{i.listeningServers.delete(a)}),s)for(let o of s.sessions)this.closeSession(o)}this.boundPorts.delete(i.mapKey)}unbind(i){this.trace("unbind port="+i);let a=this.normalizePort(i),s=(0,Mr.splitHostPort)(a.path);if(s?.port===0)throw new Error("Cannot unbind port 0");let o=this.boundPorts.get((0,Mr.uriToString)(a));o&&(this.trace("unbinding "+o.mapKey+" originally bound as "+(0,Mr.uriToString)(o.originalUri)),o.completionPromise?o.cancelled=!0:this.completeUnbind(o))}drain(i,a){var s,o;this.trace("drain port="+i+" graceTimeMs="+a);let c=this.normalizePort(i),u=(0,Mr.splitHostPort)(c.path);if(u?.port===0)throw new Error("Cannot drain port 0");let d=this.boundPorts.get((0,Mr.uriToString)(c));if(!d)return;let p=new Set;for(let h of d.listeningServers){let _=this.http2Servers.get(h);if(_)for(let I of _.sessions)p.add(I),this.closeSession(I,()=>{p.delete(I)})}(o=(s=setTimeout(()=>{for(let h of p)h.destroy(Dn.constants.NGHTTP2_CANCEL)},a)).unref)===null||o===void 0||o.call(s)}forceShutdown(){for(let i of this.boundPorts.values())i.cancelled=!0;this.boundPorts.clear();for(let i of this.http2Servers.keys())this.closeServer(i);this.sessions.forEach((i,a)=>{this.closeSession(a),a.destroy(Dn.constants.NGHTTP2_CANCEL)}),this.sessions.clear(),(0,qt.unregisterChannelzRef)(this.channelzRef),this.shutdown=!0}register(i,a,s,o,c){return this.handlers.has(i)?!1:(this.handlers.set(i,{func:a,serialize:s,deserialize:o,type:c,path:i}),!0)}unregister(i){return this.handlers.delete(i)}start(){if(this.http2Servers.size===0||[...this.http2Servers.keys()].every(i=>!i.listening))throw new Error("server must be bound in order to start");if(this.started===!0)throw new Error("server is already started");this.started=!0}tryShutdown(i){var a;let s=u=>{(0,qt.unregisterChannelzRef)(this.channelzRef),i(u)},o=0;function c(){o--,o===0&&s()}this.shutdown=!0;for(let[u,d]of this.http2Servers.entries()){o++;let p=d.channelzRef.name;this.trace("Waiting for server "+p+" to close"),this.closeServer(u,()=>{this.trace("Server "+p+" finished closing"),c()});for(let h of d.sessions.keys()){o++;let _=(a=h.socket)===null||a===void 0?void 0:a.remoteAddress;this.trace("Waiting for session "+_+" to close"),this.closeSession(h,()=>{this.trace("Session "+_+" finished closing"),c()})}}o===0&&s()}addHttp2Port(){throw new Error("Not yet implemented")}getChannelzRef(){return this.channelzRef}_verifyContentType(i,a){let s=a[Dn.constants.HTTP2_HEADER_CONTENT_TYPE];return typeof s!="string"||!s.startsWith("application/grpc")?(i.respond({[Dn.constants.HTTP2_HEADER_STATUS]:Dn.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE},{endStream:!0}),!1):!0}_retrieveHandler(i){this.trace("Received call to method "+i+" at address "+this.serverAddressString);let a=this.handlers.get(i);return a===void 0?(this.trace("No handler registered for method "+i+". Sending UNIMPLEMENTED status."),null):a}_respondWithError(i,a,s=null){var o,c;let u=Object.assign({"grpc-status":(o=i.code)!==null&&o!==void 0?o:Ct.Status.INTERNAL,"grpc-message":i.details,[Dn.constants.HTTP2_HEADER_STATUS]:Dn.constants.HTTP_STATUS_OK,[Dn.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},(c=i.metadata)===null||c===void 0?void 0:c.toHttp2Headers());a.respond(u,{endStream:!0}),this.callTracker.addCallFailed(),s?.streamTracker.addCallFailed()}_channelzHandler(i,a){this.onStreamOpened(i);let s=this.sessions.get(i.session);if(this.callTracker.addCallStarted(),s?.streamTracker.addCallStarted(),!this._verifyContentType(i,a)){this.callTracker.addCallFailed(),s?.streamTracker.addCallFailed();return}let o=a[zO],c=this._retrieveHandler(o);if(!c){this._respondWithError(aw(o),i,s);return}let u={addMessageSent:()=>{s&&(s.messagesSent+=1,s.lastMessageSentTimestamp=new Date)},addMessageReceived:()=>{s&&(s.messagesReceived+=1,s.lastMessageReceivedTimestamp=new Date)},onCallEnd:p=>{p.code===Ct.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()},onStreamEnd:p=>{s&&(p?s.streamTracker.addCallSucceeded():s.streamTracker.addCallFailed())}},d=(0,VO.getServerInterceptingCall)(this.interceptors,i,a,u,c,this.options);this._runHandlerForCall(d,c)||(this.callTracker.addCallFailed(),s?.streamTracker.addCallFailed(),d.sendStatus({code:Ct.Status.INTERNAL,details:`Unknown handler type: ${c.type}`}))}_streamHandler(i,a){if(this.onStreamOpened(i),this._verifyContentType(i,a)!==!0)return;let s=a[zO],o=this._retrieveHandler(s);if(!o){this._respondWithError(aw(s),i,null);return}let c=(0,VO.getServerInterceptingCall)(this.interceptors,i,a,null,o,this.options);this._runHandlerForCall(c,o)||c.sendStatus({code:Ct.Status.INTERNAL,details:`Unknown handler type: ${o.type}`})}_runHandlerForCall(i,a){let{type:s}=a;if(s==="unary")m9(i,a);else if(s==="clientStream")g9(i,a);else if(s==="serverStream")_9(i,a);else if(s==="bidi")A9(i,a);else return!1;return!0}_setupHandlers(i){if(i===null)return;let a=i.address(),s="null";a&&(typeof a=="string"?s=a:s=a.address+":"+a.port),this.serverAddressString=s;let o=this.channelzEnabled?this._channelzHandler:this._streamHandler,c=this.channelzEnabled?this._channelzSessionHandler(i):this._sessionHandler(i);i.on("stream",o.bind(this)),i.on("session",c)}_sessionHandler(i){return a=>{var s,o;(s=this.http2Servers.get(i))===null||s===void 0||s.sessions.add(a);let c=null,u=null,d=null,p=!1,h=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==Lu){let w=this.maxConnectionAgeMs/10,x=Math.random()*w*2-w;c=setTimeout(()=>{var R,k;p=!0,this.trace("Connection dropped by max connection age: "+((R=a.socket)===null||R===void 0?void 0:R.remoteAddress));try{a.goaway(Dn.constants.NGHTTP2_NO_ERROR,~(1<<31),GO)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==Lu&&(u=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(k=u.unref)===null||k===void 0||k.call(u))},this.maxConnectionAgeMs+x),(o=c.unref)===null||o===void 0||o.call(c)}let _=()=>{d&&(clearTimeout(d),d=null)},I=()=>!a.destroyed&&this.keepaliveTimeMs<iw&&this.keepaliveTimeMs>0,v,b=()=>{var w;I()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),d=setTimeout(()=>{_(),v()},this.keepaliveTimeMs),(w=d.unref)===null||w===void 0||w.call(d))};v=()=>{var w;if(!I())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let x="";try{a.ping((k,q,U)=>{_(),k?(this.keepaliveTrace("Ping failed with error: "+k.message),p=!0,a.close()):(this.keepaliveTrace("Received ping response"),b())})||(x="Ping returned false")}catch(R){x=(R instanceof Error?R.message:"")||"Unknown error"}if(x){this.keepaliveTrace("Ping send failed: "+x),this.trace("Connection dropped due to ping send error: "+x),p=!0,a.close();return}d=setTimeout(()=>{_(),this.keepaliveTrace("Ping timeout passed without response"),this.trace("Connection dropped by keepalive timeout"),p=!0,a.close()},this.keepaliveTimeoutMs),(w=d.unref)===null||w===void 0||w.call(d)},b(),a.on("close",()=>{var w,x;p||this.trace(`Connection dropped by client ${(w=a.socket)===null||w===void 0?void 0:w.remoteAddress}`),c&&clearTimeout(c),u&&clearTimeout(u),_(),h!==null&&(clearTimeout(h.timeout),this.sessionIdleTimeouts.delete(a)),(x=this.http2Servers.get(i))===null||x===void 0||x.sessions.delete(a)})}}_channelzSessionHandler(i){return a=>{var s,o,c,u;let d=(0,qt.registerChannelzSocket)((o=(s=a.socket)===null||s===void 0?void 0:s.remoteAddress)!==null&&o!==void 0?o:"unknown",this.getChannelzSessionInfo.bind(this,a),this.channelzEnabled),p={ref:d,streamTracker:new qt.ChannelzCallTracker,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null};(c=this.http2Servers.get(i))===null||c===void 0||c.sessions.add(a),this.sessions.set(a,p);let h=`${a.socket.remoteAddress}:${a.socket.remotePort}`;this.channelzTrace.addTrace("CT_INFO","Connection established by client "+h),this.trace("Connection established by client "+h),this.sessionChildrenTracker.refChild(d);let _=null,I=null,v=null,b=!1,w=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==Lu){let U=this.maxConnectionAgeMs/10,V=Math.random()*U*2-U;_=setTimeout(()=>{var Z;b=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by max connection age from "+h);try{a.goaway(Dn.constants.NGHTTP2_NO_ERROR,~(1<<31),GO)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==Lu&&(I=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(Z=I.unref)===null||Z===void 0||Z.call(I))},this.maxConnectionAgeMs+V),(u=_.unref)===null||u===void 0||u.call(_)}let x=()=>{v&&(clearTimeout(v),v=null)},R=()=>!a.destroyed&&this.keepaliveTimeMs<iw&&this.keepaliveTimeMs>0,k,q=()=>{var U;R()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),v=setTimeout(()=>{x(),k()},this.keepaliveTimeMs),(U=v.unref)===null||U===void 0||U.call(v))};k=()=>{var U;if(!R())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let V="";try{a.ping((X,de,O)=>{x(),X?(this.keepaliveTrace("Ping failed with error: "+X.message),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to error of a ping frame "+X.message+" return in "+de),b=!0,a.close()):(this.keepaliveTrace("Received ping response"),q())})||(V="Ping returned false")}catch(Z){V=(Z instanceof Error?Z.message:"")||"Unknown error"}if(V){this.keepaliveTrace("Ping send failed: "+V),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to ping send error: "+V),b=!0,a.close();return}p.keepAlivesSent+=1,v=setTimeout(()=>{x(),this.keepaliveTrace("Ping timeout passed without response"),this.channelzTrace.addTrace("CT_INFO","Connection dropped by keepalive timeout from "+h),b=!0,a.close()},this.keepaliveTimeoutMs),(U=v.unref)===null||U===void 0||U.call(v)},q(),a.on("close",()=>{var U;b||this.channelzTrace.addTrace("CT_INFO","Connection dropped by client "+h),this.sessionChildrenTracker.unrefChild(d),(0,qt.unregisterChannelzRef)(d),_&&clearTimeout(_),I&&clearTimeout(I),x(),w!==null&&(clearTimeout(w.timeout),this.sessionIdleTimeouts.delete(a)),(U=this.http2Servers.get(i))===null||U===void 0||U.sessions.delete(a),this.sessions.delete(a)})}}enableIdleTimeout(i){var a,s;if(this.sessionIdleTimeout>=JO)return null;let o={activeStreams:0,lastIdle:Date.now(),onClose:this.onStreamClose.bind(this,i),timeout:setTimeout(this.onIdleTimeout,this.sessionIdleTimeout,this,i)};(s=(a=o.timeout).unref)===null||s===void 0||s.call(a),this.sessionIdleTimeouts.set(i,o);let{socket:c}=i;return this.trace("Enable idle timeout for "+c.remoteAddress+":"+c.remotePort),o}onIdleTimeout(i,a){let{socket:s}=a,o=i.sessionIdleTimeouts.get(a);o!==void 0&&o.activeStreams===0&&Date.now()-o.lastIdle>=i.sessionIdleTimeout&&(i.trace("Session idle timeout triggered for "+s?.remoteAddress+":"+s?.remotePort+" last idle at "+o.lastIdle),i.closeSession(a))}onStreamOpened(i){let a=i.session,s=this.sessionIdleTimeouts.get(a);s&&(s.activeStreams+=1,i.once("close",s.onClose))}onStreamClose(i){var a,s;let o=this.sessionIdleTimeouts.get(i);o&&(o.activeStreams-=1,o.activeStreams===0&&(o.lastIdle=Date.now(),o.timeout.refresh(),this.trace("Session onStreamClose"+((a=i.socket)===null||a===void 0?void 0:a.remoteAddress)+":"+((s=i.socket)===null||s===void 0?void 0:s.remotePort)+" at "+o.lastIdle)))}},(()=>{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[f9("Calling start() is no longer necessary. It can be safely omitted.")],s9(e,null,n,{kind:"method",name:"start",static:!1,private:!1,access:{has:i=>"start"in i,get:i=>i.start},metadata:r},null,t),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();La.Server=h9;async function m9(e,t){let n;function r(s,o,c,u){if(s){e.sendStatus((0,Uu.serverErrorToStatus)(s,c));return}e.sendMessage(o,()=>{e.sendStatus({code:Ct.Status.OK,details:"OK",metadata:c??null})})}let i,a=null;e.start({onReceiveMetadata(s){i=s,e.startRead()},onReceiveMessage(s){if(a){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${t.path}`,metadata:null});return}a=s,e.startRead()},onReceiveHalfClose(){if(!a){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${t.path}`,metadata:null});return}n=new Uu.ServerWritableStreamImpl(t.path,e,i,a);try{t.func(n,r)}catch(s){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"))}})}function g9(e,t){let n;function r(i,a,s,o){if(i){e.sendStatus((0,Uu.serverErrorToStatus)(i,s));return}e.sendMessage(a,()=>{e.sendStatus({code:Ct.Status.OK,details:"OK",metadata:s??null})})}e.start({onReceiveMetadata(i){n=new Uu.ServerDuplexStreamImpl(t.path,e,i);try{t.func(n,r)}catch(a){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onReceiveMessage(i){n.push(i)},onReceiveHalfClose(){n.push(null)},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"),n.destroy())}})}function _9(e,t){let n,r,i=null;e.start({onReceiveMetadata(a){r=a,e.startRead()},onReceiveMessage(a){if(i){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${t.path}`,metadata:null});return}i=a,e.startRead()},onReceiveHalfClose(){if(!i){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${t.path}`,metadata:null});return}n=new Uu.ServerWritableStreamImpl(t.path,e,r,i);try{t.func(n)}catch(a){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"),n.destroy())}})}function A9(e,t){let n;e.start({onReceiveMetadata(r){n=new Uu.ServerDuplexStreamImpl(t.path,e,r);try{t.func(n)}catch(i){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${i.message}`,metadata:null})}},onReceiveMessage(r){n.push(r)},onReceiveHalfClose(){n.push(null)},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"),n.destroy())}})}});var WO=N(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.StatusBuilder=void 0;var sw=class{constructor(){this.code=null,this.details=null,this.metadata=null}withCode(t){return this.code=t,this}withDetails(t){return this.details=t,this}withMetadata(t){return this.metadata=t,this}build(){let t={};return this.code!==null&&(t.code=this.code),this.details!==null&&(t.details=this.details),this.metadata!==null&&(t.metadata=this.metadata),t}};uh.StatusBuilder=sw});var ow=N(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.isDuration=Ua.durationToMs=Ua.msToDuration=void 0;function y9(e){return{seconds:e/1e3|0,nanos:e%1e3*1e6|0}}Ua.msToDuration=y9;function b9(e){return e.seconds*1e3+e.nanos/1e6|0}Ua.durationToMs=b9;function v9(e){return typeof e.seconds=="number"&&typeof e.nanos=="number"}Ua.isDuration=v9});var lh=N(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.setup=rr.LeafLoadBalancer=rr.PickFirstLoadBalancer=rr.shuffled=rr.PickFirstLoadBalancingConfig=void 0;var uw=ys(),It=Wn(),Qu=Ea(),w9=ot(),E9=Me(),ZO=kr(),YO=ye("net"),C9="pick_first";function cw(e){w9.trace(E9.LogVerbosity.DEBUG,C9,e)}var nd="pick_first",I9=250,Qa=class{constructor(t){this.shuffleAddressList=t}getLoadBalancerName(){return nd}toJsonObject(){return{[nd]:{shuffleAddressList:this.shuffleAddressList}}}getShuffleAddressList(){return this.shuffleAddressList}static createFromJson(t){if("shuffleAddressList"in t&&typeof t.shuffleAddressList!="boolean")throw new Error("pick_first config field shuffleAddressList must be a boolean if provided");return new Qa(t.shuffleAddressList===!0)}};rr.PickFirstLoadBalancingConfig=Qa;var lw=class{constructor(t){this.subchannel=t}pick(t){return{pickResultType:Qu.PickResultType.COMPLETE,subchannel:this.subchannel,status:null,onCallStarted:null,onCallEnded:null}}};function XO(e){let t=e.slice();for(let n=t.length-1;n>1;n--){let r=Math.floor(Math.random()*(n+1)),i=t[n];t[n]=t[r],t[r]=i}return t}rr.shuffled=XO;function S9(e){let t=[],n=[],r=[],i=(0,ZO.isTcpSubchannelAddress)(e[0])&&(0,YO.isIPv6)(e[0].host);for(let o of e)(0,ZO.isTcpSubchannelAddress)(o)&&(0,YO.isIPv6)(o.host)?n.push(o):r.push(o);let a=i?n:r,s=i?r:n;for(let o=0;o<Math.max(a.length,s.length);o++)o<a.length&&t.push(a[o]),o<s.length&&t.push(s[o]);return t}var $O="grpc-node.internal.pick-first.report_health_status",rd=class{constructor(t,n){this.channelControlHelper=t,this.children=[],this.currentState=It.ConnectivityState.IDLE,this.currentSubchannelIndex=0,this.currentPick=null,this.subchannelStateListener=(r,i,a,s,o)=>{this.onSubchannelStateUpdate(r,i,a,o)},this.pickedSubchannelHealthListener=()=>this.calculateAndReportNewState(),this.triedAllSubchannels=!1,this.stickyTransientFailureMode=!1,this.requestedResolutionSinceLastUpdate=!1,this.lastError=null,this.latestAddressList=null,this.connectionDelayTimeout=setTimeout(()=>{},0),clearTimeout(this.connectionDelayTimeout),this.reportHealthStatus=n[$O]}allChildrenHaveReportedTF(){return this.children.every(t=>t.hasReportedTransientFailure)}calculateAndReportNewState(){this.currentPick?this.reportHealthStatus&&!this.currentPick.isHealthy()?this.updateState(It.ConnectivityState.TRANSIENT_FAILURE,new Qu.UnavailablePicker({details:`Picked subchannel ${this.currentPick.getAddress()} is unhealthy`})):this.updateState(It.ConnectivityState.READY,new lw(this.currentPick)):this.children.length===0?this.updateState(It.ConnectivityState.IDLE,new Qu.QueuePicker(this)):this.stickyTransientFailureMode?this.updateState(It.ConnectivityState.TRANSIENT_FAILURE,new Qu.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(It.ConnectivityState.CONNECTING,new Qu.QueuePicker(this))}requestReresolution(){this.requestedResolutionSinceLastUpdate=!0,this.channelControlHelper.requestReresolution()}maybeEnterStickyTransientFailureMode(){if(this.allChildrenHaveReportedTF()&&(this.requestedResolutionSinceLastUpdate||this.requestReresolution(),!this.stickyTransientFailureMode)){this.stickyTransientFailureMode=!0;for(let{subchannel:t}of this.children)t.startConnecting();this.calculateAndReportNewState()}}removeCurrentPick(){if(this.currentPick!==null){let t=this.currentPick;this.currentPick=null,t.unref(),t.removeConnectivityStateListener(this.subchannelStateListener),this.channelControlHelper.removeChannelzChild(t.getChannelzRef()),this.reportHealthStatus&&t.removeHealthStateWatcher(this.pickedSubchannelHealthListener)}}onSubchannelStateUpdate(t,n,r,i){var a;if(!((a=this.currentPick)===null||a===void 0)&&a.realSubchannelEquals(t)){r!==It.ConnectivityState.READY&&(this.removeCurrentPick(),this.calculateAndReportNewState(),this.requestReresolution());return}for(let[s,o]of this.children.entries())if(t.realSubchannelEquals(o.subchannel)){r===It.ConnectivityState.READY&&this.pickSubchannel(o.subchannel),r===It.ConnectivityState.TRANSIENT_FAILURE&&(o.hasReportedTransientFailure=!0,i&&(this.lastError=i),this.maybeEnterStickyTransientFailureMode(),s===this.currentSubchannelIndex&&this.startNextSubchannelConnecting(s+1)),o.subchannel.startConnecting();return}}startNextSubchannelConnecting(t){if(clearTimeout(this.connectionDelayTimeout),!this.triedAllSubchannels){for(let[n,r]of this.children.entries())if(n>=t){let i=r.subchannel.getConnectivityState();if(i===It.ConnectivityState.IDLE||i===It.ConnectivityState.CONNECTING){this.startConnecting(n);return}}this.triedAllSubchannels=!0,this.maybeEnterStickyTransientFailureMode()}}startConnecting(t){var n,r;clearTimeout(this.connectionDelayTimeout),this.currentSubchannelIndex=t,this.children[t].subchannel.getConnectivityState()===It.ConnectivityState.IDLE&&(cw("Start connecting to subchannel with address "+this.children[t].subchannel.getAddress()),process.nextTick(()=>{var i;(i=this.children[t])===null||i===void 0||i.subchannel.startConnecting()})),this.connectionDelayTimeout=setTimeout(()=>{this.startNextSubchannelConnecting(t+1)},I9),(r=(n=this.connectionDelayTimeout).unref)===null||r===void 0||r.call(n)}pickSubchannel(t){this.currentPick&&t.realSubchannelEquals(this.currentPick)||(cw("Pick subchannel with address "+t.getAddress()),this.stickyTransientFailureMode=!1,this.removeCurrentPick(),this.currentPick=t,t.ref(),this.reportHealthStatus&&t.addHealthStateWatcher(this.pickedSubchannelHealthListener),this.channelControlHelper.addChannelzChild(t.getChannelzRef()),this.resetSubchannelList(),clearTimeout(this.connectionDelayTimeout),this.calculateAndReportNewState())}updateState(t,n){cw(It.ConnectivityState[this.currentState]+" -> "+It.ConnectivityState[t]),this.currentState=t,this.channelControlHelper.updateState(t,n)}resetSubchannelList(){for(let t of this.children)this.currentPick&&t.subchannel.realSubchannelEquals(this.currentPick)||t.subchannel.removeConnectivityStateListener(this.subchannelStateListener),t.subchannel.unref(),this.channelControlHelper.removeChannelzChild(t.subchannel.getChannelzRef());this.currentSubchannelIndex=0,this.children=[],this.triedAllSubchannels=!1,this.requestedResolutionSinceLastUpdate=!1}connectToAddressList(t){let n=t.map(r=>({subchannel:this.channelControlHelper.createSubchannel(r,{}),hasReportedTransientFailure:!1}));for(let{subchannel:r}of n)r.ref(),this.channelControlHelper.addChannelzChild(r.getChannelzRef());this.resetSubchannelList(),this.children=n;for(let{subchannel:r}of this.children)if(r.addConnectivityStateListener(this.subchannelStateListener),r.getConnectivityState()===It.ConnectivityState.READY){this.pickSubchannel(r);return}for(let r of this.children)r.subchannel.getConnectivityState()===It.ConnectivityState.TRANSIENT_FAILURE&&(r.hasReportedTransientFailure=!0);this.startNextSubchannelConnecting(0),this.calculateAndReportNewState()}updateAddressList(t,n){if(!(n instanceof Qa))return;n.getShuffleAddressList()&&(t=XO(t));let r=[].concat(...t.map(a=>a.addresses));if(r.length===0)throw new Error("No addresses in endpoint list passed to pick_first");let i=S9(r);this.latestAddressList=i,this.connectToAddressList(i)}exitIdle(){this.currentState===It.ConnectivityState.IDLE&&this.latestAddressList&&this.connectToAddressList(this.latestAddressList)}resetBackoff(){}destroy(){this.resetSubchannelList(),this.removeCurrentPick()}getTypeName(){return nd}};rr.PickFirstLoadBalancer=rd;var x9=new Qa(!1),dw=class{constructor(t,n,r){this.endpoint=t,this.latestState=It.ConnectivityState.IDLE;let i=(0,uw.createChildChannelControlHelper)(n,{updateState:(a,s)=>{this.latestState=a,this.latestPicker=s,n.updateState(a,s)}});this.pickFirstBalancer=new rd(i,Object.assign(Object.assign({},r),{[$O]:!0})),this.latestPicker=new Qu.QueuePicker(this.pickFirstBalancer)}startConnecting(){this.pickFirstBalancer.updateAddressList([this.endpoint],x9)}updateEndpoint(t){this.endpoint=t,this.latestState!==It.ConnectivityState.IDLE&&this.startConnecting()}getConnectivityState(){return this.latestState}getPicker(){return this.latestPicker}getEndpoint(){return this.endpoint}exitIdle(){this.pickFirstBalancer.exitIdle()}destroy(){this.pickFirstBalancer.destroy()}};rr.LeafLoadBalancer=dw;function T9(){(0,uw.registerLoadBalancerType)(nd,rd,Qa),(0,uw.registerDefaultLoadBalancerType)(nd)}rr.setup=T9});var pw=N(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.BaseSubchannelWrapper=le.registerAdminService=le.FilterStackFactory=le.BaseFilter=le.PickResultType=le.QueuePicker=le.UnavailablePicker=le.ChildLoadBalancerHandler=le.EndpointMap=le.endpointHasAddress=le.endpointToString=le.subchannelAddressToString=le.LeafLoadBalancer=le.isLoadBalancerNameRegistered=le.parseLoadBalancingConfig=le.selectLbConfigFromList=le.registerLoadBalancerType=le.createChildChannelControlHelper=le.BackoffTimeout=le.durationToMs=le.uriToString=le.createResolver=le.registerResolver=le.log=le.trace=void 0;var KO=ot();Object.defineProperty(le,"trace",{enumerable:!0,get:function(){return KO.trace}});Object.defineProperty(le,"log",{enumerable:!0,get:function(){return KO.log}});var jO=ri();Object.defineProperty(le,"registerResolver",{enumerable:!0,get:function(){return jO.registerResolver}});Object.defineProperty(le,"createResolver",{enumerable:!0,get:function(){return jO.createResolver}});var N9=Bn();Object.defineProperty(le,"uriToString",{enumerable:!0,get:function(){return N9.uriToString}});var R9=ow();Object.defineProperty(le,"durationToMs",{enumerable:!0,get:function(){return R9.durationToMs}});var k9=Sl();Object.defineProperty(le,"BackoffTimeout",{enumerable:!0,get:function(){return k9.BackoffTimeout}});var id=ys();Object.defineProperty(le,"createChildChannelControlHelper",{enumerable:!0,get:function(){return id.createChildChannelControlHelper}});Object.defineProperty(le,"registerLoadBalancerType",{enumerable:!0,get:function(){return id.registerLoadBalancerType}});Object.defineProperty(le,"selectLbConfigFromList",{enumerable:!0,get:function(){return id.selectLbConfigFromList}});Object.defineProperty(le,"parseLoadBalancingConfig",{enumerable:!0,get:function(){return id.parseLoadBalancingConfig}});Object.defineProperty(le,"isLoadBalancerNameRegistered",{enumerable:!0,get:function(){return id.isLoadBalancerNameRegistered}});var B9=lh();Object.defineProperty(le,"LeafLoadBalancer",{enumerable:!0,get:function(){return B9.LeafLoadBalancer}});var dh=kr();Object.defineProperty(le,"subchannelAddressToString",{enumerable:!0,get:function(){return dh.subchannelAddressToString}});Object.defineProperty(le,"endpointToString",{enumerable:!0,get:function(){return dh.endpointToString}});Object.defineProperty(le,"endpointHasAddress",{enumerable:!0,get:function(){return dh.endpointHasAddress}});Object.defineProperty(le,"EndpointMap",{enumerable:!0,get:function(){return dh.EndpointMap}});var O9=Xf();Object.defineProperty(le,"ChildLoadBalancerHandler",{enumerable:!0,get:function(){return O9.ChildLoadBalancerHandler}});var fw=Ea();Object.defineProperty(le,"UnavailablePicker",{enumerable:!0,get:function(){return fw.UnavailablePicker}});Object.defineProperty(le,"QueuePicker",{enumerable:!0,get:function(){return fw.QueuePicker}});Object.defineProperty(le,"PickResultType",{enumerable:!0,get:function(){return fw.PickResultType}});var P9=Cv();Object.defineProperty(le,"BaseFilter",{enumerable:!0,get:function(){return P9.BaseFilter}});var D9=vv();Object.defineProperty(le,"FilterStackFactory",{enumerable:!0,get:function(){return D9.FilterStackFactory}});var M9=jf();Object.defineProperty(le,"registerAdminService",{enumerable:!0,get:function(){return M9.registerAdminService}});var F9=jp();Object.defineProperty(le,"BaseSubchannelWrapper",{enumerable:!0,get:function(){return F9.BaseSubchannelWrapper}})});var e3=N(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.setup=void 0;var L9=ri(),hw=class{constructor(t,n,r){this.listener=n,this.hasReturnedResult=!1,this.endpoints=[];let i;t.authority===""?i="/"+t.path:i=t.path,this.endpoints=[{addresses:[{path:i}]}]}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(this.listener.onSuccessfulResolution,this.endpoints,null,null,null,{}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(t){return"localhost"}};function U9(){(0,L9.registerResolver)("unix",hw)}fh.setup=U9});var a3=N(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});mh.setup=void 0;var t3=ye("net"),ph=Me(),mw=an(),n3=ri(),r3=Bn(),Q9=ot(),q9="ip_resolver";function i3(e){Q9.trace(ph.LogVerbosity.DEBUG,q9,e)}var gw="ipv4",_w="ipv6",V9=443,hh=class{constructor(t,n,r){var i;this.listener=n,this.endpoints=[],this.error=null,this.hasReturnedResult=!1,i3("Resolver constructed for target "+(0,r3.uriToString)(t));let a=[];if(!(t.scheme===gw||t.scheme===_w)){this.error={code:ph.Status.UNAVAILABLE,details:`Unrecognized scheme ${t.scheme} in IP resolver`,metadata:new mw.Metadata};return}let s=t.path.split(",");for(let o of s){let c=(0,r3.splitHostPort)(o);if(c===null){this.error={code:ph.Status.UNAVAILABLE,details:`Failed to parse ${t.scheme} address ${o}`,metadata:new mw.Metadata};return}if(t.scheme===gw&&!(0,t3.isIPv4)(c.host)||t.scheme===_w&&!(0,t3.isIPv6)(c.host)){this.error={code:ph.Status.UNAVAILABLE,details:`Failed to parse ${t.scheme} address ${o}`,metadata:new mw.Metadata};return}a.push({host:c.host,port:(i=c.port)!==null&&i!==void 0?i:V9})}this.endpoints=a.map(o=>({addresses:[o]})),i3("Parsed "+t.scheme+" address list "+a)}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(()=>{this.error?this.listener.onError(this.error):this.listener.onSuccessfulResolution(this.endpoints,null,null,null,{})}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(t){return t.path.split(",")[0]}};function J9(){(0,n3.registerResolver)(gw,hh),(0,n3.registerResolver)(_w,hh)}mh.setup=J9});var u3=N(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.setup=qu.RoundRobinLoadBalancer=void 0;var c3=ys(),Mn=Wn(),Aw=Ea(),z9=ot(),G9=Me(),s3=kr(),H9=lh(),W9="round_robin";function o3(e){z9.trace(G9.LogVerbosity.DEBUG,W9,e)}var gh="round_robin",ad=class{getLoadBalancerName(){return gh}constructor(){}toJsonObject(){return{[gh]:{}}}static createFromJson(t){return new ad}},yw=class{constructor(t,n=0){this.children=t,this.nextIndex=n}pick(t){let n=this.children[this.nextIndex].picker;return this.nextIndex=(this.nextIndex+1)%this.children.length,n.pick(t)}peekNextEndpoint(){return this.children[this.nextIndex].endpoint}},_h=class{constructor(t,n){this.channelControlHelper=t,this.options=n,this.children=[],this.currentState=Mn.ConnectivityState.IDLE,this.currentReadyPicker=null,this.updatesPaused=!1,this.lastError=null,this.childChannelControlHelper=(0,c3.createChildChannelControlHelper)(t,{updateState:(r,i)=>{this.calculateAndUpdateState()}})}countChildrenWithState(t){return this.children.filter(n=>n.getConnectivityState()===t).length}calculateAndUpdateState(){if(!this.updatesPaused){if(this.countChildrenWithState(Mn.ConnectivityState.READY)>0){let t=this.children.filter(r=>r.getConnectivityState()===Mn.ConnectivityState.READY),n=0;if(this.currentReadyPicker!==null){let r=this.currentReadyPicker.peekNextEndpoint();n=t.findIndex(i=>(0,s3.endpointEqual)(i.getEndpoint(),r)),n<0&&(n=0)}this.updateState(Mn.ConnectivityState.READY,new yw(t.map(r=>({endpoint:r.getEndpoint(),picker:r.getPicker()})),n))}else this.countChildrenWithState(Mn.ConnectivityState.CONNECTING)>0?this.updateState(Mn.ConnectivityState.CONNECTING,new Aw.QueuePicker(this)):this.countChildrenWithState(Mn.ConnectivityState.TRANSIENT_FAILURE)>0?this.updateState(Mn.ConnectivityState.TRANSIENT_FAILURE,new Aw.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(Mn.ConnectivityState.IDLE,new Aw.QueuePicker(this));for(let t of this.children)t.getConnectivityState()===Mn.ConnectivityState.IDLE&&t.exitIdle()}}updateState(t,n){o3(Mn.ConnectivityState[this.currentState]+" -> "+Mn.ConnectivityState[t]),t===Mn.ConnectivityState.READY?this.currentReadyPicker=n:this.currentReadyPicker=null,this.currentState=t,this.channelControlHelper.updateState(t,n)}resetSubchannelList(){for(let t of this.children)t.destroy()}updateAddressList(t,n){this.resetSubchannelList(),o3("Connect to endpoint list "+t.map(s3.endpointToString)),this.updatesPaused=!0,this.children=t.map(r=>new H9.LeafLoadBalancer(r,this.childChannelControlHelper,this.options));for(let r of this.children)r.startConnecting();this.updatesPaused=!1,this.calculateAndUpdateState()}exitIdle(){}resetBackoff(){}destroy(){this.resetSubchannelList()}getTypeName(){return gh}};qu.RoundRobinLoadBalancer=_h;function Z9(){(0,c3.registerLoadBalancerType)(gh,_h,ad)}qu.setup=Z9});var f3=N(qa=>{"use strict";var bw;Object.defineProperty(qa,"__esModule",{value:!0});qa.setup=qa.OutlierDetectionLoadBalancer=qa.OutlierDetectionLoadBalancingConfig=void 0;var Y9=Wn(),l3=Me(),ks=ow(),d3=pw(),X9=ys(),$9=Xf(),K9=Ea(),vw=kr(),j9=jp(),eW=ot(),tW="outlier_detection";function Vt(e){eW.trace(l3.LogVerbosity.DEBUG,tW,e)}var xw="outlier_detection",nW=((bw=process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION)!==null&&bw!==void 0?bw:"true")==="true",rW={stdev_factor:1900,enforcement_percentage:100,minimum_hosts:5,request_volume:100},iW={threshold:85,enforcement_percentage:100,minimum_hosts:5,request_volume:50};function Vu(e,t,n,r){if(t in e&&e[t]!==void 0&&typeof e[t]!==n){let i=r?`${r}.${t}`:t;throw new Error(`outlier detection config ${i} parse error: expected ${n}, got ${typeof e[t]}`)}}function ww(e,t,n){let r=n?`${n}.${t}`:t;if(t in e&&e[t]!==void 0){if(!(0,ks.isDuration)(e[t]))throw new Error(`outlier detection config ${r} parse error: expected Duration, got ${typeof e[t]}`);if(!(e[t].seconds>=0&&e[t].seconds<=315576e6&&e[t].nanos>=0&&e[t].nanos<=999999999))throw new Error(`outlier detection config ${r} parse error: values out of range for non-negative Duaration`)}}function Ah(e,t,n){let r=n?`${n}.${t}`:t;if(Vu(e,t,"number",n),t in e&&e[t]!==void 0&&!(e[t]>=0&&e[t]<=100))throw new Error(`outlier detection config ${r} parse error: value out of range for percentage (0-100)`)}var Bs=class{constructor(t,n,r,i,a,s,o){if(this.childPolicy=o,o.getLoadBalancerName()==="pick_first")throw new Error("outlier_detection LB policy cannot have a pick_first child policy");this.intervalMs=t??1e4,this.baseEjectionTimeMs=n??3e4,this.maxEjectionTimeMs=r??3e5,this.maxEjectionPercent=i??10,this.successRateEjection=a?Object.assign(Object.assign({},rW),a):null,this.failurePercentageEjection=s?Object.assign(Object.assign({},iW),s):null}getLoadBalancerName(){return xw}toJsonObject(){var t,n;return{outlier_detection:{interval:(0,ks.msToDuration)(this.intervalMs),base_ejection_time:(0,ks.msToDuration)(this.baseEjectionTimeMs),max_ejection_time:(0,ks.msToDuration)(this.maxEjectionTimeMs),max_ejection_percent:this.maxEjectionPercent,success_rate_ejection:(t=this.successRateEjection)!==null&&t!==void 0?t:void 0,failure_percentage_ejection:(n=this.failurePercentageEjection)!==null&&n!==void 0?n:void 0,child_policy:[this.childPolicy.toJsonObject()]}}}getIntervalMs(){return this.intervalMs}getBaseEjectionTimeMs(){return this.baseEjectionTimeMs}getMaxEjectionTimeMs(){return this.maxEjectionTimeMs}getMaxEjectionPercent(){return this.maxEjectionPercent}getSuccessRateEjectionConfig(){return this.successRateEjection}getFailurePercentageEjectionConfig(){return this.failurePercentageEjection}getChildPolicy(){return this.childPolicy}static createFromJson(t){var n;if(ww(t,"interval"),ww(t,"base_ejection_time"),ww(t,"max_ejection_time"),Ah(t,"max_ejection_percent"),"success_rate_ejection"in t&&t.success_rate_ejection!==void 0){if(typeof t.success_rate_ejection!="object")throw new Error("outlier detection config success_rate_ejection must be an object");Vu(t.success_rate_ejection,"stdev_factor","number","success_rate_ejection"),Ah(t.success_rate_ejection,"enforcement_percentage","success_rate_ejection"),Vu(t.success_rate_ejection,"minimum_hosts","number","success_rate_ejection"),Vu(t.success_rate_ejection,"request_volume","number","success_rate_ejection")}if("failure_percentage_ejection"in t&&t.failure_percentage_ejection!==void 0){if(typeof t.failure_percentage_ejection!="object")throw new Error("outlier detection config failure_percentage_ejection must be an object");Ah(t.failure_percentage_ejection,"threshold","failure_percentage_ejection"),Ah(t.failure_percentage_ejection,"enforcement_percentage","failure_percentage_ejection"),Vu(t.failure_percentage_ejection,"minimum_hosts","number","failure_percentage_ejection"),Vu(t.failure_percentage_ejection,"request_volume","number","failure_percentage_ejection")}if(!("child_policy"in t)||!Array.isArray(t.child_policy))throw new Error("outlier detection config child_policy must be an array");let r=(0,X9.selectLbConfigFromList)(t.child_policy);if(!r)throw new Error("outlier detection config child_policy: no valid recognized policy found");return new Bs(t.interval?(0,ks.durationToMs)(t.interval):null,t.base_ejection_time?(0,ks.durationToMs)(t.base_ejection_time):null,t.max_ejection_time?(0,ks.durationToMs)(t.max_ejection_time):null,(n=t.max_ejection_percent)!==null&&n!==void 0?n:null,t.success_rate_ejection,t.failure_percentage_ejection,r)}};qa.OutlierDetectionLoadBalancingConfig=Bs;var Cw=class extends j9.BaseSubchannelWrapper{constructor(t,n){super(t),this.mapEntry=n,this.refCount=0}ref(){this.child.ref(),this.refCount+=1}unref(){if(this.child.unref(),this.refCount-=1,this.refCount<=0&&this.mapEntry){let t=this.mapEntry.subchannelWrappers.indexOf(this);t>=0&&this.mapEntry.subchannelWrappers.splice(t,1)}}eject(){this.setHealthy(!1)}uneject(){this.setHealthy(!0)}getMapEntry(){return this.mapEntry}getWrappedSubchannel(){return this.child}};function Ew(){return{success:0,failure:0}}var Iw=class{constructor(){this.activeBucket=Ew(),this.inactiveBucket=Ew()}addSuccess(){this.activeBucket.success+=1}addFailure(){this.activeBucket.failure+=1}switchBuckets(){this.inactiveBucket=this.activeBucket,this.activeBucket=Ew()}getLastSuccesses(){return this.inactiveBucket.success}getLastFailures(){return this.inactiveBucket.failure}},Sw=class{constructor(t,n){this.wrappedPicker=t,this.countCalls=n}pick(t){let n=this.wrappedPicker.pick(t);if(n.pickResultType===K9.PickResultType.COMPLETE){let r=n.subchannel,i=r.getMapEntry();if(i){let a=n.onCallEnded;return this.countCalls&&(a=s=>{var o;s===l3.Status.OK?i.counter.addSuccess():i.counter.addFailure(),(o=n.onCallEnded)===null||o===void 0||o.call(n,s)}),Object.assign(Object.assign({},n),{subchannel:r.getWrappedSubchannel(),onCallEnded:a})}else return Object.assign(Object.assign({},n),{subchannel:r.getWrappedSubchannel()})}else return n}},yh=class{constructor(t,n){this.entryMap=new vw.EndpointMap,this.latestConfig=null,this.timerStartTime=null,this.childBalancer=new $9.ChildLoadBalancerHandler((0,d3.createChildChannelControlHelper)(t,{createSubchannel:(r,i)=>{let a=t.createSubchannel(r,i),s=this.entryMap.getForSubchannelAddress(r),o=new Cw(a,s);return s?.currentEjectionTimestamp!==null&&o.eject(),s?.subchannelWrappers.push(o),o},updateState:(r,i)=>{r===Y9.ConnectivityState.READY?t.updateState(r,new Sw(i,this.isCountingEnabled())):t.updateState(r,i)}}),n),this.ejectionTimer=setInterval(()=>{},0),clearInterval(this.ejectionTimer)}isCountingEnabled(){return this.latestConfig!==null&&(this.latestConfig.getSuccessRateEjectionConfig()!==null||this.latestConfig.getFailurePercentageEjectionConfig()!==null)}getCurrentEjectionPercent(){let t=0;for(let n of this.entryMap.values())n.currentEjectionTimestamp!==null&&(t+=1);return t*100/this.entryMap.size}runSuccessRateCheck(t){if(!this.latestConfig)return;let n=this.latestConfig.getSuccessRateEjectionConfig();if(!n)return;Vt("Running success rate check");let r=n.request_volume,i=0,a=[];for(let[p,h]of this.entryMap.entries()){let _=h.counter.getLastSuccesses(),I=h.counter.getLastFailures();Vt("Stats for "+(0,vw.endpointToString)(p)+": successes="+_+" failures="+I+" targetRequestVolume="+r),_+I>=r&&(i+=1,a.push(_/(_+I)))}if(Vt("Found "+i+" success rate candidates; currentEjectionPercent="+this.getCurrentEjectionPercent()+" successRates=["+a+"]"),i<n.minimum_hosts)return;let s=a.reduce((p,h)=>p+h)/a.length,o=0;for(let p of a){let h=p-s;o+=h*h}let c=o/a.length,u=Math.sqrt(c),d=s-u*(n.stdev_factor/1e3);Vt("stdev="+u+" ejectionThreshold="+d);for(let[p,h]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let _=h.counter.getLastSuccesses(),I=h.counter.getLastFailures();if(_+I<r)continue;let v=_/(_+I);if(Vt("Checking candidate "+p+" successRate="+v),v<d){let b=Math.random()*100;Vt("Candidate "+p+" randomNumber="+b+" enforcement_percentage="+n.enforcement_percentage),b<n.enforcement_percentage&&(Vt("Ejecting candidate "+p),this.eject(h,t))}}}runFailurePercentageCheck(t){if(!this.latestConfig)return;let n=this.latestConfig.getFailurePercentageEjectionConfig();if(!n)return;Vt("Running failure percentage check. threshold="+n.threshold+" request volume threshold="+n.request_volume);let r=0;for(let i of this.entryMap.values()){let a=i.counter.getLastSuccesses(),s=i.counter.getLastFailures();a+s>=n.request_volume&&(r+=1)}if(!(r<n.minimum_hosts))for(let[i,a]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let s=a.counter.getLastSuccesses(),o=a.counter.getLastFailures();if(Vt("Candidate successes="+s+" failures="+o),s+o<n.request_volume)continue;if(o*100/(o+s)>n.threshold){let u=Math.random()*100;Vt("Candidate "+i+" randomNumber="+u+" enforcement_percentage="+n.enforcement_percentage),u<n.enforcement_percentage&&(Vt("Ejecting candidate "+i),this.eject(a,t))}}}eject(t,n){t.currentEjectionTimestamp=new Date,t.ejectionTimeMultiplier+=1;for(let r of t.subchannelWrappers)r.eject()}uneject(t){t.currentEjectionTimestamp=null;for(let n of t.subchannelWrappers)n.uneject()}switchAllBuckets(){for(let t of this.entryMap.values())t.counter.switchBuckets()}startTimer(t){var n,r;this.ejectionTimer=setTimeout(()=>this.runChecks(),t),(r=(n=this.ejectionTimer).unref)===null||r===void 0||r.call(n)}runChecks(){let t=new Date;if(Vt("Ejection timer running"),this.switchAllBuckets(),!!this.latestConfig){this.timerStartTime=t,this.startTimer(this.latestConfig.getIntervalMs()),this.runSuccessRateCheck(t),this.runFailurePercentageCheck(t);for(let[n,r]of this.entryMap.entries())if(r.currentEjectionTimestamp===null)r.ejectionTimeMultiplier>0&&(r.ejectionTimeMultiplier-=1);else{let i=this.latestConfig.getBaseEjectionTimeMs(),a=this.latestConfig.getMaxEjectionTimeMs(),s=new Date(r.currentEjectionTimestamp.getTime());s.setMilliseconds(s.getMilliseconds()+Math.min(i*r.ejectionTimeMultiplier,Math.max(i,a))),s<new Date&&(Vt("Unejecting "+n),this.uneject(r))}}}updateAddressList(t,n,r){if(!(n instanceof Bs))return;for(let a of t)this.entryMap.has(a)||(Vt("Adding map entry for "+(0,vw.endpointToString)(a)),this.entryMap.set(a,{counter:new Iw,currentEjectionTimestamp:null,ejectionTimeMultiplier:0,subchannelWrappers:[]}));this.entryMap.deleteMissing(t);let i=n.getChildPolicy();if(this.childBalancer.updateAddressList(t,i,r),n.getSuccessRateEjectionConfig()||n.getFailurePercentageEjectionConfig())if(this.timerStartTime){Vt("Previous timer existed. Replacing timer"),clearTimeout(this.ejectionTimer);let a=n.getIntervalMs()-(new Date().getTime()-this.timerStartTime.getTime());this.startTimer(a)}else Vt("Starting new timer"),this.timerStartTime=new Date,this.startTimer(n.getIntervalMs()),this.switchAllBuckets();else{Vt("Counting disabled. Cancelling timer."),this.timerStartTime=null,clearTimeout(this.ejectionTimer);for(let a of this.entryMap.values())this.uneject(a),a.ejectionTimeMultiplier=0}this.latestConfig=n}exitIdle(){this.childBalancer.exitIdle()}resetBackoff(){this.childBalancer.resetBackoff()}destroy(){clearTimeout(this.ejectionTimer),this.childBalancer.destroy()}getTypeName(){return xw}};qa.OutlierDetectionLoadBalancer=yh;function aW(){nW&&(0,d3.registerLoadBalancerType)(xw,yh,Bs)}qa.setup=aW});var Va=N($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.experimental=$.ServerInterceptingCall=$.ResponderBuilder=$.ServerListenerBuilder=$.addAdminServicesToServer=$.getChannelzHandlers=$.getChannelzServiceDefinition=$.InterceptorConfigurationError=$.InterceptingCall=$.RequesterBuilder=$.ListenerBuilder=$.StatusBuilder=$.getClientChannel=$.ServerCredentials=$.Server=$.setLogVerbosity=$.setLogger=$.load=$.loadObject=$.CallCredentials=$.ChannelCredentials=$.waitForClientReady=$.closeClient=$.Channel=$.makeGenericClientConstructor=$.makeClientConstructor=$.loadPackageDefinition=$.Client=$.compressionAlgorithms=$.propagate=$.connectivityState=$.status=$.logVerbosity=$.Metadata=$.credentials=void 0;var bh=By();Object.defineProperty($,"CallCredentials",{enumerable:!0,get:function(){return bh.CallCredentials}});var sW=ub();Object.defineProperty($,"Channel",{enumerable:!0,get:function(){return sW.ChannelImplementation}});var oW=wv();Object.defineProperty($,"compressionAlgorithms",{enumerable:!0,get:function(){return oW.CompressionAlgorithms}});var cW=Wn();Object.defineProperty($,"connectivityState",{enumerable:!0,get:function(){return cW.ConnectivityState}});var vh=Jf();Object.defineProperty($,"ChannelCredentials",{enumerable:!0,get:function(){return vh.ChannelCredentials}});var p3=cb();Object.defineProperty($,"Client",{enumerable:!0,get:function(){return p3.Client}});var Tw=Me();Object.defineProperty($,"logVerbosity",{enumerable:!0,get:function(){return Tw.LogVerbosity}});Object.defineProperty($,"status",{enumerable:!0,get:function(){return Tw.Status}});Object.defineProperty($,"propagate",{enumerable:!0,get:function(){return Tw.Propagate}});var h3=ot(),Nw=db();Object.defineProperty($,"loadPackageDefinition",{enumerable:!0,get:function(){return Nw.loadPackageDefinition}});Object.defineProperty($,"makeClientConstructor",{enumerable:!0,get:function(){return Nw.makeClientConstructor}});Object.defineProperty($,"makeGenericClientConstructor",{enumerable:!0,get:function(){return Nw.makeClientConstructor}});var uW=an();Object.defineProperty($,"Metadata",{enumerable:!0,get:function(){return uW.Metadata}});var lW=HO();Object.defineProperty($,"Server",{enumerable:!0,get:function(){return lW.Server}});var dW=Xv();Object.defineProperty($,"ServerCredentials",{enumerable:!0,get:function(){return dW.ServerCredentials}});var fW=WO();Object.defineProperty($,"StatusBuilder",{enumerable:!0,get:function(){return fW.StatusBuilder}});$.credentials={combineChannelCredentials:(e,...t)=>t.reduce((n,r)=>n.compose(r),e),combineCallCredentials:(e,...t)=>t.reduce((n,r)=>n.compose(r),e),createInsecure:vh.ChannelCredentials.createInsecure,createSsl:vh.ChannelCredentials.createSsl,createFromSecureContext:vh.ChannelCredentials.createFromSecureContext,createFromMetadataGenerator:bh.CallCredentials.createFromMetadataGenerator,createFromGoogleCredential:bh.CallCredentials.createFromGoogleCredential,createEmpty:bh.CallCredentials.createEmpty};var pW=e=>e.close();$.closeClient=pW;var hW=(e,t,n)=>e.waitForReady(t,n);$.waitForClientReady=hW;var mW=(e,t)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};$.loadObject=mW;var gW=(e,t,n)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};$.load=gW;var _W=e=>{h3.setLogger(e)};$.setLogger=_W;var AW=e=>{h3.setLoggerVerbosity(e)};$.setLogVerbosity=AW;var yW=e=>p3.Client.prototype.getChannel.call(e);$.getClientChannel=yW;var wh=ab();Object.defineProperty($,"ListenerBuilder",{enumerable:!0,get:function(){return wh.ListenerBuilder}});Object.defineProperty($,"RequesterBuilder",{enumerable:!0,get:function(){return wh.RequesterBuilder}});Object.defineProperty($,"InterceptingCall",{enumerable:!0,get:function(){return wh.InterceptingCall}});Object.defineProperty($,"InterceptorConfigurationError",{enumerable:!0,get:function(){return wh.InterceptorConfigurationError}});var m3=Ss();Object.defineProperty($,"getChannelzServiceDefinition",{enumerable:!0,get:function(){return m3.getChannelzServiceDefinition}});Object.defineProperty($,"getChannelzHandlers",{enumerable:!0,get:function(){return m3.getChannelzHandlers}});var bW=jf();Object.defineProperty($,"addAdminServicesToServer",{enumerable:!0,get:function(){return bW.addAdminServicesToServer}});var Rw=rw();Object.defineProperty($,"ServerListenerBuilder",{enumerable:!0,get:function(){return Rw.ServerListenerBuilder}});Object.defineProperty($,"ResponderBuilder",{enumerable:!0,get:function(){return Rw.ResponderBuilder}});Object.defineProperty($,"ServerInterceptingCall",{enumerable:!0,get:function(){return Rw.ServerInterceptingCall}});var vW=pw();$.experimental=vW;var wW=dv(),EW=e3(),CW=a3(),IW=lh(),SW=u3(),xW=f3(),TW=Ss();wW.setup(),EW.setup(),CW.setup(),IW.setup(),SW.setup(),xW.setup(),TW.setup()});var g3=N(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.isGrpcJsServiceDefinition=Ju.fromGrpcJsServiceDefinition=void 0;function NW(e){let t={};for(let[n,r]of Object.entries(e))t[n]={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,requestDeserialize:i=>r.requestDeserialize(Buffer.from(i)),requestSerialize:r.requestSerialize,responseDeserialize:i=>r.responseDeserialize(Buffer.from(i)),responseSerialize:r.responseSerialize,options:{}};return t}Ju.fromGrpcJsServiceDefinition=NW;function RW(e){return Object.values(e).every(t=>typeof t=="object"&&t!=null&&typeof t.path=="string")}Ju.isGrpcJsServiceDefinition=RW});var _3=N(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.isTsProtoServiceDefinition=zu.fromTsProtoServiceDefinition=void 0;function kW(e){let t={};for(let[n,r]of Object.entries(e.methods)){let i=r.requestType.encode,a=r.requestType.fromPartial,s=r.responseType.encode,o=r.responseType.fromPartial;t[n]={path:`/${e.fullName}/${r.name}`,requestStream:r.requestStream,responseStream:r.responseStream,requestDeserialize:r.requestType.decode,requestSerialize:a!=null?c=>i(a(c)).finish():c=>i(c).finish(),responseDeserialize:r.responseType.decode,responseSerialize:o!=null?c=>s(o(c)).finish():c=>s(c).finish(),options:r.options}}return t}zu.fromTsProtoServiceDefinition=kW;function BW(e){return"name"in e&&"fullName"in e&&"methods"in e}zu.isTsProtoServiceDefinition=BW});var Os=N(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.toGrpcJsMethodDefinition=Ja.toGrpcJsServiceDefinition=Ja.normalizeServiceDefinition=void 0;var A3=g3(),y3=_3();function OW(e){return(0,A3.isGrpcJsServiceDefinition)(e)?(0,A3.fromGrpcJsServiceDefinition)(e):(0,y3.isTsProtoServiceDefinition)(e)?(0,y3.fromTsProtoServiceDefinition)(e):e}Ja.normalizeServiceDefinition=OW;function PW(e){let t={};for(let[n,r]of Object.entries(e))t[n]=b3(r);return t}Ja.toGrpcJsServiceDefinition=PW;function b3(e){return{path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,requestDeserialize:e.requestDeserialize,requestSerialize:t=>Buffer.from(e.requestSerialize(t)),responseDeserialize:e.responseDeserialize,responseSerialize:t=>Buffer.from(e.responseSerialize(t))}}Ja.toGrpcJsMethodDefinition=b3});function Fn(e){return typeof e=="object"&&e!==null&&e.name==="AbortError"}function DW(e){if(e.aborted)throw new on}function kw(e){if(Fn(e))throw e}function Ps(e){if(!Fn(e))throw e}var on,qi=jt(()=>{on=class extends Error{constructor(){super("The operation has been aborted"),this.message="The operation has been aborted",this.name="AbortError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}}});function Fr(e,t){return new Promise((n,r)=>{if(e.aborted){r(new on);return}let i,a=!1;function s(){a||(a=!0,i?.())}let o=t(c=>{n(c),s()},c=>{r(c),s()});if(!a){let c=()=>{let u=o();u==null?r(new on):u.then(()=>{r(new on)},d=>{r(d)}),s()};e.addEventListener("abort",c),i=()=>{e.removeEventListener("abort",c)}}})}var Ds=jt(()=>{qi()});function MW(e,t){if(e.aborted){let n=()=>{};t.then(n,n)}return Fr(e,(n,r)=>(t.then(n,r),()=>{}))}var v3=jt(()=>{Ds()});function sd(e,t){return Fr(e,n=>{let r=typeof t=="number"?t:t.getTime()-Date.now(),i=setTimeout(n,r);return()=>{clearTimeout(i)}})}var Eh=jt(()=>{Ds()});function FW(e){return Fr(e,()=>()=>{})}var w3=jt(()=>{Ds()});function LW(e,t,n,r){return Fr(e,i=>{let a,s=!1;return a=UW(t,n,(...c)=>{i(c.length>1?c:c[0]),s=!0,a?.()},r),s&&a(),()=>{s=!0,a?.()}})}function UW(e,t,n,r){if(VW(e))return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r);if(qW(e))return e.on(t,n),()=>e.off(t,n);if(QW(e))return e.addListener(t,n),()=>e.removeListener(t,n);throw new Error("Invalid event target")}function QW(e){return Gu(e.addListener)&&Gu(e.removeListener)}function qW(e){return Gu(e.on)&&Gu(e.off)}function VW(e){return Gu(e.addEventListener)&&Gu(e.removeEventListener)}var Gu,E3=jt(()=>{Ds();Gu=e=>typeof e=="function"});function JW(e,t){return new Promise((n,r)=>{if(e.aborted){r(new on);return}let i=new AbortController,a=t(i.signal);if(a.length===0){n([]);return}let s=()=>{i.abort()};e.addEventListener("abort",s);let o,c=new Array(a.length),u=0;function d(){u+=1,u===a.length&&(e.removeEventListener("abort",s),o!=null?r(o.reason):n(c))}for(let[p,h]of a.entries())h.then(_=>{c[p]=_,d()},_=>{i.abort(),(o==null||!Fn(_)&&Fn(o.reason))&&(o={reason:_}),d()})})}var C3=jt(()=>{qi()});function zW(e,t){return new Promise((n,r)=>{if(e.aborted){r(new on);return}let i=new AbortController,a=t(i.signal),s=()=>{i.abort()};e.addEventListener("abort",s);let o=0;function c(d){i.abort(),o+=1,o===a.length&&(e.removeEventListener("abort",s),d.status==="fulfilled"?n(d.value):r(d.reason))}let u;for(let d of a)d.then(p=>{u==null&&(u={status:"fulfilled",value:p}),c(u)},p=>{(u==null||!Fn(p)&&(u.status==="fulfilled"||Fn(u.reason)))&&(u={status:"rejected",reason:p}),c(u)})})}var I3=jt(()=>{qi()});async function GW(e,t,n={}){let{baseMs:r=1e3,maxDelayMs:i=3e4,onError:a,maxAttempts:s=1/0}=n,o=0,c=()=>{o=-1};for(;;)try{return await t(e,o,c)}catch(u){if(kw(u),o>=s)throw u;let d;if(o===-1)d=0;else{let p=Math.min(i,Math.pow(2,o)*r);d=Math.round(p*(1+Math.random())/2)}a&&a(u,o,d),d!==0&&await sd(e,d),o+=1}}var S3=jt(()=>{Eh();qi()});function HW(e,t){if(e.aborted)return Promise.reject(new on);let n=[],r=new AbortController,i=r.signal,a=()=>{r.abort()};e.addEventListener("abort",a);let s=()=>{e.removeEventListener("abort",a)},o=new Set,c=()=>{for(let p of o)p.abort()};i.addEventListener("abort",c);let u=()=>{i.removeEventListener("abort",c)},d=new Promise((p,h)=>{let _,I;v(b=>t(b,{defer(w){n.push(w)},fork:v})).join().then(b=>{r.abort(),_={value:b}},b=>{r.abort(),(!Fn(b)||I==null)&&(I={error:b})});function v(b){if(i.aborted)return{abort(){},async join(){throw new on}};let w=new AbortController,x=w.signal,R=b(x),k={abort(){w.abort()},join:()=>R};return o.add(k),R.catch(Ps).catch(q=>{I={error:q},r.abort()}).finally(()=>{o.delete(k),o.size===0&&(I!=null?h(I.error):p(_.value))}),k}});return d=d.finally(()=>{s(),u();let p=Promise.resolve();for(let h=n.length-1;h>=0;h--)p=p.finally(n[h]);return p}),d}var x3=jt(()=>{qi()});function WW(e){let t=new AbortController,n=e(t.signal).catch(Ps);return()=>(t.abort(),n)}var T3=jt(()=>{qi()});function ZW(e,t,n={}){let{baseMs:r=1e3,onError:i,maxAttempts:a=1/0}=n;return Fr(e,(s,o)=>{let c=new AbortController,u=!1,d=new Map;function p(I){c.abort(),d.clear(),s(I)}function h(I,v){if(d.delete(v),u&&d.size===0){o(I);return}if(!Fn(I)&&i)try{i(I,v)}catch(b){c.abort(),d.clear(),o(b)}}async function _(I){for(let v=0;;v++){let b=t(I,v);if(d.set(v,b),b.then(p,R=>h(R,v)),v+1>=a)break;let w=Math.pow(2,v)*r,x=Math.round(w*(1+Math.random())/2);await sd(I,x)}u=!0}return _(c.signal).catch(Ps),()=>{c.abort()}})}var N3=jt(()=>{qi();Eh();Ds()});var za={};gd(za,{AbortError:()=>on,abortable:()=>MW,all:()=>JW,catchAbortError:()=>Ps,delay:()=>sd,execute:()=>Fr,forever:()=>FW,isAbortError:()=>Fn,proactiveRetry:()=>ZW,race:()=>zW,rethrowAbortError:()=>kw,retry:()=>GW,run:()=>WW,spawn:()=>HW,throwIfAborted:()=>DW,waitForEvent:()=>LW});var Ga=jt(()=>{v3();qi();Eh();Ds();w3();E3();C3();I3();S3();x3();T3();N3()});var gi=N(ir=>{"use strict";var YW=ir&&ir.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),XW=ir&&ir.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$W=ir&&ir.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&YW(t,e,n);return XW(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0});ir.convertMetadataFromGrpcJs=ir.convertMetadataToGrpcJs=void 0;var KW=$W(Va()),jW=Gn();function eZ(e){let t=new KW.Metadata;for(let[n,r]of e)for(let i of r)t.add(n,typeof i=="string"?i:Buffer.from(i));return t}ir.convertMetadataToGrpcJs=eZ;function tZ(e){let t=(0,jW.Metadata)();for(let n of Object.keys(e.getMap())){let r=e.get(n);t.set(n,r)}return t}ir.convertMetadataFromGrpcJs=tZ});var Vi=N(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});Ch.isAsyncIterable=void 0;function nZ(e){return e!=null&&Symbol.asyncIterator in e}Ch.isAsyncIterable=nZ});var od=N(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});Ih.readableToAsyncIterable=void 0;var R3=!1;function rZ(e){if(R3)return!0;let t=e&&typeof e=="object"&&"errored"in e&&"errorEmitted"in e&&"endEmitted"in e&&"closeEmitted"in e&&typeof e.errorEmitted=="boolean"&&typeof e.endEmitted=="boolean"&&typeof e.closeEmitted=="boolean";return R3=t,t}async function*iZ(e){let t=k3;function n(c){this===e?(t(),t=k3):t=c}let r=e._readableState;if(!rZ(r))throw new Error("nice-grpc: _readableState members incompatible");let i=r.errored,a=r.errorEmitted,s=r.endEmitted,o=r.closeEmitted;for(e.on("readable",n).on("error",function(c){i=c,a=!0,n.call(this)}).on("end",function(){s=!0,n.call(this)}).on("close",function(){o=!0,n.call(this)});;){let c=e.destroyed?null:e.read();if(c!==null)yield c;else{if(a)throw i;if(s)break;if(o)break;await new Promise(n)}}}Ih.readableToAsyncIterable=iZ;var k3=()=>{}});var cd=N(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.createCallContext=void 0;var B3=Gn(),O3=gi();function aZ(e){let t=new AbortController,n={signal:t.signal,cancel(){t.abort()}},r=(0,B3.Metadata)(),i=(0,B3.Metadata)();e.cancelled?(n.cancel?.(),n.cancel=void 0):(e.on("close",()=>{n.cancel=void 0}),e.on("finish",()=>{n.cancel=void 0}),e.on("cancelled",()=>{n.cancel?.(),n.cancel=void 0}));let a=!1;return{context:{metadata:(0,O3.convertMetadataFromGrpcJs)(e.metadata),peer:e.getPeer(),header:r,sendHeader(){a||(e.sendMetadata((0,O3.convertMetadataToGrpcJs)(r)),a=!0)},trailer:i,signal:n.signal},maybeCancel:n}}Sh.createCallContext=aZ});var ud=N(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});xh.createErrorStatusObject=void 0;var P3=Va(),sZ=(Ga(),ar(za)),oZ=Gn();function cZ(e,t,n){return t instanceof oZ.ServerError?{code:t.code,details:t.details,metadata:n}:(0,sZ.isAbortError)(t)?{code:P3.status.CANCELLED,details:"The operation was cancelled",metadata:n}:(process.emitWarning(`${e}: Uncaught error in server implementation method. Server methods should only throw ServerError or AbortError. ${t instanceof Error?t.stack:t}`),{code:P3.status.UNKNOWN,details:"Unknown server error occurred",metadata:n})}xh.createErrorStatusObject=cZ});var F3=N(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.createBidiStreamingMethodHandler=void 0;var D3=(Ga(),ar(za)),M3=gi(),uZ=Vi(),lZ=od(),dZ=cd(),fZ=ud();function pZ(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if(!(0,uZ.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");yield*t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!0,request:s,responseStream:!0,next:i},o);return s=>{let{context:o,maybeCancel:c}=(0,dZ.createCallContext)(s);Promise.resolve().then(async()=>{let d=a((0,lZ.readableToAsyncIterable)(s),o)[Symbol.asyncIterator]();try{let p=await d.next();for(;;){if(!p.done){try{o.sendHeader(),s.write(p.value)||await(0,D3.waitForEvent)(o.signal,s,"drain")}catch(h){p=(0,D3.isAbortError)(h)?await d.return():await d.throw(h);continue}p=await d.next();continue}if(p.value!=null){p=await d.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method"));continue}break}}finally{c.cancel=void 0,o.sendHeader()}}).then(()=>{s.end((0,M3.convertMetadataToGrpcJs)(o.trailer))},u=>{s.emit("error",(0,fZ.createErrorStatusObject)(e.path,u,(0,M3.convertMetadataToGrpcJs)(o.trailer)))})}}Th.createBidiStreamingMethodHandler=pZ});var U3=N(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});Nh.createClientStreamingMethodHandler=void 0;var L3=gi(),hZ=Vi(),mZ=od(),gZ=cd(),_Z=ud();function AZ(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if(!(0,hZ.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for client streaming method");return await t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!0,request:s,responseStream:!1,next:i},o);return(s,o)=>{let{context:c,maybeCancel:u}=(0,gZ.createCallContext)(s);Promise.resolve().then(async()=>{let p=a((0,mZ.readableToAsyncIterable)(s),c)[Symbol.asyncIterator]();try{let h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"));continue}return h.value}}finally{u.cancel=void 0,c.sendHeader()}}).then(d=>{o(null,d,(0,L3.convertMetadataToGrpcJs)(c.trailer))},d=>{o((0,_Z.createErrorStatusObject)(e.path,d,(0,L3.convertMetadataToGrpcJs)(c.trailer)))})}}Nh.createClientStreamingMethodHandler=AZ});var V3=N(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});Rh.createServerStreamingMethodHandler=void 0;var Q3=(Ga(),ar(za)),q3=gi(),yZ=Vi(),bZ=cd(),vZ=ud();function wZ(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if((0,yZ.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");yield*t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!1,request:s,responseStream:!0,next:i},o);return s=>{let{context:o,maybeCancel:c}=(0,bZ.createCallContext)(s);Promise.resolve().then(async()=>{let d=a(s.request,o)[Symbol.asyncIterator]();try{let p=await d.next();for(;;){if(!p.done){try{o.sendHeader(),s.write(p.value)||await(0,Q3.waitForEvent)(o.signal,s,"drain")}catch(h){p=(0,Q3.isAbortError)(h)?await d.return():await d.throw(h);continue}p=await d.next();continue}if(p.value!=null){p=await d.throw(new Error("A middleware returned a message, but expected to return void for server streaming method"));continue}break}}finally{c.cancel=void 0,o.sendHeader()}}).then(()=>{s.end((0,q3.convertMetadataToGrpcJs)(o.trailer))},u=>{s.emit("error",(0,vZ.createErrorStatusObject)(e.path,u,(0,q3.convertMetadataToGrpcJs)(o.trailer)))})}}Rh.createServerStreamingMethodHandler=wZ});var z3=N(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});kh.createUnaryMethodHandler=void 0;var J3=gi(),EZ=Vi(),CZ=cd(),IZ=ud();function SZ(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if((0,EZ.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");return await t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!1,request:s,responseStream:!1,next:i},o);return(s,o)=>{let{context:c,maybeCancel:u}=(0,CZ.createCallContext)(s);Promise.resolve().then(async()=>{let p=a(s.request,c)[Symbol.asyncIterator]();try{let h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for unary method"));continue}return h.value}}finally{u.cancel=void 0,c.sendHeader()}}).then(d=>{o(null,d,(0,J3.convertMetadataToGrpcJs)(c.trailer))},d=>{o((0,IZ.createErrorStatusObject)(e.path,d,(0,J3.convertMetadataToGrpcJs)(c.trailer)))})}}kh.createUnaryMethodHandler=SZ});var Y3=N(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});Bh.createServer=void 0;var G3=Va(),H3=Gn(),W3=Os(),xZ=F3(),TZ=U3(),NZ=V3(),RZ=z3();function kZ(e={}){return Z3(e)}Bh.createServer=kZ;function Z3(e,t){let n=[],r;function i(a){return{with(s){return i(a==null?s:(0,H3.composeServerMiddleware)(a,s))},add(s,o){if(r!=null)throw new Error("server.add() must be used before listen()");n.push({definition:(0,W3.normalizeServiceDefinition)(s),middleware:a,implementation:o})}}}return{use(a){if(r!=null)throw new Error("server.use() must be used before listen()");if(n.length>0)throw new Error("server.use() must be used before adding any services");return Z3(e,t==null?a:(0,H3.composeServerMiddleware)(t,a))},...i(t),async listen(a,s){if(r!=null)throw new Error("server.listen() has already been called");r=new G3.Server(e);for(let{definition:c,middleware:u,implementation:d}of n){let p={};for(let[h,_]of Object.entries(c)){let I=d[h].bind(d);_.requestStream?_.responseStream?p[h]=(0,xZ.createBidiStreamingMethodHandler)(_,I,u):p[h]=(0,TZ.createClientStreamingMethodHandler)(_,I,u):_.responseStream?p[h]=(0,NZ.createServerStreamingMethodHandler)(_,I,u):p[h]=(0,RZ.createUnaryMethodHandler)(_,I,u)}r.addService((0,W3.toGrpcJsServiceDefinition)(c),p)}let o=await new Promise((c,u)=>{r.bindAsync(a,s??G3.ServerCredentials.createInsecure(),(d,p)=>{d!=null?(r=void 0,u(d)):c(p)})});return r.start(),o},async shutdown(){r!=null&&(await new Promise((a,s)=>{r.tryShutdown(o=>{o!=null?s(o):a()})}),r=void 0)},forceShutdown(){r!=null&&(r.forceShutdown(),r=void 0)}}}});var $3=N(X3=>{"use strict";Object.defineProperty(X3,"__esModule",{value:!0})});var K3=N(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.waitForChannelReady=Hu.createChannel=void 0;var Oh=Va(),BZ=new Set(["http","https"]);function OZ(e,t,n={}){let r=/^(?:([^:]+):\/\/)?(.*?)(?::(\d+))?$/.exec(e);if(r==null)throw new Error(`Invalid address: '${e}'`);let[,i,a,s]=r,o=!i||BZ.has(i),c=t?._isSecure()||i?.includes("https");t??(t=c?Oh.ChannelCredentials.createSsl():Oh.ChannelCredentials.createInsecure()),s??(s=c?"443":"80");let u=o?`${a}:${s}`:e;return new Oh.Channel(u,t,n)}Hu.createChannel=OZ;async function PZ(e,t){for(;;){let n=e.getConnectivityState(!0);if(n===Oh.connectivityState.READY)return;await new Promise((r,i)=>{e.watchConnectivityState(n,t,a=>{a!=null?i(a):r()})})}}Hu.waitForChannelReady=PZ});var ld=N(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});Ph.wrapClientError=void 0;var DZ=Gn(),MZ=Va();function FZ(e,t){return LZ(e)?new DZ.ClientError(t,e.code,e.details):e}Ph.wrapClientError=FZ;function LZ(e){return typeof e=="object"&&e!==null&&typeof e.code=="number"&&typeof e.details=="string"&&e.metadata instanceof MZ.Metadata}});var j3=N(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});Mh.createBidiStreamingMethod=void 0;var Dh=(Ga(),ar(za)),UZ=Gn(),QZ=Os(),Bw=gi(),qZ=Vi(),VZ=od(),JZ=ld();function zZ(e,t,n,r){let i=(0,QZ.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if(!(0,qZ.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");let{metadata:d=(0,UZ.Metadata)(),onHeader:p,onTrailer:h}=u,_=u.signal??new AbortController().signal,I=new AbortController,v=t.makeBidiStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,(0,Bw.convertMetadataToGrpcJs)(d));v.on("metadata",x=>{p?.((0,Bw.convertMetadataFromGrpcJs)(x))}),v.on("status",x=>{h?.((0,Bw.convertMetadataFromGrpcJs)(x.metadata))});let b;GZ(I.signal,c,v).then(()=>{v.end()},x=>{(0,Dh.isAbortError)(x)||(b=x,v.cancel())});let w=()=>{I.abort(),v.cancel()};_.addEventListener("abort",w);try{yield*(0,VZ.readableToAsyncIterable)(v)}catch(x){throw(0,JZ.wrapClientError)(x,e.path)}finally{if(I.abort(),_.removeEventListener("abort",w),(0,Dh.throwIfAborted)(_),v.cancel(),b)throw b}}let o=n==null?s:(c,u)=>n({method:a,requestStream:!0,request:c,responseStream:!0,next:s},u);return(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){let h=await p.next();return h.done&&h.value!=null?await p.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method")):h},return(){return p.return()},throw(h){return p.throw(h)}}}}}}Mh.createBidiStreamingMethod=zZ;async function GZ(e,t,n){for await(let r of t)(0,Dh.throwIfAborted)(e),n.write(r)||await(0,Dh.waitForEvent)(e,n,"drain")}});var eP=N(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});Lh.createClientStreamingMethod=void 0;var Fh=(Ga(),ar(za)),HZ=Gn(),WZ=Os(),Ow=gi(),ZZ=Vi(),YZ=ld();function XZ(e,t,n,r){let i=(0,WZ.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if(!(0,ZZ.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for client streaming method");let{metadata:d=(0,HZ.Metadata)(),signal:p=new AbortController().signal,onHeader:h,onTrailer:_}=u;return await(0,Fh.execute)(p,(I,v)=>{let b=new AbortController,w=t.makeClientStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,(0,Ow.convertMetadataToGrpcJs)(d),(x,R)=>{b.abort(),x!=null?v((0,YZ.wrapClientError)(x,e.path)):I(R)});return w.on("metadata",x=>{h?.((0,Ow.convertMetadataFromGrpcJs)(x))}),w.on("status",x=>{_?.((0,Ow.convertMetadataFromGrpcJs)(x.metadata))}),$Z(b.signal,c,w).then(()=>{w.end()},x=>{(0,Fh.isAbortError)(x)||(v(x),w.cancel())}),()=>{b.abort(),w.cancel()}})}let o=n==null?s:(c,u)=>n({method:a,requestStream:!0,request:c,responseStream:!1,next:s},u);return async(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator](),h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"));continue}return h.value}}}Lh.createClientStreamingMethod=XZ;async function $Z(e,t,n){for await(let r of t)(0,Fh.throwIfAborted)(e),n.write(r)||await(0,Fh.waitForEvent)(e,n,"drain")}});var tP=N(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.createServerStreamingMethod=void 0;var KZ=(Ga(),ar(za)),jZ=Gn(),eY=Os(),Pw=gi(),tY=Vi(),nY=od(),rY=ld();function iY(e,t,n,r){let i=(0,eY.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if((0,tY.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");let{metadata:d=(0,jZ.Metadata)(),onHeader:p,onTrailer:h}=u,_=u.signal??new AbortController().signal,I=t.makeServerStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,c,(0,Pw.convertMetadataToGrpcJs)(d));I.on("metadata",b=>{p?.((0,Pw.convertMetadataFromGrpcJs)(b))}),I.on("status",b=>{h?.((0,Pw.convertMetadataFromGrpcJs)(b.metadata))});let v=()=>{I.cancel()};_.addEventListener("abort",v);try{yield*(0,nY.readableToAsyncIterable)(I)}catch(b){throw(0,rY.wrapClientError)(b,e.path)}finally{_.removeEventListener("abort",v),(0,KZ.throwIfAborted)(_),I.cancel()}}let o=n==null?s:(c,u)=>n({method:a,requestStream:!1,request:c,responseStream:!0,next:s},u);return(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){let h=await p.next();return h.done&&h.value!=null?await p.throw(new Error("A middleware returned a message, but expected to return void for server streaming method")):h},return(){return p.return()},throw(h){return p.throw(h)}}}}}}Uh.createServerStreamingMethod=iY});var nP=N(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.createUnaryMethod=void 0;var aY=(Ga(),ar(za)),sY=Gn(),oY=Os(),Dw=gi(),cY=Vi(),uY=ld();function lY(e,t,n,r){let i=(0,oY.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if((0,cY.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");let{metadata:d=(0,sY.Metadata)(),signal:p=new AbortController().signal,onHeader:h,onTrailer:_}=u;return await(0,aY.execute)(p,(I,v)=>{let b=t.makeUnaryRequest(i.path,i.requestSerialize,i.responseDeserialize,c,(0,Dw.convertMetadataToGrpcJs)(d),(w,x)=>{w!=null?v((0,uY.wrapClientError)(w,e.path)):I(x)});return b.on("metadata",w=>{h?.((0,Dw.convertMetadataFromGrpcJs)(w))}),b.on("status",w=>{_?.((0,Dw.convertMetadataFromGrpcJs)(w.metadata))}),()=>{b.cancel()}})}let o=n==null?s:(c,u)=>n({method:a,requestStream:!1,request:c,responseStream:!1,next:s},u);return async(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator](),h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for unary method"));continue}return h.value}}}Qh.createUnaryMethod=lY});var aP=N(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.createClient=Wu.createClientFactory=void 0;var dY=Va(),fY=Gn(),pY=Os(),hY=j3(),mY=eP(),gY=tP(),_Y=nP();function rP(){return iP()}Wu.createClientFactory=rP;function AY(e,t,n){return rP().create(e,t,n)}Wu.createClient=AY;function iP(e){return{use(t){return iP(e==null?t:(0,fY.composeClientMiddleware)(e,t))},create(t,n,r={}){let i=(0,dY.makeClientConstructor)({},""),a=new i("",null,{channelOverride:n}),s={},o=Object.entries((0,pY.normalizeServiceDefinition)(t));for(let[c,u]of o){let d={...r["*"],...r[c]};u.requestStream?u.responseStream?s[c]=(0,hY.createBidiStreamingMethod)(u,a,e,d):s[c]=(0,mY.createClientStreamingMethod)(u,a,e,d):u.responseStream?s[c]=(0,gY.createServerStreamingMethod)(u,a,e,d):s[c]=(0,_Y.createUnaryMethod)(u,a,e,d)}return s}}}});var oP=N(sP=>{"use strict";Object.defineProperty(sP,"__esModule",{value:!0})});var lP=N(St=>{"use strict";var yY=St&&St.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),dd=St&&St.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&yY(t,e,n)};Object.defineProperty(St,"__esModule",{value:!0});St.ChannelCredentials=St.Channel=St.waitForChannelReady=St.createChannel=void 0;dd(Gn(),St);dd(Y3(),St);dd($3(),St);var cP=K3();Object.defineProperty(St,"createChannel",{enumerable:!0,get:function(){return cP.createChannel}});Object.defineProperty(St,"waitForChannelReady",{enumerable:!0,get:function(){return cP.waitForChannelReady}});var uP=Va();Object.defineProperty(St,"Channel",{enumerable:!0,get:function(){return uP.Channel}});Object.defineProperty(St,"ChannelCredentials",{enumerable:!0,get:function(){return uP.ChannelCredentials}});dd(aP(),St);dd(oP(),St)});function zt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function AP(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function zi(e,...t){if(!AP(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function yd(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");zt(e.outputLen),zt(e.blockLen)}function _i(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function bd(e,t){zi(e);let n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}import*as Ai from"crypto";var Ha=Ai&&typeof Ai=="object"&&"webcrypto"in Ai?Ai.webcrypto:Ai&&typeof Ai=="object"&&"randomBytes"in Ai?Ai:void 0;var Qs=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),qs=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),or=(e,t)=>e<<32-t|e>>>t,Se=(e,t)=>e<<t|e>>>32-t>>>0,Vs=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,yP=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function Js(e){for(let t=0;t<e.length;t++)e[t]=yP(e[t])}function bP(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function cr(e){return typeof e=="string"&&(e=bP(e)),zi(e),e}function Zw(...e){let t=0;for(let r=0;r<e.length;r++){let i=e[r];zi(i),t+=i.length}let n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){let a=e[r];n.set(a,i),i+=a.length}return n}var Gi=class{clone(){return this._cloneInto()}},vP={}.toString;function vd(e,t){if(t!==void 0&&vP.call(t)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(e,t)}function zs(e){let t=r=>e().update(cr(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Yw(e){let t=(r,i)=>e(i).update(cr(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function Xw(e=32){if(Ha&&typeof Ha.getRandomValues=="function")return Ha.getRandomValues(new Uint8Array(e));if(Ha&&typeof Ha.randomBytes=="function")return Ha.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}function wP(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),s=Number(n>>i&a),o=Number(n&a),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}var $w=(e,t,n)=>e&t^~e&n,Kw=(e,t,n)=>e&t^e&n^t&n,Gs=class extends Gi{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=qs(this.buffer)}update(t){_i(this);let{view:n,buffer:r,blockLen:i}=this;t=cr(t);let a=t.length;for(let s=0;s<a;){let o=Math.min(i-this.pos,a-s);if(o===i){let c=qs(t);for(;i<=a-s;s+=i)this.process(c,s);continue}r.set(t.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){_i(this),bd(t,this),this.finished=!0;let{buffer:n,view:r,blockLen:i,isLE:a}=this,{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(r,0),s=0);for(let p=s;p<i;p++)n[p]=0;wP(r,i-8,BigInt(this.length*8),a),this.process(r,0);let o=qs(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<u;p++)o.setUint32(4*p,d[p],a)}digest(){let{buffer:t,outputLen:n}=this;this.digestInto(t);let r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:n,buffer:r,length:i,finished:a,destroyed:s,pos:o}=this;return t.length=i,t.pos=o,t.finished=a,t.destroyed=s,i%n&&t.buffer.set(r),t}};var EP=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Hi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Wi=new Uint32Array(64),$h=class extends Gs{constructor(){super(64,32,8,!1),this.A=Hi[0]|0,this.B=Hi[1]|0,this.C=Hi[2]|0,this.D=Hi[3]|0,this.E=Hi[4]|0,this.F=Hi[5]|0,this.G=Hi[6]|0,this.H=Hi[7]|0}get(){let{A:t,B:n,C:r,D:i,E:a,F:s,G:o,H:c}=this;return[t,n,r,i,a,s,o,c]}set(t,n,r,i,a,s,o,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=a|0,this.F=s|0,this.G=o|0,this.H=c|0}process(t,n){for(let p=0;p<16;p++,n+=4)Wi[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){let h=Wi[p-15],_=Wi[p-2],I=or(h,7)^or(h,18)^h>>>3,v=or(_,17)^or(_,19)^_>>>10;Wi[p]=v+Wi[p-7]+I+Wi[p-16]|0}let{A:r,B:i,C:a,D:s,E:o,F:c,G:u,H:d}=this;for(let p=0;p<64;p++){let h=or(o,6)^or(o,11)^or(o,25),_=d+h+$w(o,c,u)+EP[p]+Wi[p]|0,v=(or(r,2)^or(r,13)^or(r,22))+Kw(r,i,a)|0;d=u,u=c,c=o,o=s+_|0,s=a,a=i,i=r,r=_+v|0}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,o=o+this.E|0,c=c+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,i,a,s,o,c,u,d)}roundClean(){Wi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var Qr=zs(()=>new $h);var wd=class extends Gi{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,yd(t);let r=cr(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,a=new Uint8Array(i);a.set(r.length>i?t.create().update(r).digest():r);for(let s=0;s<a.length;s++)a[s]^=54;this.iHash.update(a),this.oHash=t.create();for(let s=0;s<a.length;s++)a[s]^=106;this.oHash.update(a),a.fill(0)}update(t){return _i(this),this.iHash.update(t),this}digestInto(t){_i(this),zi(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:n,iHash:r,finished:i,destroyed:a,blockLen:s,outputLen:o}=this;return t=t,t.finished=i,t.destroyed=a,t.blockLen=s,t.outputLen=o,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},$u=(e,t,n)=>new wd(e,t).update(n).digest();$u.create=(e,t)=>new wd(e,t);function IP(e,t,n,r){yd(e);let i=vd({dkLen:32,asyncTick:10},r),{c:a,dkLen:s,asyncTick:o}=i;if(zt(a),zt(s),zt(o),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");let c=cr(t),u=cr(n),d=new Uint8Array(s),p=$u.create(e,c),h=p._cloneInto().update(u);return{c:a,dkLen:s,asyncTick:o,DK:d,PRF:p,PRFSalt:h}}function SP(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}function Kh(e,t,n,r){let{c:i,dkLen:a,DK:s,PRF:o,PRFSalt:c}=IP(e,t,n,r),u,d=new Uint8Array(4),p=qs(d),h=new Uint8Array(o.outputLen);for(let _=1,I=0;I<a;_++,I+=o.outputLen){let v=s.subarray(I,I+o.outputLen);p.setInt32(0,_,!1),(u=c._cloneInto(u)).update(d).digestInto(h),v.set(h.subarray(0,v.length));for(let b=1;b<i;b++){o._cloneInto(u).update(h).digestInto(h);for(let w=0;w<v.length;w++)v[w]^=h[w]}}return SP(o,c,s,u,h)}function jw(e,t,n,r,i,a){let s=e[t++]^n[r++],o=e[t++]^n[r++],c=e[t++]^n[r++],u=e[t++]^n[r++],d=e[t++]^n[r++],p=e[t++]^n[r++],h=e[t++]^n[r++],_=e[t++]^n[r++],I=e[t++]^n[r++],v=e[t++]^n[r++],b=e[t++]^n[r++],w=e[t++]^n[r++],x=e[t++]^n[r++],R=e[t++]^n[r++],k=e[t++]^n[r++],q=e[t++]^n[r++],U=s,V=o,Z=c,X=u,de=d,O=p,ie=h,F=_,g=I,B=v,z=b,K=w,ne=x,he=R,pe=k,Ie=q;for(let Fe=0;Fe<8;Fe+=2)de^=Se(U+ne|0,7),g^=Se(de+U|0,9),ne^=Se(g+de|0,13),U^=Se(ne+g|0,18),B^=Se(O+V|0,7),he^=Se(B+O|0,9),V^=Se(he+B|0,13),O^=Se(V+he|0,18),pe^=Se(z+ie|0,7),Z^=Se(pe+z|0,9),ie^=Se(Z+pe|0,13),z^=Se(ie+Z|0,18),X^=Se(Ie+K|0,7),F^=Se(X+Ie|0,9),K^=Se(F+X|0,13),Ie^=Se(K+F|0,18),V^=Se(U+X|0,7),Z^=Se(V+U|0,9),X^=Se(Z+V|0,13),U^=Se(X+Z|0,18),ie^=Se(O+de|0,7),F^=Se(ie+O|0,9),de^=Se(F+ie|0,13),O^=Se(de+F|0,18),K^=Se(z+B|0,7),g^=Se(K+z|0,9),B^=Se(g+K|0,13),z^=Se(B+g|0,18),ne^=Se(Ie+pe|0,7),he^=Se(ne+Ie|0,9),pe^=Se(he+ne|0,13),Ie^=Se(pe+he|0,18);i[a++]=s+U|0,i[a++]=o+V|0,i[a++]=c+Z|0,i[a++]=u+X|0,i[a++]=d+de|0,i[a++]=p+O|0,i[a++]=h+ie|0,i[a++]=_+F|0,i[a++]=I+g|0,i[a++]=v+B|0,i[a++]=b+z|0,i[a++]=w+K|0,i[a++]=x+ne|0,i[a++]=R+he|0,i[a++]=k+pe|0,i[a++]=q+Ie|0}function jh(e,t,n,r,i){let a=r+0,s=r+16*i;for(let o=0;o<16;o++)n[s+o]=e[t+(2*i-1)*16+o];for(let o=0;o<i;o++,a+=16,t+=16)jw(n,s,e,t,n,a),o>0&&(s+=16),jw(n,a,e,t+=16,n,s)}function xP(e,t,n){let r=vd({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:i,r:a,p:s,dkLen:o,asyncTick:c,maxmem:u,onProgress:d}=r;if(zt(i),zt(a),zt(s),zt(o),zt(c),zt(u),d!==void 0&&typeof d!="function")throw new Error("progressCb should be function");let p=128*a,h=p/4;if(i<=1||i&i-1||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(s<0||s>(2**32-1)*32/p)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(o<0||o>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let _=p*(i+s);if(_>u)throw new Error(`Scrypt: parameters too large, ${_} (128 * r * (N + p)) > ${u} (maxmem)`);let I=Kh(Qr,e,t,{c:1,dkLen:p*s}),v=Qs(I),b=Qs(new Uint8Array(p*i)),w=Qs(new Uint8Array(p)),x=()=>{};if(d){let R=2*i*s,k=Math.max(Math.floor(R/1e4),1),q=0;x=()=>{q++,d&&(!(q%k)||q===R)&&d(q/R)}}return{N:i,r:a,p:s,dkLen:o,blockSize32:h,V:b,B32:v,B:I,tmp:w,blockMixCb:x,asyncTick:c}}function TP(e,t,n,r,i){let a=Kh(Qr,e,n,{c:1,dkLen:t});return n.fill(0),r.fill(0),i.fill(0),a}function e0(e,t,n){let{N:r,r:i,p:a,dkLen:s,blockSize32:o,V:c,B32:u,B:d,tmp:p,blockMixCb:h}=xP(e,t,n);Vs||Js(u);for(let _=0;_<a;_++){let I=o*_;for(let v=0;v<o;v++)c[v]=u[I+v];for(let v=0,b=0;v<r-1;v++)jh(c,b,c,b+=o,i),h();jh(c,(r-1)*o,u,I,i),h();for(let v=0;v<r;v++){let b=u[I+o-16]%r;for(let w=0;w<o;w++)p[w]=u[I+w]^c[b*o+w];jh(p,0,u,I,i),h()}}return Vs||Js(u),TP(e,s,d,c,p)}var Ed=BigInt(4294967295),t0=BigInt(32);function NP(e,t=!1){return t?{h:Number(e&Ed),l:Number(e>>t0&Ed)}:{h:Number(e>>t0&Ed)|0,l:Number(e&Ed)|0}}function n0(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:a,l:s}=NP(e[i],t);[n[i],r[i]]=[a,s]}return[n,r]}var r0=(e,t,n)=>e<<n|t>>>32-n,i0=(e,t,n)=>t<<n|e>>>32-n,a0=(e,t,n)=>t<<n-32|e>>>64-n,s0=(e,t,n)=>e<<n-32|t>>>64-n;var u0=[],l0=[],d0=[],RP=BigInt(0),Ku=BigInt(1),kP=BigInt(2),BP=BigInt(7),OP=BigInt(256),PP=BigInt(113);for(let e=0,t=Ku,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],u0.push(2*(5*r+n)),l0.push((e+1)*(e+2)/2%64);let i=RP;for(let a=0;a<7;a++)t=(t<<Ku^(t>>BP)*PP)%OP,t&kP&&(i^=Ku<<(Ku<<BigInt(a))-Ku);d0.push(i)}var[DP,MP]=n0(d0,!0),o0=(e,t,n)=>n>32?a0(e,t,n):r0(e,t,n),c0=(e,t,n)=>n>32?s0(e,t,n):i0(e,t,n);function FP(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let o=(s+8)%10,c=(s+2)%10,u=n[c],d=n[c+1],p=o0(u,d,1)^n[o],h=c0(u,d,1)^n[o+1];for(let _=0;_<50;_+=10)e[s+_]^=p,e[s+_+1]^=h}let i=e[2],a=e[3];for(let s=0;s<24;s++){let o=l0[s],c=o0(i,a,o),u=c0(i,a,o),d=u0[s];i=e[d],a=e[d+1],e[d]=c,e[d+1]=u}for(let s=0;s<50;s+=10){for(let o=0;o<10;o++)n[o]=e[s+o];for(let o=0;o<10;o++)e[s+o]^=~n[(o+2)%10]&n[(o+4)%10]}e[0]^=DP[r],e[1]^=MP[r]}n.fill(0)}var Hs=class extends Gi{constructor(t,n,r,i=!1,a=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,zt(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Qs(this.state)}keccak(){Vs||Js(this.state32),FP(this.state32,this.rounds),Vs||Js(this.state32),this.posOut=0,this.pos=0}update(t){_i(this);let{blockLen:n,state:r}=this;t=cr(t);let i=t.length;for(let a=0;a<i;){let s=Math.min(n-this.pos,i-a);for(let o=0;o<s;o++)r[this.pos++]^=t[a++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:r,blockLen:i}=this;t[r]^=n,n&128&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){_i(this,!1),zi(t),this.finish();let n=this.state,{blockLen:r}=this;for(let i=0,a=t.length;i<a;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,a-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return zt(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(bd(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:s}=this;return t||(t=new Hs(n,r,i,s,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}},Zi=(e,t,n)=>zs(()=>new Hs(t,e,n)),fX=Zi(6,144,224/8),pX=Zi(6,136,256/8),hX=Zi(6,104,384/8),mX=Zi(6,72,512/8),gX=Zi(1,144,224/8),f0=Zi(1,136,256/8),_X=Zi(1,104,384/8),AX=Zi(1,72,512/8),p0=(e,t,n)=>Yw((r={})=>new Hs(t,e,r.dkLen===void 0?n:r.dkLen,!0)),yX=p0(31,168,128/8),bX=p0(31,136,256/8);var LP=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),m0=new Uint8Array(new Array(16).fill(0).map((e,t)=>t)),UP=m0.map(e=>(9*e+5)%16),tm=[m0],nm=[UP];for(let e=0;e<4;e++)for(let t of[tm,nm])t.push(t[e].map(n=>LP[n]));var g0=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),QP=tm.map((e,t)=>e.map(n=>g0[t][n])),qP=nm.map((e,t)=>e.map(n=>g0[t][n])),VP=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),JP=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function h0(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}var Cd=new Uint32Array(16),em=class extends Gs{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){let{h0:t,h1:n,h2:r,h3:i,h4:a}=this;return[t,n,r,i,a]}set(t,n,r,i,a){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=i|0,this.h4=a|0}process(t,n){for(let _=0;_<16;_++,n+=4)Cd[_]=t.getUint32(n,!0);let r=this.h0|0,i=r,a=this.h1|0,s=a,o=this.h2|0,c=o,u=this.h3|0,d=u,p=this.h4|0,h=p;for(let _=0;_<5;_++){let I=4-_,v=VP[_],b=JP[_],w=tm[_],x=nm[_],R=QP[_],k=qP[_];for(let q=0;q<16;q++){let U=Se(r+h0(_,a,o,u)+Cd[w[q]]+v,R[q])+p|0;r=p,p=u,u=Se(o,10)|0,o=a,a=U}for(let q=0;q<16;q++){let U=Se(i+h0(I,s,c,d)+Cd[x[q]]+b,k[q])+h|0;i=h,h=d,d=Se(c,10)|0,c=s,s=U}}this.set(this.h1+o+d|0,this.h2+u+h|0,this.h3+p+i|0,this.h4+r+s|0,this.h0+a+c|0)}roundClean(){Cd.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}},_0=zs(()=>new em);import A0 from"crypto";import{pbkdf2Sync as WP}from"crypto";import ZP from"crypto";import v0 from"crypto";import{createHmac as jP}from"crypto";import{randomUUID as tD}from"crypto";var zP=e=>{let{password:t,salt:n,n:r,p:i,r:a,dklen:s}=e;return e0(t,n,{N:r,r:a,p:i,dkLen:s})},GP=e=>f0(e);function HP(e){let t=D(e,"data");return _0(t)}var ju=(e,t="base64")=>Uint8Array.from(Buffer.from(e,t));function y0(e,t,n,r,i){let a=D(e,"password"),s=D(t,"salt");return M(WP(a,s,n,r,i))}var rm=e=>Uint8Array.from(ZP.randomBytes(e)),Id=(e,t="base64")=>Buffer.from(e).toString(t),b0="aes-256-ctr",im=(e,t)=>{let n=ju(String(e).normalize("NFKC"),"utf-8"),r=y0(n,t,1e5,32,"sha256");return D(r)},YP=async(e,t)=>{let n=rm(16),r=rm(32),i=im(e,r),a=Uint8Array.from(Buffer.from(JSON.stringify(t),"utf-8")),s=await A0.createCipheriv(b0,i,n),o=s.update(a);return o=Buffer.concat([o,s.final()]),{data:Id(o),iv:Id(n),salt:Id(r)}},XP=async(e,t)=>{let n=ju(t.iv),r=ju(t.salt),i=im(e,r),a=ju(t.data),s=await A0.createDecipheriv(b0,i,n),o=s.update(a),c=Buffer.concat([o,s.final()]),u=Buffer.from(c).toString("utf-8");try{return JSON.parse(u)}catch{throw new y(T.INVALID_CREDENTIALS,"Invalid credentials.")}};async function $P(e,t,n){let r=await v0.createCipheriv("aes-128-ctr",t.subarray(0,16),n),i=Buffer.concat([r.update(e),r.final()]);return new Uint8Array(i)}async function KP(e,t,n){let r=v0.createDecipheriv("aes-128-ctr",t.subarray(0,16),n),i=await Buffer.concat([r.update(e),r.final()]);return new Uint8Array(i)}function eD(e,t,n){let r=D(t,"key"),i=D(n,"data");return M(jP(e,r).update(i).digest())}var nD=()=>tD(),rD={bufferFromString:ju,stringFromBuffer:Id,decrypt:XP,encrypt:YP,keyFromPassword:im,randomBytes:rm,scrypt:zP,keccak256:GP,decryptJsonWalletData:KP,encryptJsonWalletData:$P,computeHmac:eD,pbkdf2:y0,ripemd160:HP,randomUUID:nD},iD=rD,{bufferFromString:ur,decrypt:w0,encrypt:E0,keyFromPassword:UX,randomBytes:Ft,stringFromBuffer:Ws,scrypt:am,keccak256:sm,decryptJsonWalletData:C0,encryptJsonWalletData:I0,computeHmac:Sd,pbkdf2:S0,ripemd160:x0,randomUUID:T0}=iD;function at(e){return M(Qr(D(e)))}function Gt(e){return at(e)}function N0(e){let t=BigInt(e),n=new ArrayBuffer(8),r=new DataView(n);return r.setBigUint64(0,t,!1),new Uint8Array(r.buffer)}function R0(e){return Gt(ur(e,"utf-8"))}var aD=Object.defineProperty,sD=(e,t,n)=>t in e?aD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lm=(e,t,n)=>(sD(e,typeof t!="symbol"?t+"":t,n),n),ge=class{name;type;encodedLength;constructor(e,t,n){this.name=e,this.type=t,this.encodedLength=n}},oD="u8",cD="u16",uD="u32",lD="u64",dD="u256",fD="raw untyped ptr",pD="raw untyped slice",hD="bool",mD="b256",gD="struct std::b512::B512",xd="enum std::option::Option",_D="struct std::vec::Vec",AD="struct std::bytes::Bytes",yD="struct std::string::String",bD="str",tl="()",O0=/^enum (std::option::)?Option$/m,P0=/^str\[(?<length>[0-9]+)\]/,om=/^\[(?<item>[\w\s\\[\]]+);\s*(?<length>[0-9]+)\]/,D0=/^struct.+/,M0=/^enum.+$/,vD=/^\((?<items>.*)\)$/,wD=/^generic.+$/,ED=/([^\s]+)$/m,Xs="1",ue=8,lr=32,Ya=lr+2,Za=lr,Td=lr,cm=lr,CD=lr,ID=ue*4,SD=ue*2,F0=2**32-1,dm=({maxInputs:e})=>lr+Za+e*(Za+ue)+ue,fm=ue+ue+ue+ue+ue+ue+ue+ue+lr,WX=ue+ID+ue+cm+ue+Za+SD+ue+ue+ue+ue,ZX=ue+cm+cm+ue+CD+ue+ue+ue+ue+ue,k0=e=>e instanceof Uint8Array,$s=e=>{let t=Array.isArray(e)?e:Object.values(e);for(let n of t)if(n.type===xd||"coder"in n&&n.coder.type===xd||"coders"in n&&$s(n.coders))return!0;return!1},xe=class extends ge{coder;length;#e;constructor(e,t){super("array",`[${e.type}; ${t}]`,t*e.encodedLength),this.coder=e,this.length=t,this.#e=$s([e])}encode(e){if(!Array.isArray(e))throw new y(T.ENCODE_ERROR,"Expected array value.");if(this.length!==e.length)throw new y(T.ENCODE_ERROR,"Types/values length mismatch.");return re(Array.from(e).map(t=>this.coder.encode(t)))}decode(e,t){if(!this.#e&&e.length<this.encodedLength||e.length>F0)throw new y(T.DECODE_ERROR,"Invalid array data size.");let n=t;return[Array(this.length).fill(0).map(()=>{let i;return[i,n]=this.coder.decode(e,n),i}),n]}},te=class extends ge{constructor(){super("b256","b256",ue*4)}encode(e){let t;try{t=D(e)}catch{throw new y(T.ENCODE_ERROR,`Invalid ${this.type}.`)}if(t.length!==this.encodedLength)throw new y(T.ENCODE_ERROR,`Invalid ${this.type}.`);return t}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid b256 data size.");let n=e.slice(t,t+this.encodedLength);if(C(n).isZero()&&(n=new Uint8Array(32)),n.length!==this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid b256 byte data size.");return[Fs(n,32),t+32]}},xD=class extends ge{constructor(){super("b512","struct B512",ue*8)}encode(e){let t;try{t=D(e)}catch{throw new y(T.ENCODE_ERROR,`Invalid ${this.type}.`)}if(t.length!==this.encodedLength)throw new y(T.ENCODE_ERROR,`Invalid ${this.type}.`);return t}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid b512 data size.");let n=e.slice(t,t+this.encodedLength);if(C(n).isZero()&&(n=new Uint8Array(64)),n.length!==this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid b512 byte data size.");return[Fs(n,this.encodedLength),t+this.encodedLength]}},TD={u64:ue,u256:ue*4},j=class extends ge{constructor(e){super("bigNumber",e,TD[e])}encode(e){let t;try{t=un(e,this.encodedLength)}catch{throw new y(T.ENCODE_ERROR,`Invalid ${this.type}.`)}return t}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,`Invalid ${this.type} data size.`);let n=e.slice(t,t+this.encodedLength);if(n=n.slice(0,this.encodedLength),n.length!==this.encodedLength)throw new y(T.DECODE_ERROR,`Invalid ${this.type} byte data size.`);return[C(n),t+this.encodedLength]}},ND=class extends ge{options;constructor(e={padToWordSize:!1}){let t=e.padToWordSize?ue:1;super("boolean","boolean",t),this.options=e}encode(e){if(!(e===!0||e===!1))throw new y(T.ENCODE_ERROR,"Invalid boolean value.");return un(e?1:0,this.encodedLength)}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid boolean data size.");let n=C(e.slice(t,t+this.encodedLength));if(n.isZero())return[!1,t+this.encodedLength];if(!n.eq(C(1)))throw new y(T.DECODE_ERROR,"Invalid boolean value.");return[!0,t+this.encodedLength]}},L0=class extends ge{constructor(){super("struct","struct Bytes",ue)}encode(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=new j("u64").encode(t.length);return new Uint8Array([...n,...t])}decode(e,t){if(e.length<ue)throw new y(T.DECODE_ERROR,"Invalid byte data size.");let n=t+ue,r=e.slice(t,n),i=C(new j("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new y(T.DECODE_ERROR,"Invalid bytes byte data size.");return[a,n+i]}};lm(L0,"memorySize",1);var U0=class extends ge{name;coders;#e;#n;#t;constructor(e,t){let n=new j("u64"),r=Object.values(t).reduce((i,a)=>Math.min(i,a.encodedLength),0);super(`enum ${e}`,`enum ${e}`,n.encodedLength+r),this.name=e,this.coders=t,this.#e=n,this.#n=r,this.#t=!(O0.test(this.type)||$s(t))}#r(e){return this.type!==xd&&e.type===tl}#i(e){let t=this.coders[e],n=t.encode([]),r=Object.keys(this.coders).indexOf(e),i=new Uint8Array(this.#n-t.encodedLength);return re([this.#e.encode(r),i,n])}encode(e){if(typeof e=="string"&&this.coders[e])return this.#i(e);let[t,...n]=Object.keys(e);if(!t)throw new y(T.INVALID_DECODE_VALUE,"A field for the case must be provided.");if(n.length!==0)throw new y(T.INVALID_DECODE_VALUE,"Only one field must be provided.");let r=this.coders[t],i=Object.keys(this.coders).indexOf(t);if(i===-1){let s=Object.keys(this.coders).map(o=>`'${o}'`).join(", ");throw new y(T.INVALID_DECODE_VALUE,`Invalid case '${t}'. Valid cases: ${s}.`)}let a=r.encode(e[t]);return new Uint8Array([...this.#e.encode(i),...a])}#a(e,t){return[e,t]}decode(e,t){if(this.#t&&e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid enum data size.");let n=new j("u64").decode(e,t)[0],r=Ln(n),i=Object.keys(this.coders)[r];if(!i)throw new y(T.INVALID_DECODE_VALUE,`Invalid caseIndex "${r}". Valid cases: ${Object.keys(this.coders)}.`);let a=this.coders[i],s=t+this.#e.encodedLength;if(this.#t&&e.length<s+a.encodedLength)throw new y(T.DECODE_ERROR,"Invalid enum data size.");let[o,c]=a.decode(e,s);return this.#r(this.coders[i])?this.#a(i,c):[{[i]:o},c]}},RD=e=>{switch(e){case"u8":return 1;case"u16":return 2;case"u32":return 4;default:throw new y(T.TYPE_NOT_SUPPORTED,`Invalid number type: ${e}`)}},W=class extends ge{baseType;options;constructor(e,t={padToWordSize:!1}){let n=t.padToWordSize?ue:RD(e);super("number",e,n),this.baseType=e,this.options=t}encode(e){let t;try{t=un(e)}catch{throw new y(T.ENCODE_ERROR,`Invalid ${this.baseType}.`)}if(t.length>this.encodedLength)throw new y(T.ENCODE_ERROR,`Invalid ${this.baseType}, too many bytes.`);return un(t,this.encodedLength)}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid number data size.");let n=e.slice(t,t+this.encodedLength);if(n.length!==this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid number byte data size.");return[Ln(n),t+this.encodedLength]}},Q0=class extends U0{encode(e){return super.encode(this.toSwayOption(e))}toSwayOption(e){return e!==void 0?{Some:e}:{None:[]}}decode(e,t){let[n,r]=super.decode(e,t);return[this.toOption(n),r]}toOption(e){if(e&&"Some"in e)return e.Some}},kD=class extends ge{constructor(){super("raw untyped slice","raw untyped slice",ue)}encode(e){if(!Array.isArray(e))throw new y(T.ENCODE_ERROR,"Expected array value.");let n=new xe(new W("u8"),e.length).encode(e),r=new j("u64").encode(n.length);return new Uint8Array([...r,...n])}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid raw slice data size.");let n=t+ue,r=e.slice(t,n),i=C(new j("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new y(T.DECODE_ERROR,"Invalid raw slice byte data size.");let s=new xe(new W("u8"),i),[o]=s.decode(a,0);return[o,n+i]}},pm=class extends ge{constructor(){super("struct","struct String",ue)}encode(e){let t=Ur(e),n=new j("u64").encode(e.length);return new Uint8Array([...n,...t])}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid std string data size.");let n=t+ue,r=e.slice(t,n),i=C(new j("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new y(T.DECODE_ERROR,"Invalid std string byte data size.");return[Us(a),n+i]}};lm(pm,"memorySize",1);var q0=class extends ge{constructor(){super("strSlice","str",ue)}encode(e){let t=Ur(e),n=new j("u64").encode(e.length);return new Uint8Array([...n,...t])}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid string slice data size.");let n=t+ue,r=e.slice(t,n),i=C(new j("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new y(T.DECODE_ERROR,"Invalid string slice byte data size.");return[Us(a),n+i]}};lm(q0,"memorySize",1);var BD=class extends ge{constructor(e){super("string",`str[${e}]`,e)}encode(e){if(e.length!==this.encodedLength)throw new y(T.ENCODE_ERROR,"Value length mismatch during encode.");return Ur(e)}decode(e,t){if(e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid string data size.");let n=e.slice(t,t+this.encodedLength);if(n.length!==this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid string byte data size.");return[Us(n),t+this.encodedLength]}},Ks=class extends ge{name;coders;#e;constructor(e,t){let n=Object.values(t).reduce((r,i)=>r+i.encodedLength,0);super("struct",`struct ${e}`,n),this.name=e,this.coders=t,this.#e=$s(t)}encode(e){return Ls(Object.keys(this.coders).map(t=>{let n=this.coders[t],r=e[t];if(!(n instanceof Q0)&&r==null)throw new y(T.ENCODE_ERROR,`Invalid ${this.type}. Field "${t}" not present.`);return n.encode(r)}))}decode(e,t){if(!this.#e&&e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid struct data size.");let n=t;return[Object.keys(this.coders).reduce((i,a)=>{let s=this.coders[a],o;return[o,n]=s.decode(e,n),i[a]=o,i},{}),n]}},V0=class extends ge{coders;#e;constructor(e){let t=e.reduce((n,r)=>n+r.encodedLength,0);super("tuple",`(${e.map(n=>n.type).join(", ")})`,t),this.coders=e,this.#e=$s(e)}encode(e){if(this.coders.length!==e.length)throw new y(T.ENCODE_ERROR,"Types/values length mismatch.");return Ls(this.coders.map((t,n)=>t.encode(e[n])))}decode(e,t){if(!this.#e&&e.length<this.encodedLength)throw new y(T.DECODE_ERROR,"Invalid tuple data size.");let n=t;return[this.coders.map(i=>{let a;return[a,n]=i.decode(e,n),a}),n]}},OD=class extends ge{coder;#e;constructor(e){super("struct","struct Vec",ue),this.coder=e,this.#e=$s([e])}encode(e){if(!Array.isArray(e)&&!k0(e))throw new y(T.ENCODE_ERROR,"Expected array value, or a Uint8Array. You can use arrayify to convert a value to a Uint8Array.");let t=new j("u64");if(k0(e))return new Uint8Array([...t.encode(e.length),...e]);let n=e.map(i=>this.coder.encode(i)),r=t.encode(e.length);return new Uint8Array([...r,...Ls(n)])}decode(e,t){if(!this.#e&&e.length<this.encodedLength||e.length>F0)throw new y(T.DECODE_ERROR,"Invalid vec data size.");let n=t+ue,r=e.slice(t,n),i=C(new j("u64").decode(r,0)[0]).toNumber(),a=i*this.coder.encodedLength,s=e.slice(n,n+a);if(!this.#e&&s.length!==a)throw new y(T.DECODE_ERROR,"Invalid vec byte data size.");let o=n,c=[];for(let u=0;u<i;u++){let[d,p]=this.coder.decode(e,o);c.push(d),o=p}return[c,o]}},J0=e=>{switch(e){case void 0:case Xs:return Xs;default:throw new y(T.UNSUPPORTED_ENCODING_VERSION,`Encoding version '${e}' is unsupported.`)}},el=(e,t)=>{let n=e.types.find(r=>r.typeId===t);if(!n)throw new y(T.TYPE_NOT_FOUND,`Type with typeId '${t}' doesn't exist in the ABI.`);return n},PD=(e,t)=>t.filter(n=>el(e,n.type).type!==tl),DD=e=>{let t=e.find(r=>r.name==="buf"),n=t?.originalTypeArguments?.[0];if(!t||!n)throw new y(T.INVALID_COMPONENT,"The Vec type provided is missing or has a malformed 'buf' component.");return n},Yi=class{abi;name;type;originalTypeArguments;components;constructor(e,t){this.abi=e,this.name=t.name;let n=el(e,t.type);if(n.type.length>256)throw new y(T.INVALID_COMPONENT,`The provided ABI type is too long: ${n.type}.`);this.type=n.type,this.originalTypeArguments=t.typeArguments,this.components=Yi.getResolvedGenericComponents(e,t,n.components,n.typeParameters??Yi.getImplicitGenericTypeParameters(e,n.components))}static getResolvedGenericComponents(e,t,n,r){if(n===null)return null;if(r===null||r.length===0)return n.map(s=>new Yi(e,s));let i=r.reduce((s,o,c)=>{let u={...s};return u[o]=structuredClone(t.typeArguments?.[c]),u},{});return this.resolveGenericArgTypes(e,n,i).map(s=>new Yi(e,s))}static resolveGenericArgTypes(e,t,n){return t.map(r=>{if(n[r.type]!==void 0)return{...n[r.type],name:r.name};if(r.typeArguments)return{...structuredClone(r),typeArguments:this.resolveGenericArgTypes(e,r.typeArguments,n)};let i=el(e,r.type),a=this.getImplicitGenericTypeParameters(e,i.components);return a&&a.length>0?{...structuredClone(r),typeArguments:a.map(s=>n[s])}:r})}static getImplicitGenericTypeParameters(e,t,n){if(!Array.isArray(t))return null;let r=n??[];return t.forEach(i=>{let a=el(e,i.type);if(wD.test(a.type)){r.push(a.typeId);return}Array.isArray(i.typeArguments)&&this.getImplicitGenericTypeParameters(e,i.typeArguments,r)}),r.length>0?r:null}getSignature(){let e=this.getArgSignaturePrefix(),t=this.getArgSignatureContent();return`${e}${t}`}getArgSignaturePrefix(){return D0.test(this.type)?"s":om.test(this.type)?"a":M0.test(this.type)?"e":""}getArgSignatureContent(){if(this.type==="raw untyped ptr")return"rawptr";if(this.type==="raw untyped slice")return"rawslice";let e=P0.exec(this.type)?.groups;if(e)return`str[${e.length}]`;if(this.components===null)return this.type;let t=om.exec(this.type)?.groups;if(t)return`[${this.components[0].getSignature()};${t.length}]`;let n=this.originalTypeArguments!==null?`<${this.originalTypeArguments.map(i=>new Yi(this.abi,i).getSignature()).join(",")}>`:"",r=`(${this.components.map(i=>i.getSignature()).join(",")})`;return`${n}${r}`}},MD=class extends ge{constructor(){super("void",tl,0)}encode(e){return new Uint8Array([])}decode(e,t){return[void 0,t]}};function B0(e,t){let{getCoder:n}=t;return e.reduce((r,i)=>{let a=r;return a[i.name]=n(i,t),a},{})}var Zs=(e,t)=>{switch(e.type){case oD:case cD:case uD:return new W(e.type);case lD:case fD:return new j("u64");case dD:return new j("u256");case pD:return new kD;case hD:return new ND;case mD:return new te;case gD:return new xD;case AD:return new L0;case yD:return new pm;case bD:return new q0;case tl:return new MD;default:break}let n=P0.exec(e.type)?.groups;if(n){let u=parseInt(n.length,10);return new BD(u)}let r=e.components,i=om.exec(e.type)?.groups;if(i){let u=parseInt(i.length,10),d=r[0];if(!d)throw new y(T.INVALID_COMPONENT,"The provided Array type is missing an item of 'component'.");let p=Zs(d);return new xe(p,u)}if(e.type===_D){let u=DD(r),d=new Yi(e.abi,u),p=Zs(d,{encoding:Xs});return new OD(p)}let a=e.type.match(ED)?.[0];if(D0.test(e.type)&&a){let u=B0(r,{getCoder:Zs});return new Ks(a,u)}if(M0.test(e.type)&&a){let u=B0(r,{getCoder:Zs});return e.type===xd?new Q0(a,u):new U0(a,u)}if(vD.exec(e.type)?.groups){let u=r.map(d=>Zs(d,{encoding:Xs}));return new V0(u)}throw new y(T.CODER_NOT_FOUND,`Coder not found: ${JSON.stringify(e)}.`)};function FD(e=Xs){switch(e){case Xs:return Zs;default:throw new y(T.UNSUPPORTED_ENCODING_VERSION,`Encoding version ${e} is unsupported.`)}}var Wa=class{static getCoder(e,t,n={padToWordSize:!1}){let r=new Yi(e,t);return FD(n.encoding)(r,n)}static encode(e,t,n,r){return this.getCoder(e,t,r).encode(n)}static decode(e,t,n,r,i){return this.getCoder(e,t,i).decode(n,r)}},LD=e=>{let{jsonAbi:t,inputs:n}=e,r=!1;return n.reduceRight((i,a)=>{let s=el(t,a.type);return r=r||s.type!==tl&&!O0.test(s.type),[{...a,isOptional:!r},...i]},[])},UD=(e,t)=>{if(e.length>=t.length)return e;let n=e.slice();return n.length=t.length,n.fill(void 0,e.length),n},um=class{signature;selector;selectorBytes;encoding;name;jsonFn;attributes;jsonAbiOld;jsonFnOld;constructor(e,t){this.jsonFn=t,this.jsonAbiOld=e,this.jsonFnOld=e.functions.find(n=>n.name===t.name),this.name=t.name,this.signature=um.getSignature(this.jsonAbiOld,this.jsonFnOld),this.selector=um.getFunctionSelector(this.signature),this.selectorBytes=new pm().encode(this.name),this.encoding=J0(e.encoding),this.attributes=this.jsonFn.attributes??[]}static getSignature(e,t){let n=t.inputs.map(r=>new Yi(e,r).getSignature());return`${t.name}(${n.join(",")})`}static getFunctionSelector(e){let t=at(ur(e,"utf-8"));return C(t.slice(0,10)).toHex(8)}encodeArguments(e){let n=LD({jsonAbi:this.jsonAbiOld,inputs:this.jsonFnOld.inputs}).filter(a=>!a.isOptional).length;if(e.length<n)throw new y(T.ABI_TYPES_AND_VALUES_MISMATCH,`Invalid number of arguments. Expected a minimum of ${n} arguments, received ${e.length}`);let r=this.jsonFnOld.inputs.map(a=>Wa.getCoder(this.jsonAbiOld,a,{encoding:this.encoding})),i=UD(e,this.jsonFn.inputs);return new V0(r).encode(i)}decodeArguments(e){let t=D(e),n=PD(this.jsonAbiOld,this.jsonFnOld.inputs);if(n.length===0){if(t.length===0)return;throw new y(T.DECODE_ERROR,`Types/values length mismatch during decode. ${JSON.stringify({count:{types:this.jsonFn.inputs.length,nonVoidInputs:n.length,values:t.length},value:{args:this.jsonFn.inputs,nonVoidInputs:n,values:t}})}`)}return this.jsonFnOld.inputs.reduce((i,a)=>{let s=Wa.getCoder(this.jsonAbiOld,a,{encoding:this.encoding}),[o,c]=s.decode(t,i.offset);return{decoded:[...i.decoded,o],offset:i.offset+c}},{decoded:[],offset:0}).decoded}decodeOutput(e){let t=D(e);return Wa.getCoder(this.jsonAbiOld,this.jsonFnOld.output,{encoding:this.encoding}).decode(t,0)}isReadOnly(){return!this.attributes.find(t=>t.name==="storage")?.arguments?.includes("write")}},QD=(e,t)=>e.find(n=>n.concreteTypeId===t),hm=(e,t)=>e.concreteTypes.find(n=>n.concreteTypeId===t);function mm(e,t,n){let r=hm(e,n);if(r.metadataTypeId!==void 0)return r.metadataTypeId;let i=QD(t,n);return i?i.typeId:(t.push({typeId:t.length,type:r.type,components:gm(r.components),concreteTypeId:n,typeParameters:r.typeParameters??null,originalConcreteTypeId:r?.concreteTypeId}),t.length-1)}function z0(e,t,n){return n.typeArguments?.map(r=>{let i=hm(e,r);return{name:"",type:isNaN(r)?mm(e,t,r):r,typeArguments:z0(e,t,i)}})??null}function Ys(e,t,n,r){let i=mm(e,t,n),a=hm(e,n);return{name:r??"",type:i,typeArguments:z0(e,t,a)}}function gm(e,t,n){return n?.map(r=>{let{typeId:i,name:a,typeArguments:s}=r,o=isNaN(i)?mm(e,t,i):i;return{name:a,type:o,typeArguments:gm(e,t,s)}})??null}function qD(e){if(!e.specVersion)return e;let t=[];e.metadataTypes.forEach(s=>{let o={typeId:s.metadataTypeId,type:s.type,components:s.components??(s.type==="()"?[]:null),typeParameters:s.typeParameters??null};t.push(o)}),t.forEach(s=>{s.components=gm(e,t,s.components)});let n=e.functions.map(s=>{let o=s.inputs.map(({concreteTypeId:u,name:d})=>Ys(e,t,u,d)),c=Ys(e,t,s.output,"");return{...s,inputs:o,output:c}}),r=e.configurables.map(s=>({name:s.name,configurableType:Ys(e,t,s.concreteTypeId),offset:s.offset})),i=e.loggedTypes.map(s=>({logId:s.logId,loggedType:Ys(e,t,s.concreteTypeId)}));return{encoding:e.encodingVersion,types:t,functions:n,loggedTypes:i,messagesTypes:e.messagesTypes,configurables:r}}var Qn=class{functions;configurables;jsonAbi;encoding;jsonAbiOld;constructor(e){this.jsonAbi=e,this.encoding=J0(e.encodingVersion),this.jsonAbiOld=qD(e),this.functions=Object.fromEntries(this.jsonAbi.functions.map(t=>[t.name,new um(this.jsonAbiOld,t)])),this.configurables=Object.fromEntries(this.jsonAbi.configurables.map(t=>[t.name,t]))}getFunction(e){let t=Object.values(this.functions).find(n=>n.name===e||n.signature===e||n.selector===e);if(t!==void 0)return t;throw new y(T.FUNCTION_NOT_FOUND,`function ${e} not found: ${JSON.stringify(t)}.`)}decodeFunctionResult(e,t){return(typeof e=="string"?this.getFunction(e):e).decodeOutput(t)}decodeLog(e,t){let n=this.jsonAbiOld.loggedTypes.find(r=>r.logId===t);if(!n)throw new y(T.LOG_TYPE_NOT_FOUND,`Log type with logId '${t}' doesn't exist in the ABI.`);return Wa.decode(this.jsonAbiOld,n.loggedType,D(e),0,{encoding:this.encoding})}encodeConfigurable(e,t){let n=this.jsonAbiOld.configurables.find(r=>r.name===e);if(!n)throw new y(T.CONFIGURABLE_NOT_FOUND,`A configurable with the '${e}' was not found in the ABI.`);return Wa.encode(this.jsonAbiOld,n.configurableType,t,{encoding:this.encoding})}encodeType(e,t){let n=Ys(this.jsonAbi,this.jsonAbiOld.types,e,"");return Wa.encode(this.jsonAbiOld,n,t,{encoding:this.encoding})}decodeType(e,t){let n=Ys(this.jsonAbi,this.jsonAbiOld.types,e,"");return Wa.decode(this.jsonAbiOld,n,t,0,{encoding:this.encoding})}};var G0=class{},Nd=class{},VD=class{},H0=class extends VD{};var to=Cn(X0(),1);var Pd="fuel";function ym(e){return to.bech32m.decode(e)}function kd(e){return to.bech32m.encode(Pd,to.bech32m.toWords(D(M(e))))}function Bd(e){return typeof e=="string"&&e.indexOf(Pd+1)===0&&ym(e).prefix===Pd}function Od(e){return e.length===66&&/(0x)[0-9a-f]{64}$/i.test(e)}function $0(e){return e.length===130&&/(0x)[0-9a-f]{128}$/i.test(e)}function Am(e){return e.length===42&&/(0x)[0-9a-f]{40}$/i.test(e)}function bm(e){return new Uint8Array(to.bech32m.fromWords(ym(e).words))}function K0(e){if(!Bd(e))throw new y(y.CODES.INVALID_BECH32_ADDRESS,`Invalid Bech32 Address: ${e}.`);return M(bm(e))}function HD(e){let{words:t}=ym(e);return to.bech32m.encode(Pd,t)}var Xa=e=>e instanceof Nd?e.address:e instanceof H0?e.id:e,WD=()=>M(Ft(32)),ZD=e=>{let t;try{if(!Od(e))throw new y(y.CODES.INVALID_BECH32_ADDRESS,`Invalid Bech32 Address: ${e}.`);t=bm(kd(e)),t=M(t.fill(0,0,12))}catch{throw new y(y.CODES.PARSE_FAILED,`Cannot generate EVM Address B256 from: ${e}.`)}return t},YD=e=>{if(!Am(e))throw new y(y.CODES.INVALID_EVM_ADDRESS,"Invalid EVM address format.");return e.replace("0x","0x000000000000000000000000")},se=class extends G0{bech32Address;constructor(e){if(super(),this.bech32Address=HD(e),!Bd(this.bech32Address))throw new y(y.CODES.INVALID_BECH32_ADDRESS,`Invalid Bech32 Address: ${e}.`)}toChecksum(){return se.toChecksum(this.toB256())}toAddress(){return this.bech32Address}toB256(){return K0(this.bech32Address)}toBytes(){return bm(this.bech32Address)}toHexString(){return this.toB256()}toString(){return this.toChecksum()}toJSON(){return this.bech32Address}toEvmAddress(){let e=K0(this.bech32Address);return{bits:ZD(e)}}toAssetId(){return{bits:this.toB256()}}valueOf(){return this.toChecksum()}equals(e){return this.bech32Address===e.bech32Address}static fromPublicKey(e){if(!$0(e))throw new y(y.CODES.INVALID_PUBLIC_KEY,`Invalid Public Key: ${e}.`);let t=M(Qr(D(e)));return new se(kd(t))}static fromB256(e){if(!Od(e))throw new y(y.CODES.INVALID_B256_ADDRESS,`Invalid B256 Address: ${e}.`);return new se(kd(e))}static fromRandom(){return this.fromB256(WD())}static fromString(e){return Bd(e)?new se(e):this.fromB256(e)}static fromAddressOrString(e){return typeof e=="string"?this.fromString(e):e}static fromDynamicInput(e){if(typeof e!="string"&&"toB256"in e)return se.fromB256(e.toB256());if($0(e))return se.fromPublicKey(e);if(Bd(e))return new se(e);if(Od(e))return se.fromB256(e);if(Am(e))return se.fromEvmAddress(e);throw new y(y.CODES.PARSE_FAILED,"Unknown address format: only 'Bech32', 'B256', or 'Public Key (512)' are supported.")}static fromEvmAddress(e){if(!Am(e))throw new y(y.CODES.INVALID_EVM_ADDRESS,`Invalid Evm Address: ${e}.`);let t=YD(e);return new se(kd(t))}static isChecksumValid(e){let t=e;return e.startsWith("0x")||(t=`0x${e}`),t.trim().length!==66?!1:se.toChecksum(M(t))===t}static toChecksum(e){if(!Od(e))throw new y(y.CODES.INVALID_B256_ADDRESS,`Invalid B256 Address: ${e}.`);let t=M(e).toLowerCase().slice(2),n=Qr(t),r="0x";for(let i=0;i<32;++i){let a=n[i],s=t.charAt(i*2),o=t.charAt(i*2+1);r+=(a&240)>=128?s.toUpperCase():s,r+=(a&15)>=8?o.toUpperCase():o}return r}};var it=class extends ge{length;#e;constructor(e){let t=(8-e%8)%8,n=e+t;super("ByteArray",`[u64; ${n/4}]`,n),this.length=e,this.#e=t}encode(e){let t=[],n=D(e);return t.push(n),this.#e&&t.push(new Uint8Array(this.#e)),re(t)}decode(e,t){let n,r=t;[n,r]=[M(e.slice(r,r+this.length)),r+this.length];let i=n;return this.#e&&([n,r]=[null,r+this.#e]),[i,r]}},Xi=class extends Ks{constructor(){super("TxPointer",{blockHeight:new W("u32",{padToWordSize:!0}),txIndex:new W("u16",{padToWordSize:!0})})}static decodeFromGqlScalar(e){if(e.length!==12)throw new y(T.DECODE_ERROR,`Invalid TxPointer scalar string length ${e.length}. It must have length 12.`);let[t,n]=[e.substring(0,8),e.substring(8)];return{blockHeight:parseInt(t,16),txIndex:parseInt(n,16)}}},be=(e=>(e[e.Coin=0]="Coin",e[e.Contract=1]="Contract",e[e.Message=2]="Message",e))(be||{}),j0=class extends ge{constructor(){super("InputCoin","struct InputCoin",0)}encode(e){let t=[];return t.push(new te().encode(e.txID)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputIndex)),t.push(new te().encode(e.owner)),t.push(new j("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),t.push(new Xi().encode(e.txPointer)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new j("u64").encode(e.predicateGasUsed)),t.push(new j("u64").encode(e.predicateLength)),t.push(new j("u64").encode(e.predicateDataLength)),t.push(new it(e.predicateLength.toNumber()).encode(e.predicate)),t.push(new it(e.predicateDataLength.toNumber()).encode(e.predicateData)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new te().decode(e,r);let s=n;[n,r]=new j("u64").decode(e,r);let o=n;[n,r]=new te().decode(e,r);let c=n;[n,r]=new Xi().decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=Number(n);[n,r]=new j("u64").decode(e,r);let p=n;[n,r]=new j("u64").decode(e,r);let h=n;[n,r]=new j("u64").decode(e,r);let _=n;[n,r]=new it(h.toNumber()).decode(e,r);let I=n;return[n,r]=new it(_.toNumber()).decode(e,r),[{type:0,txID:i,outputIndex:a,owner:s,amount:o,assetId:c,txPointer:u,witnessIndex:d,predicateGasUsed:p,predicateLength:h,predicateDataLength:_,predicate:I,predicateData:n},r]}},Dd=class extends ge{constructor(){super("InputContract","struct InputContract",0)}encode(e){let t=[];return t.push(new te().encode(e.txID)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputIndex)),t.push(new te().encode(e.balanceRoot)),t.push(new te().encode(e.stateRoot)),t.push(new Xi().encode(e.txPointer)),t.push(new te().encode(e.contractID)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new te().decode(e,r);let s=n;[n,r]=new te().decode(e,r);let o=n;[n,r]=new Xi().decode(e,r);let c=n;return[n,r]=new te().decode(e,r),[{type:1,txID:i,outputIndex:a,balanceRoot:s,stateRoot:o,txPointer:c,contractID:n},r]}},qr=class extends ge{constructor(){super("InputMessage","struct InputMessage",0)}static getMessageId(e){let t=[];return t.push(new it(32).encode(e.sender)),t.push(new it(32).encode(e.recipient)),t.push(new it(32).encode(e.nonce)),t.push(new j("u64").encode(e.amount)),t.push(D(e.data||"0x")),at(re(t))}static encodeData(e){let t=D(e||"0x"),n=t.length;return new it(n).encode(t)}encode(e){let t=[],n=qr.encodeData(e.data);return t.push(new it(32).encode(e.sender)),t.push(new it(32).encode(e.recipient)),t.push(new j("u64").encode(e.amount)),t.push(new it(32).encode(e.nonce)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new j("u64").encode(e.predicateGasUsed)),t.push(new j("u64").encode(n.length)),t.push(new j("u64").encode(e.predicateLength)),t.push(new j("u64").encode(e.predicateDataLength)),t.push(new it(n.length).encode(n)),t.push(new it(e.predicateLength.toNumber()).encode(e.predicate)),t.push(new it(e.predicateDataLength.toNumber()).encode(e.predicateData)),re(t)}static decodeData(e){let t=D(e),n=t.length,[r]=new it(n).decode(t,0);return D(r)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;[n,r]=new j("u64").decode(e,r);let s=n;[n,r]=new te().decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=Number(n);[n,r]=new j("u64").decode(e,r);let u=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new j("u64").decode(e,r);let p=n;[n,r]=new j("u64").decode(e,r);let h=n;[n,r]=new it(d).decode(e,r);let _=n;[n,r]=new it(p.toNumber()).decode(e,r);let I=n;return[n,r]=new it(h.toNumber()).decode(e,r),[{type:2,sender:i,recipient:a,amount:s,witnessIndex:c,nonce:o,predicateGasUsed:u,dataLength:d,predicateLength:p,predicateDataLength:h,data:_,predicate:I,predicateData:n},r]}},Vr=class extends ge{constructor(){super("Input","struct Input",0)}encode(e){let t=[];t.push(new W("u8",{padToWordSize:!0}).encode(e.type));let{type:n}=e;switch(n){case 0:{t.push(new j0().encode(e));break}case 1:{t.push(new Dd().encode(e));break}case 2:{t.push(new qr().encode(e));break}default:throw new y(T.INVALID_TRANSACTION_INPUT,`Invalid transaction input type: ${n}.`)}return re(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;switch(i){case 0:return[n,r]=new j0().decode(e,r),[n,r];case 1:return[n,r]=new Dd().decode(e,r),[n,r];case 2:return[n,r]=new qr().decode(e,r),[n,r];default:throw new y(T.INVALID_TRANSACTION_INPUT,`Invalid transaction input type: ${i}.`)}}},we=(e=>(e[e.Coin=0]="Coin",e[e.Contract=1]="Contract",e[e.Change=2]="Change",e[e.Variable=3]="Variable",e[e.ContractCreated=4]="ContractCreated",e))(we||{}),eE=class extends ge{constructor(){super("OutputCoin","struct OutputCoin",0)}encode(e){let t=[];return t.push(new te().encode(e.to)),t.push(new j("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new j("u64").decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:0,to:i,amount:a,assetId:n},r]}},Md=class extends ge{constructor(){super("OutputContract","struct OutputContract",0)}encode(e){let t=[];return t.push(new W("u8",{padToWordSize:!0}).encode(e.inputIndex)),t.push(new te().encode(e.balanceRoot)),t.push(new te().encode(e.stateRoot)),re(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:1,inputIndex:i,balanceRoot:a,stateRoot:n},r]}},tE=class extends ge{constructor(){super("OutputChange","struct OutputChange",0)}encode(e){let t=[];return t.push(new te().encode(e.to)),t.push(new j("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new j("u64").decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:2,to:i,amount:a,assetId:n},r]}},nE=class extends ge{constructor(){super("OutputVariable","struct OutputVariable",0)}encode(e){let t=[];return t.push(new te().encode(e.to)),t.push(new j("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new j("u64").decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:3,to:i,amount:a,assetId:n},r]}},rE=class extends ge{constructor(){super("OutputContractCreated","struct OutputContractCreated",0)}encode(e){let t=[];return t.push(new te().encode(e.contractId)),t.push(new te().encode(e.stateRoot)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;return[n,r]=new te().decode(e,r),[{type:4,contractId:i,stateRoot:n},r]}},Jr=class extends ge{constructor(){super("Output"," struct Output",0)}encode(e){let t=[];t.push(new W("u8",{padToWordSize:!0}).encode(e.type));let{type:n}=e;switch(n){case 0:{t.push(new eE().encode(e));break}case 1:{t.push(new Md().encode(e));break}case 2:{t.push(new tE().encode(e));break}case 3:{t.push(new nE().encode(e));break}case 4:{t.push(new rE().encode(e));break}default:throw new y(T.INVALID_TRANSACTION_OUTPUT,`Invalid transaction output type: ${n}.`)}return re(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;switch(i){case 0:return[n,r]=new eE().decode(e,r),[n,r];case 1:return[n,r]=new Md().decode(e,r),[n,r];case 2:return[n,r]=new tE().decode(e,r),[n,r];case 3:return[n,r]=new nE().decode(e,r),[n,r];case 4:return[n,r]=new rE().decode(e,r),[n,r];default:throw new y(T.INVALID_TRANSACTION_OUTPUT,`Invalid transaction output type: ${i}.`)}}},ln=(e=>(e[e.Tip=1]="Tip",e[e.WitnessLimit=2]="WitnessLimit",e[e.Maturity=4]="Maturity",e[e.MaxFee=8]="MaxFee",e))(ln||{}),XD=e=>e.sort((t,n)=>t.type-n.type);function $D(e){let t=new Set;e.forEach(n=>{if(t.has(n.type))throw new y(T.DUPLICATED_POLICY,"Duplicate policy type found: 8");t.add(n.type)})}var zr=class extends ge{constructor(){super("Policies","array Policy",0)}encode(e){$D(e);let t=XD(e),n=[];return t.forEach(({data:r,type:i})=>{switch(i){case 8:case 1:case 2:n.push(new j("u64").encode(r));break;case 4:n.push(new W("u32",{padToWordSize:!0}).encode(r));break;default:throw new y(T.INVALID_POLICY_TYPE,`Invalid policy type: ${i}`)}}),re(n)}decode(e,t,n){let r=t,i=[];if(n&1){let[a,s]=new j("u64").decode(e,r);r=s,i.push({type:1,data:a})}if(n&2){let[a,s]=new j("u64").decode(e,r);r=s,i.push({type:2,data:a})}if(n&4){let[a,s]=new W("u32",{padToWordSize:!0}).decode(e,r);r=s,i.push({type:4,data:a})}if(n&8){let[a,s]=new j("u64").decode(e,r);r=s,i.push({type:8,data:a})}return[i,r]}},fe=(e=>(e[e.Call=0]="Call",e[e.Return=1]="Return",e[e.ReturnData=2]="ReturnData",e[e.Panic=3]="Panic",e[e.Revert=4]="Revert",e[e.Log=5]="Log",e[e.LogData=6]="LogData",e[e.Transfer=7]="Transfer",e[e.TransferOut=8]="TransferOut",e[e.ScriptResult=9]="ScriptResult",e[e.MessageOut=10]="MessageOut",e[e.Mint=11]="Mint",e[e.Burn=12]="Burn",e))(fe||{});var vm=(e,t)=>{let n=D(e),r=D(t);return at(re([n,r]))};var iE=class extends Ks{constructor(){super("StorageSlot",{key:new te,value:new te})}},In=(e=>(e[e.ConsensusParameters=0]="ConsensusParameters",e[e.StateTransition=1]="StateTransition",e))(In||{}),aE=class extends ge{constructor(){super("UpgradePurpose","UpgradePurpose",0)}encode(e){let t=[],{type:n}=e;switch(t.push(new W("u8",{padToWordSize:!0}).encode(n)),n){case 0:{let r=e.data;t.push(new W("u16",{padToWordSize:!0}).encode(r.witnessIndex)),t.push(new te().encode(r.checksum));break}case 1:{let r=e.data;t.push(new te().encode(r.bytecodeRoot));break}default:throw new y(T.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${n}`)}return re(t)}decode(e,t){let n=t,r;[r,n]=new W("u8",{padToWordSize:!0}).decode(e,n);let i=r;switch(i){case 0:{[r,n]=new W("u16",{padToWordSize:!0}).decode(e,n);let a=r;return[r,n]=new te().decode(e,n),[{type:i,data:{witnessIndex:a,checksum:r}},n]}case 1:return[r,n]=new te().decode(e,n),[{type:i,data:{bytecodeRoot:r}},n];default:throw new y(T.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${i}`)}}},Gr=class extends ge{constructor(){super("Witness","unknown",0)}encode(e){let t=[];return t.push(new W("u32",{padToWordSize:!0}).encode(e.dataLength)),t.push(new it(e.dataLength).encode(e.data)),re(t)}decode(e,t){let n,r=t;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let i=n;return[n,r]=new it(i).decode(e,r),[{dataLength:i,data:n},r]}},Ce=(e=>(e[e.Script=0]="Script",e[e.Create=1]="Create",e[e.Mint=2]="Mint",e[e.Upgrade=3]="Upgrade",e[e.Upload=4]="Upload",e[e.Blob=5]="Blob",e))(Ce||{}),sE=class extends ge{constructor(){super("TransactionScript","struct TransactionScript",0)}encode(e){let t=[];return t.push(new j("u64").encode(e.scriptGasLimit)),t.push(new te().encode(e.receiptsRoot)),t.push(new j("u64").encode(e.scriptLength)),t.push(new j("u64").encode(e.scriptDataLength)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new it(e.scriptLength.toNumber()).encode(e.script)),t.push(new it(e.scriptDataLength.toNumber()).encode(e.scriptData)),t.push(new zr().encode(e.policies)),t.push(new xe(new Vr,e.inputsCount).encode(e.inputs)),t.push(new xe(new Jr,e.outputsCount).encode(e.outputs)),t.push(new xe(new Gr,e.witnessesCount).encode(e.witnesses)),re(t)}decode(e,t){let n,r=t;[n,r]=new j("u64").decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;[n,r]=new j("u64").decode(e,r);let s=n;[n,r]=new j("u64").decode(e,r);let o=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let p=n;[n,r]=new it(s.toNumber()).decode(e,r);let h=n;[n,r]=new it(o.toNumber()).decode(e,r);let _=n;[n,r]=new zr().decode(e,r,c);let I=n;[n,r]=new xe(new Vr,u).decode(e,r);let v=n;[n,r]=new xe(new Jr,d).decode(e,r);let b=n;return[n,r]=new xe(new Gr,p).decode(e,r),[{type:0,scriptGasLimit:i,scriptLength:s,scriptDataLength:o,policyTypes:c,inputsCount:u,outputsCount:d,witnessesCount:p,receiptsRoot:a,script:h,scriptData:_,policies:I,inputs:v,outputs:b,witnesses:n},r]}},oE=class extends ge{constructor(){super("TransactionCreate","struct TransactionCreate",0)}encode(e){let t=[];return t.push(new W("u16",{padToWordSize:!0}).encode(e.bytecodeWitnessIndex)),t.push(new te().encode(e.salt)),t.push(new j("u64").encode(e.storageSlotsCount)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new xe(new iE,e.storageSlotsCount.toNumber()).encode(e.storageSlots)),t.push(new zr().encode(e.policies)),t.push(new xe(new Vr,e.inputsCount).encode(e.inputs)),t.push(new xe(new Jr,e.outputsCount).encode(e.outputs)),t.push(new xe(new Gr,e.witnessesCount).encode(e.witnesses)),re(t)}decode(e,t){let n,r=t;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;[n,r]=new j("u64").decode(e,r);let s=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new xe(new iE,s.toNumber()).decode(e,r);let p=n;[n,r]=new zr().decode(e,r,o);let h=n;[n,r]=new xe(new Vr,c).decode(e,r);let _=n;[n,r]=new xe(new Jr,u).decode(e,r);let I=n;return[n,r]=new xe(new Gr,d).decode(e,r),[{type:1,bytecodeWitnessIndex:i,policyTypes:o,storageSlotsCount:s,inputsCount:c,outputsCount:u,witnessesCount:d,salt:a,policies:h,storageSlots:p,inputs:_,outputs:I,witnesses:n},r]}},cE=class extends ge{constructor(){super("TransactionMint","struct TransactionMint",0)}encode(e){let t=[];return t.push(new Xi().encode(e.txPointer)),t.push(new Dd().encode(e.inputContract)),t.push(new Md().encode(e.outputContract)),t.push(new j("u64").encode(e.mintAmount)),t.push(new te().encode(e.mintAssetId)),t.push(new j("u64").encode(e.gasPrice)),re(t)}decode(e,t){let n,r=t;[n,r]=new Xi().decode(e,r);let i=n;[n,r]=new Dd().decode(e,r);let a=n;[n,r]=new Md().decode(e,r);let s=n;[n,r]=new j("u64").decode(e,r);let o=n;[n,r]=new te().decode(e,r);let c=n;return[n,r]=new j("u64").decode(e,r),[{type:2,txPointer:i,inputContract:a,outputContract:s,mintAmount:o,mintAssetId:c,gasPrice:n},r]}},uE=class extends ge{constructor(){super("TransactionUpgrade","struct TransactionUpgrade",0)}encode(e){let t=[];return t.push(new aE().encode(e.upgradePurpose)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new zr().encode(e.policies)),t.push(new xe(new Vr,e.inputsCount).encode(e.inputs)),t.push(new xe(new Jr,e.outputsCount).encode(e.outputs)),t.push(new xe(new Gr,e.witnessesCount).encode(e.witnesses)),re(t)}decode(e,t){let n,r=t;[n,r]=new aE().decode(e,r);let i=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let s=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new zr().decode(e,r,a);let u=n;[n,r]=new xe(new Vr,s).decode(e,r);let d=n;[n,r]=new xe(new Jr,o).decode(e,r);let p=n;return[n,r]=new xe(new Gr,c).decode(e,r),[{type:3,upgradePurpose:i,policyTypes:a,inputsCount:s,outputsCount:o,witnessesCount:c,policies:u,inputs:d,outputs:p,witnesses:n},r]}},lE=class extends ge{constructor(){super("TransactionUpload","struct TransactionUpload",0)}encode(e){let t=[];return t.push(new te().encode(e.root)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new W("u16",{padToWordSize:!0}).encode(e.subsectionIndex)),t.push(new W("u16",{padToWordSize:!0}).encode(e.subsectionsNumber)),t.push(new W("u16",{padToWordSize:!0}).encode(e.proofSetCount)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new xe(new te,e.proofSetCount).encode(e.proofSet)),t.push(new zr().encode(e.policies)),t.push(new xe(new Vr,e.inputsCount).encode(e.inputs)),t.push(new xe(new Jr,e.outputsCount).encode(e.outputs)),t.push(new xe(new Gr,e.witnessesCount).encode(e.witnesses)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let s=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let p=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let h=n;[n,r]=new xe(new te,c).decode(e,r);let _=n;[n,r]=new zr().decode(e,r,u);let I=n;[n,r]=new xe(new Vr,d).decode(e,r);let v=n;[n,r]=new xe(new Jr,p).decode(e,r);let b=n;return[n,r]=new xe(new Gr,h).decode(e,r),[{type:4,root:i,witnessIndex:a,subsectionIndex:s,subsectionsNumber:o,proofSetCount:c,policyTypes:u,inputsCount:d,outputsCount:p,witnessesCount:h,proofSet:_,policies:I,inputs:v,outputs:b,witnesses:n},r]}},dE=class extends ge{constructor(){super("TransactionBlob","struct TransactionBlob",0)}encode(e){let t=[];return t.push(new te().encode(e.blobId)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new zr().encode(e.policies)),t.push(new xe(new Vr,e.inputsCount).encode(e.inputs)),t.push(new xe(new Jr,e.outputsCount).encode(e.outputs)),t.push(new xe(new Gr,e.witnessesCount).encode(e.witnesses)),re(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let s=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new zr().decode(e,r,s);let d=n;[n,r]=new xe(new Vr,o).decode(e,r);let p=n;[n,r]=new xe(new Jr,c).decode(e,r);let h=n;return[n,r]=new xe(new Gr,u).decode(e,r),[{type:5,blobId:i,witnessIndex:a,policyTypes:s,inputsCount:o,outputsCount:c,witnessesCount:u,policies:d,inputs:p,outputs:h,witnesses:n},r]}},Sn=class extends ge{constructor(){super("Transaction","struct Transaction",0)}encode(e){let t=[];t.push(new W("u8",{padToWordSize:!0}).encode(e.type));let{type:n}=e;switch(e.type){case 0:{t.push(new sE().encode(e));break}case 1:{t.push(new oE().encode(e));break}case 2:{t.push(new cE().encode(e));break}case 3:{t.push(new uE().encode(e));break}case 4:{t.push(new lE().encode(e));break}case 5:{t.push(new dE().encode(e));break}default:throw new y(T.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${n}`)}return re(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;switch(i){case 0:return[n,r]=new sE().decode(e,r),[n,r];case 1:return[n,r]=new oE().decode(e,r),[n,r];case 2:return[n,r]=new cE().decode(e,r),[n,r];case 3:return[n,r]=new uE().decode(e,r),[n,r];case 4:return[n,r]=new lE().decode(e,r),[n,r];case 5:return[n,r]=new dE().decode(e,r),[n,r];default:throw new y(T.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${i}`)}}};var Nm={};gd(Nm,{aInRange:()=>ji,abool:()=>$a,abytes:()=>no,bitGet:()=>nM,bitLen:()=>xm,bitMask:()=>rl,bitSet:()=>rM,bytesToHex:()=>Ka,bytesToNumberBE:()=>bi,bytesToNumberLE:()=>Ld,concatBytes:()=>ro,createHmacDrbg:()=>Tm,ensureBytes:()=>xn,equalBytes:()=>Sm,hexToBytes:()=>es,hexToNumber:()=>Im,inRange:()=>nl,isBytes:()=>$i,memoized:()=>Qd,notImplemented:()=>aM,numberToBytesBE:()=>Ki,numberToBytesLE:()=>Ud,numberToHexUnpadded:()=>ja,numberToVarBytesBE:()=>eM,utf8ToBytes:()=>tM,validateObject:()=>ea});var Cm=BigInt(0),Fd=BigInt(1),KD=BigInt(2);function $i(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function no(e){if(!$i(e))throw new Error("Uint8Array expected")}function $a(e,t){if(typeof t!="boolean")throw new Error(`${e} must be valid boolean, got "${t}".`)}var jD=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ka(e){no(e);let t="";for(let n=0;n<e.length;n++)t+=jD[e[n]];return t}function ja(e){let t=e.toString(16);return t.length&1?`0${t}`:t}function Im(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}var yi={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function fE(e){if(e>=yi._0&&e<=yi._9)return e-yi._0;if(e>=yi._A&&e<=yi._F)return e-(yi._A-10);if(e>=yi._a&&e<=yi._f)return e-(yi._a-10)}function es(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,a=0;i<n;i++,a+=2){let s=fE(e.charCodeAt(a)),o=fE(e.charCodeAt(a+1));if(s===void 0||o===void 0){let c=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+a)}r[i]=s*16+o}return r}function bi(e){return Im(Ka(e))}function Ld(e){return no(e),Im(Ka(Uint8Array.from(e).reverse()))}function Ki(e,t){return es(e.toString(16).padStart(t*2,"0"))}function Ud(e,t){return Ki(e,t).reverse()}function eM(e){return es(ja(e))}function xn(e,t,n){let r;if(typeof t=="string")try{r=es(t)}catch(a){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${a}`)}else if($i(t))r=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);let i=r.length;if(typeof n=="number"&&i!==n)throw new Error(`${e} expected ${n} bytes, got ${i}`);return r}function ro(...e){let t=0;for(let r=0;r<e.length;r++){let i=e[r];no(i),t+=i.length}let n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){let a=e[r];n.set(a,i),i+=a.length}return n}function Sm(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function tM(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}var wm=e=>typeof e=="bigint"&&Cm<=e;function nl(e,t,n){return wm(e)&&wm(t)&&wm(n)&&t<=e&&e<n}function ji(e,t,n,r){if(!nl(t,n,r))throw new Error(`expected valid ${e}: ${n} <= n < ${r}, got ${typeof t} ${t}`)}function xm(e){let t;for(t=0;e>Cm;e>>=Fd,t+=1);return t}function nM(e,t){return e>>BigInt(t)&Fd}function rM(e,t,n){return e|(n?Fd:Cm)<<BigInt(t)}var rl=e=>(KD<<BigInt(e-1))-Fd,Em=e=>new Uint8Array(e),pE=e=>Uint8Array.from(e);function Tm(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Em(e),i=Em(e),a=0,s=()=>{r.fill(1),i.fill(0),a=0},o=(...p)=>n(i,r,...p),c=(p=Em())=>{i=o(pE([0]),p),r=o(),p.length!==0&&(i=o(pE([1]),p),r=o())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let p=0,h=[];for(;p<t;){r=o();let _=r.slice();h.push(_),p+=r.length}return ro(...h)};return(p,h)=>{s(),c(p);let _;for(;!(_=h(u()));)c();return s(),_}}var iM={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||$i(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function ea(e,t,n={}){let r=(i,a,s)=>{let o=iM[a];if(typeof o!="function")throw new Error(`Invalid validator "${a}", expected function`);let c=e[i];if(!(s&&c===void 0)&&!o(c,e))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${a}`)};for(let[i,a]of Object.entries(t))r(i,a,!1);for(let[i,a]of Object.entries(n))r(i,a,!0);return e}var aM=()=>{throw new Error("not implemented")};function Qd(e){let t=new WeakMap;return(n,...r)=>{let i=t.get(n);if(i!==void 0)return i;let a=e(n,...r);return t.set(n,a),a}}var lx=Cn(zm(),1);var sl=function(){return sl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},sl.apply(this,arguments)};var $d=new Map,Zm=new Map,mC=!0,Kd=!1;function gC(e){return e.replace(/[\s,]+/g," ").trim()}function PF(e){return gC(e.source.body.substring(e.start,e.end))}function DF(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,a=PF(r.loc),s=Zm.get(i);s&&!s.has(a)?mC&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
24
|
+
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
25
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Zm.set(i,s=new Set),s.add(a),t.has(a)||(t.add(a),n.push(r))}else n.push(r)}),sl(sl({},e),{definitions:n})}function MF(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var a=r[i];a&&typeof a=="object"&&t.add(a)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function FF(e){var t=gC(e);if(!$d.has(t)){var n=Hw(e,{experimentalFragmentVariables:Kd,allowLegacyFragmentVariables:Kd});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");$d.set(t,MF(DF(n)))}return $d.get(t)}function co(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,a){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[a+1]}),FF(r)}function LF(){$d.clear(),Zm.clear()}function UF(){mC=!1}function QF(){Kd=!0}function qF(){Kd=!1}var ol={gql:co,resetCaches:LF,disableFragmentWarnings:UF,enableExperimentalFragmentVariables:QF,disableExperimentalFragmentVariables:qF};(function(e){e.gql=ol.gql,e.resetCaches=ol.resetCaches,e.disableFragmentWarnings=ol.disableFragmentWarnings,e.enableExperimentalFragmentVariables=ol.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=ol.disableExperimentalFragmentVariables})(co||(co={}));co.default=co;var Y=co;var Ne="0x0000000000000000000000000000000000000000000000000000000000000000";var tee=1024*1024*1024,nee=1024*1024*1024;var ree=1024*1024,iee=1024*1024,_C="0xffffffffffff0000",jd="0xffffffffffff0001",AC="0xffffffffffff0003",yC="0xffffffffffff0004",bC="0xffffffffffff0005";var vC=["UnknownPanicReason","Revert","OutOfGas","TransactionValidity","MemoryOverflow","ArithmeticOverflow","ContractNotFound","MemoryOwnership","NotEnoughBalance","ExpectedInternalContext","AssetIdNotFound","InputNotFound","OutputNotFound","WitnessNotFound","TransactionMaturity","InvalidMetadataIdentifier","MalformedCallStructure","ReservedRegisterNotWritable","InvalidFlags","InvalidImmediateValue","ExpectedCoinInput","EcalError","MemoryWriteOverlap","ContractNotInInputs","InternalBalanceOverflow","ContractMaxSize","ExpectedUnallocatedStack","MaxStaticContractsReached","TransferAmountCannotBeZero","ExpectedOutputVariable","ExpectedParentInternalContext","PredicateReturnedNonOne","ContractIdAlreadyDeployed","ContractMismatch","MessageDataTooLong","ArithmeticError","ContractInstructionNotAllowed","TransferZeroCoins","InvalidInstruction","MemoryNotExecutable","PolicyIsNotSet","PolicyNotFound","TooManyReceipts","BalanceOverflow","InvalidBlockHeight","TooManySlots","ExpectedNestedCaller","MemoryGrowthOverlap","UninitalizedMemoryAccess","OverridingConsensusParameters","UnknownStateTransactionBytecodeRoot","OverridingStateTransactionBytecode","BytecodeAlreadyUploaded","ThePartIsNotSequentiallyConnected","BlobIdAlreadyUploaded","BlobNotFound","GasCostNotDefined"],wC="https://docs.rs/fuel-asm/latest/fuel_asm/enum.PanicReason.html";var tn=Cn(bo(),1);var bt=BigInt(0),ut=BigInt(1),ss=BigInt(2),m6=BigInt(3),eA=BigInt(4),RS=BigInt(5),kS=BigInt(8),g6=BigInt(9),_6=BigInt(16);function Ht(e,t){let n=e%t;return n>=bt?n:t+n}function A6(e,t,n){if(n<=bt||t<bt)throw new Error("Expected power/modulo > 0");if(n===ut)return bt;let r=ut;for(;t>bt;)t&ut&&(r=r*e%n),e=e*e%n,t>>=ut;return r}function Tn(e,t,n){let r=e;for(;t-- >bt;)r*=r,r%=n;return r}function ef(e,t){if(e===bt||t<=bt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Ht(e,t),r=t,i=bt,a=ut,s=ut,o=bt;for(;n!==bt;){let u=r/n,d=r%n,p=i-s*u,h=a-o*u;r=n,n=d,i=s,a=o,s=p,o=h}if(r!==ut)throw new Error("invert: does not exist");return Ht(i,t)}function y6(e){let t=(e-ut)/ss,n,r,i;for(n=e-ut,r=0;n%ss===bt;n/=ss,r++);for(i=ss;i<e&&A6(i,t,e)!==e-ut;i++);if(r===1){let s=(e+ut)/eA;return function(c,u){let d=c.pow(u,s);if(!c.eql(c.sqr(d),u))throw new Error("Cannot find square root");return d}}let a=(n+ut)/ss;return function(o,c){if(o.pow(c,t)===o.neg(o.ONE))throw new Error("Cannot find square root");let u=r,d=o.pow(o.mul(o.ONE,i),n),p=o.pow(c,a),h=o.pow(c,n);for(;!o.eql(h,o.ONE);){if(o.eql(h,o.ZERO))return o.ZERO;let _=1;for(let v=o.sqr(h);_<u&&!o.eql(v,o.ONE);_++)v=o.sqr(v);let I=o.pow(d,ut<<BigInt(u-_-1));d=o.sqr(I),p=o.mul(p,I),h=o.mul(h,d),u=_}return p}}function b6(e){if(e%eA===m6){let t=(e+ut)/eA;return function(r,i){let a=r.pow(i,t);if(!r.eql(r.sqr(a),i))throw new Error("Cannot find square root");return a}}if(e%kS===RS){let t=(e-RS)/kS;return function(r,i){let a=r.mul(i,ss),s=r.pow(a,t),o=r.mul(i,s),c=r.mul(r.mul(o,ss),s),u=r.mul(o,r.sub(c,r.ONE));if(!r.eql(r.sqr(u),i))throw new Error("Cannot find square root");return u}}return e%_6,y6(e)}var v6=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function tA(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=v6.reduce((r,i)=>(r[i]="function",r),t);return ea(e,n)}function w6(e,t,n){if(n<bt)throw new Error("Expected power > 0");if(n===bt)return e.ONE;if(n===ut)return t;let r=e.ONE,i=t;for(;n>bt;)n&ut&&(r=e.mul(r,i)),i=e.sqr(i),n>>=ut;return r}function E6(e,t){let n=new Array(t.length),r=t.reduce((a,s,o)=>e.is0(s)?a:(n[o]=a,e.mul(a,s)),e.ONE),i=e.inv(r);return t.reduceRight((a,s,o)=>e.is0(s)?a:(n[o]=e.mul(a,n[o]),e.mul(a,s)),i),n}function nA(e,t){let n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function tf(e,t,n=!1,r={}){if(e<=bt)throw new Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:a}=nA(e,t);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=b6(e),o=Object.freeze({ORDER:e,BITS:i,BYTES:a,MASK:rl(i),ZERO:bt,ONE:ut,create:c=>Ht(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return bt<=c&&c<e},is0:c=>c===bt,isOdd:c=>(c&ut)===ut,neg:c=>Ht(-c,e),eql:(c,u)=>c===u,sqr:c=>Ht(c*c,e),add:(c,u)=>Ht(c+u,e),sub:(c,u)=>Ht(c-u,e),mul:(c,u)=>Ht(c*u,e),pow:(c,u)=>w6(o,c,u),div:(c,u)=>Ht(c*ef(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>ef(c,e),sqrt:r.sqrt||(c=>s(o,c)),invertBatch:c=>E6(o,c),cmov:(c,u,d)=>d?u:c,toBytes:c=>n?Ud(c,a):Ki(c,a),fromBytes:c=>{if(c.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${c.length}`);return n?Ld(c):bi(c)}});return Object.freeze(o)}function BS(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function rA(e){let t=BS(e);return t+Math.ceil(t/2)}function OS(e,t,n=!1){let r=e.length,i=BS(t),a=rA(t);if(r<16||r<a||r>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${r}`);let s=n?bi(e):Ld(e),o=Ht(s,t-ut)+ut;return n?Ud(o,i):Ki(o,i)}var I6=BigInt(0),iA=BigInt(1),aA=new WeakMap,PS=new WeakMap;function DS(e,t){let n=(a,s)=>{let o=s.negate();return a?o:s},r=a=>{if(!Number.isSafeInteger(a)||a<=0||a>t)throw new Error(`Wrong window size=${a}, should be [1..${t}]`)},i=a=>{r(a);let s=Math.ceil(t/a)+1,o=2**(a-1);return{windows:s,windowSize:o}};return{constTimeNegate:n,unsafeLadder(a,s){let o=e.ZERO,c=a;for(;s>I6;)s&iA&&(o=o.add(c)),c=c.double(),s>>=iA;return o},precomputeWindow(a,s){let{windows:o,windowSize:c}=i(s),u=[],d=a,p=d;for(let h=0;h<o;h++){p=d,u.push(p);for(let _=1;_<c;_++)p=p.add(d),u.push(p);d=p.double()}return u},wNAF(a,s,o){let{windows:c,windowSize:u}=i(a),d=e.ZERO,p=e.BASE,h=BigInt(2**a-1),_=2**a,I=BigInt(a);for(let v=0;v<c;v++){let b=v*u,w=Number(o&h);o>>=I,w>u&&(w-=_,o+=iA);let x=b,R=b+Math.abs(w)-1,k=v%2!==0,q=w<0;w===0?p=p.add(n(k,s[x])):d=d.add(n(q,s[R]))}return{p:d,f:p}},wNAFCached(a,s,o){let c=PS.get(a)||1,u=aA.get(a);return u||(u=this.precomputeWindow(a,c),c!==1&&aA.set(a,o(u))),this.wNAF(c,u,s)},setWindowSize(a,s){r(s),PS.set(a,s),aA.delete(a)}}}function MS(e,t,n,r){if(!Array.isArray(n)||!Array.isArray(r)||r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");r.forEach((d,p)=>{if(!t.isValid(d))throw new Error(`wrong scalar at index ${p}`)}),n.forEach((d,p)=>{if(!(d instanceof e))throw new Error(`wrong point at index ${p}`)});let i=xm(BigInt(n.length)),a=i>12?i-3:i>4?i-2:i?2:1,s=(1<<a)-1,o=new Array(s+1).fill(e.ZERO),c=Math.floor((t.BITS-1)/a)*a,u=e.ZERO;for(let d=c;d>=0;d-=a){o.fill(e.ZERO);for(let h=0;h<r.length;h++){let _=r[h],I=Number(_>>BigInt(d)&BigInt(s));o[I]=o[I].add(n[h])}let p=e.ZERO;for(let h=o.length-1,_=e.ZERO;h>0;h--)_=_.add(o[h]),p=p.add(_);if(u=u.add(p),d!==0)for(let h=0;h<a;h++)u=u.double()}return u}function sA(e){return tA(e.Fp),ea(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...nA(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function FS(e){e.lowS!==void 0&&$a("lowS",e.lowS),e.prehash!==void 0&&$a("prehash",e.prehash)}function S6(e){let t=sA(e);ea(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}var{bytesToNumberBE:x6,hexToBytes:T6}=Nm,vi={Err:class extends Error{constructor(t=""){super(t)}},_tlv:{encode:(e,t)=>{let{Err:n}=vi;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");let r=t.length/2,i=ja(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");let a=r>127?ja(i.length/2|128):"";return`${ja(e)}${a}${i}${t}`},decode(e,t){let{Err:n}=vi,r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");let i=t[r++],a=!!(i&128),s=0;if(!a)s=i;else{let c=i&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");let u=t.subarray(r,r+c);if(u.length!==c)throw new n("tlv.decode: length bytes not complete");if(u[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(let d of u)s=s<<8|d;if(r+=c,s<128)throw new n("tlv.decode(long): not minimal encoding")}let o=t.subarray(r,r+s);if(o.length!==s)throw new n("tlv.decode: wrong value length");return{v:o,l:t.subarray(r+s)}}},_int:{encode(e){let{Err:t}=vi;if(e<wi)throw new t("integer: negative integers are not allowed");let n=ja(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected assertion");return n},decode(e){let{Err:t}=vi;if(e[0]&128)throw new t("Invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return x6(e)}},toSig(e){let{Err:t,_int:n,_tlv:r}=vi,i=typeof e=="string"?T6(e):e;no(i);let{v:a,l:s}=r.decode(48,i);if(s.length)throw new t("Invalid signature: left bytes after parsing");let{v:o,l:c}=r.decode(2,a),{v:u,l:d}=r.decode(2,c);if(d.length)throw new t("Invalid signature: left bytes after parsing");return{r:n.decode(o),s:n.decode(u)}},hexFromSig(e){let{_tlv:t,_int:n}=vi,r=`${t.encode(2,n.encode(e.r))}${t.encode(2,n.encode(e.s))}`;return t.encode(48,r)}},wi=BigInt(0),xt=BigInt(1),hee=BigInt(2),LS=BigInt(3),mee=BigInt(4);function N6(e){let t=S6(e),{Fp:n}=t,r=tf(t.n,t.nBitLength),i=t.toBytes||((v,b,w)=>{let x=b.toAffine();return ro(Uint8Array.from([4]),n.toBytes(x.x),n.toBytes(x.y))}),a=t.fromBytes||(v=>{let b=v.subarray(1),w=n.fromBytes(b.subarray(0,n.BYTES)),x=n.fromBytes(b.subarray(n.BYTES,2*n.BYTES));return{x:w,y:x}});function s(v){let{a:b,b:w}=t,x=n.sqr(v),R=n.mul(x,v);return n.add(n.add(R,n.mul(v,b)),w)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function o(v){return nl(v,xt,t.n)}function c(v){let{allowedPrivateKeyLengths:b,nByteLength:w,wrapPrivateKey:x,n:R}=t;if(b&&typeof v!="bigint"){if($i(v)&&(v=Ka(v)),typeof v!="string"||!b.includes(v.length))throw new Error("Invalid key");v=v.padStart(w*2,"0")}let k;try{k=typeof v=="bigint"?v:bi(xn("private key",v,w))}catch{throw new Error(`private key must be ${w} bytes, hex or bigint, not ${typeof v}`)}return x&&(k=Ht(k,R)),ji("private key",k,xt,R),k}function u(v){if(!(v instanceof h))throw new Error("ProjectivePoint expected")}let d=Qd((v,b)=>{let{px:w,py:x,pz:R}=v;if(n.eql(R,n.ONE))return{x:w,y:x};let k=v.is0();b==null&&(b=k?n.ONE:n.inv(R));let q=n.mul(w,b),U=n.mul(x,b),V=n.mul(R,b);if(k)return{x:n.ZERO,y:n.ZERO};if(!n.eql(V,n.ONE))throw new Error("invZ was invalid");return{x:q,y:U}}),p=Qd(v=>{if(v.is0()){if(t.allowInfinityPoint&&!n.is0(v.py))return;throw new Error("bad point: ZERO")}let{x:b,y:w}=v.toAffine();if(!n.isValid(b)||!n.isValid(w))throw new Error("bad point: x or y not FE");let x=n.sqr(w),R=s(b);if(!n.eql(x,R))throw new Error("bad point: equation left != right");if(!v.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class h{constructor(b,w,x){if(this.px=b,this.py=w,this.pz=x,b==null||!n.isValid(b))throw new Error("x required");if(w==null||!n.isValid(w))throw new Error("y required");if(x==null||!n.isValid(x))throw new Error("z required");Object.freeze(this)}static fromAffine(b){let{x:w,y:x}=b||{};if(!b||!n.isValid(w)||!n.isValid(x))throw new Error("invalid affine point");if(b instanceof h)throw new Error("projective point not allowed");let R=k=>n.eql(k,n.ZERO);return R(w)&&R(x)?h.ZERO:new h(w,x,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(b){let w=n.invertBatch(b.map(x=>x.pz));return b.map((x,R)=>x.toAffine(w[R])).map(h.fromAffine)}static fromHex(b){let w=h.fromAffine(a(xn("pointHex",b)));return w.assertValidity(),w}static fromPrivateKey(b){return h.BASE.multiply(c(b))}static msm(b,w){return MS(h,r,b,w)}_setWindowSize(b){I.setWindowSize(this,b)}assertValidity(){p(this)}hasEvenY(){let{y:b}=this.toAffine();if(n.isOdd)return!n.isOdd(b);throw new Error("Field doesn't support isOdd")}equals(b){u(b);let{px:w,py:x,pz:R}=this,{px:k,py:q,pz:U}=b,V=n.eql(n.mul(w,U),n.mul(k,R)),Z=n.eql(n.mul(x,U),n.mul(q,R));return V&&Z}negate(){return new h(this.px,n.neg(this.py),this.pz)}double(){let{a:b,b:w}=t,x=n.mul(w,LS),{px:R,py:k,pz:q}=this,U=n.ZERO,V=n.ZERO,Z=n.ZERO,X=n.mul(R,R),de=n.mul(k,k),O=n.mul(q,q),ie=n.mul(R,k);return ie=n.add(ie,ie),Z=n.mul(R,q),Z=n.add(Z,Z),U=n.mul(b,Z),V=n.mul(x,O),V=n.add(U,V),U=n.sub(de,V),V=n.add(de,V),V=n.mul(U,V),U=n.mul(ie,U),Z=n.mul(x,Z),O=n.mul(b,O),ie=n.sub(X,O),ie=n.mul(b,ie),ie=n.add(ie,Z),Z=n.add(X,X),X=n.add(Z,X),X=n.add(X,O),X=n.mul(X,ie),V=n.add(V,X),O=n.mul(k,q),O=n.add(O,O),X=n.mul(O,ie),U=n.sub(U,X),Z=n.mul(O,de),Z=n.add(Z,Z),Z=n.add(Z,Z),new h(U,V,Z)}add(b){u(b);let{px:w,py:x,pz:R}=this,{px:k,py:q,pz:U}=b,V=n.ZERO,Z=n.ZERO,X=n.ZERO,de=t.a,O=n.mul(t.b,LS),ie=n.mul(w,k),F=n.mul(x,q),g=n.mul(R,U),B=n.add(w,x),z=n.add(k,q);B=n.mul(B,z),z=n.add(ie,F),B=n.sub(B,z),z=n.add(w,R);let K=n.add(k,U);return z=n.mul(z,K),K=n.add(ie,g),z=n.sub(z,K),K=n.add(x,R),V=n.add(q,U),K=n.mul(K,V),V=n.add(F,g),K=n.sub(K,V),X=n.mul(de,z),V=n.mul(O,g),X=n.add(V,X),V=n.sub(F,X),X=n.add(F,X),Z=n.mul(V,X),F=n.add(ie,ie),F=n.add(F,ie),g=n.mul(de,g),z=n.mul(O,z),F=n.add(F,g),g=n.sub(ie,g),g=n.mul(de,g),z=n.add(z,g),ie=n.mul(F,z),Z=n.add(Z,ie),ie=n.mul(K,z),V=n.mul(B,V),V=n.sub(V,ie),ie=n.mul(B,F),X=n.mul(K,X),X=n.add(X,ie),new h(V,Z,X)}subtract(b){return this.add(b.negate())}is0(){return this.equals(h.ZERO)}wNAF(b){return I.wNAFCached(this,b,h.normalizeZ)}multiplyUnsafe(b){ji("scalar",b,wi,t.n);let w=h.ZERO;if(b===wi)return w;if(b===xt)return this;let{endo:x}=t;if(!x)return I.unsafeLadder(this,b);let{k1neg:R,k1:k,k2neg:q,k2:U}=x.splitScalar(b),V=w,Z=w,X=this;for(;k>wi||U>wi;)k&xt&&(V=V.add(X)),U&xt&&(Z=Z.add(X)),X=X.double(),k>>=xt,U>>=xt;return R&&(V=V.negate()),q&&(Z=Z.negate()),Z=new h(n.mul(Z.px,x.beta),Z.py,Z.pz),V.add(Z)}multiply(b){let{endo:w,n:x}=t;ji("scalar",b,xt,x);let R,k;if(w){let{k1neg:q,k1:U,k2neg:V,k2:Z}=w.splitScalar(b),{p:X,f:de}=this.wNAF(U),{p:O,f:ie}=this.wNAF(Z);X=I.constTimeNegate(q,X),O=I.constTimeNegate(V,O),O=new h(n.mul(O.px,w.beta),O.py,O.pz),R=X.add(O),k=de.add(ie)}else{let{p:q,f:U}=this.wNAF(b);R=q,k=U}return h.normalizeZ([R,k])[0]}multiplyAndAddUnsafe(b,w,x){let R=h.BASE,k=(U,V)=>V===wi||V===xt||!U.equals(R)?U.multiplyUnsafe(V):U.multiply(V),q=k(this,w).add(k(b,x));return q.is0()?void 0:q}toAffine(b){return d(this,b)}isTorsionFree(){let{h:b,isTorsionFree:w}=t;if(b===xt)return!0;if(w)return w(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:b,clearCofactor:w}=t;return b===xt?this:w?w(h,this):this.multiplyUnsafe(t.h)}toRawBytes(b=!0){return $a("isCompressed",b),this.assertValidity(),i(h,this,b)}toHex(b=!0){return $a("isCompressed",b),Ka(this.toRawBytes(b))}}h.BASE=new h(t.Gx,t.Gy,n.ONE),h.ZERO=new h(n.ZERO,n.ONE,n.ZERO);let _=t.nBitLength,I=DS(h,t.endo?Math.ceil(_/2):_);return{CURVE:t,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function R6(e){let t=sA(e);return ea(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function US(e){let t=R6(e),{Fp:n,n:r}=t,i=n.BYTES+1,a=2*n.BYTES+1;function s(g){return Ht(g,r)}function o(g){return ef(g,r)}let{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:p}=N6({...t,toBytes(g,B,z){let K=B.toAffine(),ne=n.toBytes(K.x),he=ro;return $a("isCompressed",z),z?he(Uint8Array.from([B.hasEvenY()?2:3]),ne):he(Uint8Array.from([4]),ne,n.toBytes(K.y))},fromBytes(g){let B=g.length,z=g[0],K=g.subarray(1);if(B===i&&(z===2||z===3)){let ne=bi(K);if(!nl(ne,xt,n.ORDER))throw new Error("Point is not on curve");let he=d(ne),pe;try{pe=n.sqrt(he)}catch(Be){let We=Be instanceof Error?": "+Be.message:"";throw new Error("Point is not on curve"+We)}let Ie=(pe&xt)===xt;return(z&1)===1!==Ie&&(pe=n.neg(pe)),{x:ne,y:pe}}else if(B===a&&z===4){let ne=n.fromBytes(K.subarray(0,n.BYTES)),he=n.fromBytes(K.subarray(n.BYTES,2*n.BYTES));return{x:ne,y:he}}else throw new Error(`Point of length ${B} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),h=g=>Ka(Ki(g,t.nByteLength));function _(g){let B=r>>xt;return g>B}function I(g){return _(g)?s(-g):g}let v=(g,B,z)=>bi(g.slice(B,z));class b{constructor(B,z,K){this.r=B,this.s=z,this.recovery=K,this.assertValidity()}static fromCompact(B){let z=t.nByteLength;return B=xn("compactSignature",B,z*2),new b(v(B,0,z),v(B,z,2*z))}static fromDER(B){let{r:z,s:K}=vi.toSig(xn("DER",B));return new b(z,K)}assertValidity(){ji("r",this.r,xt,r),ji("s",this.s,xt,r)}addRecoveryBit(B){return new b(this.r,this.s,B)}recoverPublicKey(B){let{r:z,s:K,recovery:ne}=this,he=U(xn("msgHash",B));if(ne==null||![0,1,2,3].includes(ne))throw new Error("recovery id invalid");let pe=ne===2||ne===3?z+t.n:z;if(pe>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");let Ie=ne&1?"03":"02",Fe=c.fromHex(Ie+h(pe)),Be=o(pe),We=s(-he*Be),Ze=s(K*Be),nt=c.BASE.multiplyAndAddUnsafe(Fe,We,Ze);if(!nt)throw new Error("point at infinify");return nt.assertValidity(),nt}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return es(this.toDERHex())}toDERHex(){return vi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return es(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}let w={isValidPrivateKey(g){try{return u(g),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let g=rA(t.n);return OS(t.randomBytes(g),t.n)},precompute(g=8,B=c.BASE){return B._setWindowSize(g),B.multiply(BigInt(3)),B}};function x(g,B=!0){return c.fromPrivateKey(g).toRawBytes(B)}function R(g){let B=$i(g),z=typeof g=="string",K=(B||z)&&g.length;return B?K===i||K===a:z?K===2*i||K===2*a:g instanceof c}function k(g,B,z=!0){if(R(g))throw new Error("first arg must be private key");if(!R(B))throw new Error("second arg must be public key");return c.fromHex(B).multiply(u(g)).toRawBytes(z)}let q=t.bits2int||function(g){let B=bi(g),z=g.length*8-t.nBitLength;return z>0?B>>BigInt(z):B},U=t.bits2int_modN||function(g){return s(q(g))},V=rl(t.nBitLength);function Z(g){return ji(`num < 2^${t.nBitLength}`,g,wi,V),Ki(g,t.nByteLength)}function X(g,B,z=de){if(["recovered","canonical"].some(rt=>rt in z))throw new Error("sign() legacy options not supported");let{hash:K,randomBytes:ne}=t,{lowS:he,prehash:pe,extraEntropy:Ie}=z;he==null&&(he=!0),g=xn("msgHash",g),FS(z),pe&&(g=xn("prehashed msgHash",K(g)));let Fe=U(g),Be=u(B),We=[Z(Be),Z(Fe)];if(Ie!=null&&Ie!==!1){let rt=Ie===!0?ne(n.BYTES):Ie;We.push(xn("extraEntropy",rt))}let Ze=ro(...We),nt=Fe;function Lr(rt){let Q=q(rt);if(!p(Q))return;let J=o(Q),H=c.BASE.multiply(Q).toAffine(),ae=s(H.x);if(ae===wi)return;let ee=s(J*s(nt+ae*Be));if(ee===wi)return;let Ae=(H.x===ae?0:2)|Number(H.y&xt),Ye=ee;return he&&_(ee)&&(Ye=I(ee),Ae^=1),new b(ae,Ye,Ae)}return{seed:Ze,k2sig:Lr}}let de={lowS:t.lowS,prehash:!1},O={lowS:t.lowS,prehash:!1};function ie(g,B,z=de){let{seed:K,k2sig:ne}=X(g,B,z),he=t;return Tm(he.hash.outputLen,he.nByteLength,he.hmac)(K,ne)}c.BASE._setWindowSize(8);function F(g,B,z,K=O){let ne=g;if(B=xn("msgHash",B),z=xn("publicKey",z),"strict"in K)throw new Error("options.strict was renamed to lowS");FS(K);let{lowS:he,prehash:pe}=K,Ie,Fe;try{if(typeof ne=="string"||$i(ne))try{Ie=b.fromDER(ne)}catch(H){if(!(H instanceof vi.Err))throw H;Ie=b.fromCompact(ne)}else if(typeof ne=="object"&&typeof ne.r=="bigint"&&typeof ne.s=="bigint"){let{r:H,s:ae}=ne;Ie=new b(H,ae)}else throw new Error("PARSE");Fe=c.fromHex(z)}catch(H){if(H.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(he&&Ie.hasHighS())return!1;pe&&(B=t.hash(B));let{r:Be,s:We}=Ie,Ze=U(B),nt=o(We),Lr=s(Ze*nt),rt=s(Be*nt),Q=c.BASE.multiplyAndAddUnsafe(Fe,Lr,rt)?.toAffine();return Q?s(Q.x)===Be:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:k,sign:ie,verify:F,ProjectivePoint:c,Signature:b,utils:w}}function k6(e){return{hash:e,hmac:(t,...n)=>$u(e,t,Zw(...n)),randomBytes:Xw}}function QS(e,t){let n=r=>US({...e,...k6(r)});return Object.freeze({...n(t),create:n})}var JS=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),qS=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),B6=BigInt(1),oA=BigInt(2),VS=(e,t)=>(e+t/oA)/t;function O6(e){let t=JS,n=BigInt(3),r=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),o=BigInt(44),c=BigInt(88),u=e*e*e%t,d=u*u*e%t,p=Tn(d,n,t)*d%t,h=Tn(p,n,t)*d%t,_=Tn(h,oA,t)*u%t,I=Tn(_,i,t)*_%t,v=Tn(I,a,t)*I%t,b=Tn(v,o,t)*v%t,w=Tn(b,c,t)*b%t,x=Tn(w,o,t)*v%t,R=Tn(x,n,t)*d%t,k=Tn(R,s,t)*I%t,q=Tn(k,r,t)*u%t,U=Tn(q,oA,t);if(!cA.eql(cA.sqr(U),e))throw new Error("Cannot find square root");return U}var cA=tf(JS,void 0,void 0,{sqrt:O6}),Ei=QS({a:BigInt(0),b:BigInt(7),Fp:cA,n:qS,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=qS,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-B6*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=n,s=BigInt("0x100000000000000000000000000000000"),o=VS(a*e,t),c=VS(-r*e,t),u=Ht(e-o*n-c*i,t),d=Ht(-o*r-c*a,t),p=u>s,h=d>s;if(p&&(u=t-u),h&&(d=t-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:u,k2neg:h,k2:d}}}},Qr),Cee=BigInt(0);var Iee=Ei.ProjectivePoint;import{EventEmitter as qQ}from"events";var P6="0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",D6=class{left;right;parent;hash;data;index;constructor(e,t,n,r,i,a=0){this.left=e,this.right=t,this.parent=n,this.hash=r,this.data=i,this.index=a}},zS=D6;function M6(e){return Gt("0x00".concat(e.slice(2)))}function F6(e,t){return Gt("0x01".concat(e.slice(2)).concat(t.slice(2)))}function dA(e){if(!e.length)return P6;let t=[];for(let a=0;a<e.length;a+=1){let s=M6(e[a]);t.push(new zS(-1,-1,-1,s,e[a]))}let n=t,r=t.length+1>>1,i=t.length&1;for(;;){let a=0;for(;a<r-i;a+=1){let s=a<<1,o=F6(n[s].hash,n[s+1].hash);t[a]=new zS(n[s].index,n[s+1].index,-1,o,"")}if(i===1&&(t[a]=n[a<<1]),r===1)break;i=r&1,r=r+1>>1,n=t}return t[0].hash}var L6="0x00",GS="0x01";function U6(e,t){let n="0x00".concat(e.slice(2)).concat(Gt(t).slice(2));return[Gt(n),n]}function vo(e,t){let n="0x01".concat(e.slice(2)).concat(t.slice(2));return[Gt(n),n]}function uA(e){let t=GS.length;return["0x".concat(e.slice(t,t+64)),"0x".concat(e.slice(t+64))]}function Q6(e){let t=GS.length;return["0x".concat(e.slice(t,t+64)),"0x".concat(e.slice(t+64))]}function lA(e){return e.slice(0,4)===L6}var q6=class{SideNodes;NonMembershipLeafData;BitMask;NumSideNodes;SiblingData;constructor(e,t,n,r,i){this.SideNodes=e,this.NonMembershipLeafData=t,this.BitMask=n,this.NumSideNodes=r,this.SiblingData=i}},V6=q6,J6=class{SideNodes;NonMembershipLeafData;SiblingData;constructor(e,t,n){this.SideNodes=e,this.NonMembershipLeafData=t,this.SiblingData=n}},z6=J6,Nn="0x0000000000000000000000000000000000000000000000000000000000000000",Ci=256;function wo(e,t){let n=e.slice(2),r="0x".concat(n.slice(Math.floor(t/8)*2,Math.floor(t/8)*2+2));return(Number(r)&1<<8-1-t%8)>0?1:0}function G6(e){let t=0,n=e.length-1,r=e;for(;t<n;)[r[t],r[n]]=[r[n],r[t]],t+=1,n-=1;return r}function H6(e,t){let n=0;for(let r=0;r<Ci&&wo(e,r)===wo(t,r);r+=1)n+=1;return n}function W6(e){let t=[],n=[],r;for(let a=0;a<e.SideNodes.length;a+=1)r=e.SideNodes[a],r===Nn?t.push(0):(n.push(r),t.push(1));return new V6(n,e.NonMembershipLeafData,t,e.SideNodes.length,e.SiblingData)}var HS=class{ms;root;constructor(){let e={};this.ms=e,this.root=Nn,this.ms[this.root]=Nn}get(e){return this.ms[e]}set(e,t){this.ms[e]=t}setRoot(e){this.root=e}sideNodesForRoot(e,t){let n=[];if(t===Nn)return[n,Nn,"",""];let r=this.get(t);if(lA(r))return[n,t,r,""];let i,a,s="",o="";for(let u=0;u<Ci;u+=1){if([i,a]=Q6(r),wo(e,u)===1?(o=i,s=a):(o=a,s=i),n.push(o),s===Nn){r="";break}if(r=this.get(s),lA(r))break}let c=this.get(o);return[G6(n),s,r,c]}deleteWithSideNodes(e,t,n,r){if(n===Nn)return this.root;let[i]=uA(r);if(i!==e)return this.root;let a="",s="",o="",c="",u=!1;for(let d=0;d<t.length;d+=1)if(t[d]!==""){if(o=t[d],s==="")if(c=this.get(o),lA(c)){a=o,s=o;continue}else s=Nn,u=!0;!u&&o===Nn||(u||(u=!0),wo(e,t.length-1-d)===1?[a,s]=vo(o,s):[a,s]=vo(s,o),this.set(a,s),s=a)}return a===""&&(a=Nn),a}updateWithSideNodes(e,t,n,r,i){let a,s;this.set(Gt(t),t),[a,s]=U6(e,t),this.set(a,s),s=a;let o;if(r===Nn)o=Ci;else{let[c]=uA(i);o=H6(e,c)}o!==Ci&&(wo(e,o)===1?[a,s]=vo(r,s):[a,s]=vo(s,r),this.set(a,s),s=a);for(let c=0;c<Ci;c+=1){let u,d=Ci-n.length;if(c-d<0||n[c-d]==="")if(o!==Ci&&o>Ci-1-c)u=Nn;else continue;else u=n[c-d];wo(e,Ci-1-c)===1?[a,s]=vo(u,s):[a,s]=vo(s,u),this.set(a,s),s=a}return a}update(e,t){let[n,r,i]=this.sideNodesForRoot(e,this.root),a=this.updateWithSideNodes(e,t,n,r,i);this.setRoot(a)}delete(e){let[t,n,r]=this.sideNodesForRoot(e,this.root),i=this.deleteWithSideNodes(e,t,n,r);this.setRoot(i)}prove(e){let[t,n,r,i]=this.sideNodesForRoot(e,this.root),a=[];for(let c=0;c<t.length;c+=1)t[c]!==""&&a.push(t[c]);let s="";if(n!==Nn){let[c]=uA(r);c!==e&&(s=r)}return new z6(a,s,i)}proveCompacted(e){let t=this.prove(e);return W6(t)}};import{EventEmitter as GQ}from"events";var Z6=Object.defineProperty,Y6=(e,t,n)=>t in e?Z6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$e=(e,t,n)=>(Y6(e,typeof t!="symbol"?t+"":t,n),n),SA=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},tt=(e,t,n)=>(SA(e,t,"read from private field"),n?n.call(e):t.get(e)),sa=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},fr=(e,t,n,r)=>(SA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),gA=(e,t,n)=>(SA(e,t,"access private method"),n),uf=e=>{let t,n,r;Array.isArray(e)?(n=e[0],t=e[1],r=e[2]??void 0):(n=e.amount,t=e.assetId,r=e.max??void 0);let i=C(n);return{assetId:M(t),amount:i.lt(1)?C(1):i,max:r?C(r):void 0}},X6=e=>{let{amount:t,assetId:n}=e,r=[...e.coinQuantities],i=r.findIndex(a=>a.assetId===n);return i!==-1?r[i].amount=r[i].amount.add(t):r.push({assetId:n,amount:t}),r},dx=Y`
|
|
26
|
+
fragment SubmittedStatusFragment on SubmittedStatus {
|
|
27
|
+
type: __typename
|
|
28
|
+
time
|
|
29
|
+
}
|
|
30
|
+
`,xA=Y`
|
|
31
|
+
fragment receiptFragment on Receipt {
|
|
32
|
+
id
|
|
33
|
+
pc
|
|
34
|
+
is
|
|
35
|
+
to
|
|
36
|
+
toAddress
|
|
37
|
+
amount
|
|
38
|
+
assetId
|
|
39
|
+
gas
|
|
40
|
+
param1
|
|
41
|
+
param2
|
|
42
|
+
val
|
|
43
|
+
ptr
|
|
44
|
+
digest
|
|
45
|
+
reason
|
|
46
|
+
ra
|
|
47
|
+
rb
|
|
48
|
+
rc
|
|
49
|
+
rd
|
|
50
|
+
len
|
|
51
|
+
receiptType
|
|
52
|
+
result
|
|
53
|
+
gasUsed
|
|
54
|
+
data
|
|
55
|
+
sender
|
|
56
|
+
recipient
|
|
57
|
+
nonce
|
|
58
|
+
contractId
|
|
59
|
+
subId
|
|
60
|
+
}
|
|
61
|
+
`,fx=Y`
|
|
62
|
+
fragment SuccessStatusFragment on SuccessStatus {
|
|
63
|
+
type: __typename
|
|
64
|
+
block {
|
|
65
|
+
id
|
|
66
|
+
}
|
|
67
|
+
time
|
|
68
|
+
programState {
|
|
69
|
+
returnType
|
|
70
|
+
data
|
|
71
|
+
}
|
|
72
|
+
receipts {
|
|
73
|
+
...receiptFragment
|
|
74
|
+
}
|
|
75
|
+
totalGas
|
|
76
|
+
totalFee
|
|
77
|
+
}
|
|
78
|
+
${xA}`,$6=Y`
|
|
79
|
+
fragment malleableTransactionFieldsFragment on Transaction {
|
|
80
|
+
receiptsRoot
|
|
81
|
+
inputs {
|
|
82
|
+
type: __typename
|
|
83
|
+
... on InputCoin {
|
|
84
|
+
txPointer
|
|
85
|
+
}
|
|
86
|
+
... on InputContract {
|
|
87
|
+
txPointer
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
outputs {
|
|
91
|
+
type: __typename
|
|
92
|
+
... on CoinOutput {
|
|
93
|
+
to
|
|
94
|
+
amount
|
|
95
|
+
assetId
|
|
96
|
+
}
|
|
97
|
+
... on ContractOutput {
|
|
98
|
+
inputIndex
|
|
99
|
+
balanceRoot
|
|
100
|
+
stateRoot
|
|
101
|
+
}
|
|
102
|
+
... on ChangeOutput {
|
|
103
|
+
to
|
|
104
|
+
amount
|
|
105
|
+
assetId
|
|
106
|
+
}
|
|
107
|
+
... on VariableOutput {
|
|
108
|
+
to
|
|
109
|
+
amount
|
|
110
|
+
assetId
|
|
111
|
+
}
|
|
112
|
+
... on ContractCreated {
|
|
113
|
+
contract
|
|
114
|
+
stateRoot
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`,px=Y`
|
|
119
|
+
fragment FailureStatusFragment on FailureStatus {
|
|
120
|
+
type: __typename
|
|
121
|
+
block {
|
|
122
|
+
id
|
|
123
|
+
}
|
|
124
|
+
totalGas
|
|
125
|
+
totalFee
|
|
126
|
+
time
|
|
127
|
+
reason
|
|
128
|
+
receipts {
|
|
129
|
+
...receiptFragment
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
${xA}`,hx=Y`
|
|
133
|
+
fragment SqueezedOutStatusFragment on SqueezedOutStatus {
|
|
134
|
+
type: __typename
|
|
135
|
+
reason
|
|
136
|
+
}
|
|
137
|
+
`,TA=Y`
|
|
138
|
+
fragment transactionStatusSubscriptionFragment on TransactionStatus {
|
|
139
|
+
... on SubmittedStatus {
|
|
140
|
+
...SubmittedStatusFragment
|
|
141
|
+
}
|
|
142
|
+
... on SuccessStatus {
|
|
143
|
+
...SuccessStatusFragment
|
|
144
|
+
transaction {
|
|
145
|
+
...malleableTransactionFieldsFragment
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
... on FailureStatus {
|
|
149
|
+
...FailureStatusFragment
|
|
150
|
+
transaction {
|
|
151
|
+
...malleableTransactionFieldsFragment
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
... on SqueezedOutStatus {
|
|
155
|
+
...SqueezedOutStatusFragment
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
${dx}
|
|
159
|
+
${fx}
|
|
160
|
+
${$6}
|
|
161
|
+
${px}
|
|
162
|
+
${hx}`,K6=Y`
|
|
163
|
+
fragment transactionStatusFragment on TransactionStatus {
|
|
164
|
+
... on SubmittedStatus {
|
|
165
|
+
...SubmittedStatusFragment
|
|
166
|
+
}
|
|
167
|
+
... on SuccessStatus {
|
|
168
|
+
...SuccessStatusFragment
|
|
169
|
+
}
|
|
170
|
+
... on FailureStatus {
|
|
171
|
+
...FailureStatusFragment
|
|
172
|
+
}
|
|
173
|
+
... on SqueezedOutStatus {
|
|
174
|
+
...SqueezedOutStatusFragment
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
${dx}
|
|
178
|
+
${fx}
|
|
179
|
+
${px}
|
|
180
|
+
${hx}`,lf=Y`
|
|
181
|
+
fragment transactionFragment on Transaction {
|
|
182
|
+
id
|
|
183
|
+
rawPayload
|
|
184
|
+
status {
|
|
185
|
+
...transactionStatusFragment
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
${K6}`,j6=Y`
|
|
189
|
+
fragment inputEstimatePredicatesFragment on Input {
|
|
190
|
+
... on InputCoin {
|
|
191
|
+
predicateGasUsed
|
|
192
|
+
}
|
|
193
|
+
... on InputMessage {
|
|
194
|
+
predicateGasUsed
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
`,eU=Y`
|
|
198
|
+
fragment transactionEstimatePredicatesFragment on Transaction {
|
|
199
|
+
inputs {
|
|
200
|
+
...inputEstimatePredicatesFragment
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
${j6}`,tU=Y`
|
|
204
|
+
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
|
205
|
+
type: __typename
|
|
206
|
+
totalGas
|
|
207
|
+
totalFee
|
|
208
|
+
reason
|
|
209
|
+
programState {
|
|
210
|
+
returnType
|
|
211
|
+
data
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
`,nU=Y`
|
|
215
|
+
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
|
216
|
+
type: __typename
|
|
217
|
+
totalGas
|
|
218
|
+
totalFee
|
|
219
|
+
programState {
|
|
220
|
+
returnType
|
|
221
|
+
data
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
`,rU=Y`
|
|
225
|
+
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
|
226
|
+
... on DryRunFailureStatus {
|
|
227
|
+
...dryRunFailureStatusFragment
|
|
228
|
+
}
|
|
229
|
+
... on DryRunSuccessStatus {
|
|
230
|
+
...dryRunSuccessStatusFragment
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
${tU}
|
|
234
|
+
${nU}`,iU=Y`
|
|
235
|
+
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
|
236
|
+
id
|
|
237
|
+
status {
|
|
238
|
+
...dryRunTransactionStatusFragment
|
|
239
|
+
}
|
|
240
|
+
receipts {
|
|
241
|
+
...receiptFragment
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
${rU}
|
|
245
|
+
${xA}`,df=Y`
|
|
246
|
+
fragment blockFragment on Block {
|
|
247
|
+
id
|
|
248
|
+
height
|
|
249
|
+
header {
|
|
250
|
+
time
|
|
251
|
+
daHeight
|
|
252
|
+
stateTransitionBytecodeVersion
|
|
253
|
+
transactionsCount
|
|
254
|
+
transactionsRoot
|
|
255
|
+
messageOutboxRoot
|
|
256
|
+
eventInboxRoot
|
|
257
|
+
prevRoot
|
|
258
|
+
applicationHash
|
|
259
|
+
}
|
|
260
|
+
transactions {
|
|
261
|
+
id
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
`,NA=Y`
|
|
265
|
+
fragment coinFragment on Coin {
|
|
266
|
+
type: __typename
|
|
267
|
+
utxoId
|
|
268
|
+
owner
|
|
269
|
+
amount
|
|
270
|
+
assetId
|
|
271
|
+
blockCreated
|
|
272
|
+
txCreatedIdx
|
|
273
|
+
}
|
|
274
|
+
`,aU=Y`
|
|
275
|
+
fragment messageCoinFragment on MessageCoin {
|
|
276
|
+
type: __typename
|
|
277
|
+
sender
|
|
278
|
+
recipient
|
|
279
|
+
nonce
|
|
280
|
+
amount
|
|
281
|
+
assetId
|
|
282
|
+
daHeight
|
|
283
|
+
}
|
|
284
|
+
`,mx=Y`
|
|
285
|
+
fragment messageFragment on Message {
|
|
286
|
+
amount
|
|
287
|
+
sender
|
|
288
|
+
recipient
|
|
289
|
+
data
|
|
290
|
+
nonce
|
|
291
|
+
daHeight
|
|
292
|
+
}
|
|
293
|
+
`,sU=Y`
|
|
294
|
+
fragment messageProofFragment on MessageProof {
|
|
295
|
+
messageProof {
|
|
296
|
+
proofSet
|
|
297
|
+
proofIndex
|
|
298
|
+
}
|
|
299
|
+
blockProof {
|
|
300
|
+
proofSet
|
|
301
|
+
proofIndex
|
|
302
|
+
}
|
|
303
|
+
messageBlockHeader {
|
|
304
|
+
version
|
|
305
|
+
id
|
|
306
|
+
daHeight
|
|
307
|
+
consensusParametersVersion
|
|
308
|
+
stateTransitionBytecodeVersion
|
|
309
|
+
transactionsCount
|
|
310
|
+
messageReceiptCount
|
|
311
|
+
transactionsRoot
|
|
312
|
+
messageOutboxRoot
|
|
313
|
+
eventInboxRoot
|
|
314
|
+
height
|
|
315
|
+
prevRoot
|
|
316
|
+
time
|
|
317
|
+
applicationHash
|
|
318
|
+
}
|
|
319
|
+
commitBlockHeader {
|
|
320
|
+
version
|
|
321
|
+
id
|
|
322
|
+
daHeight
|
|
323
|
+
consensusParametersVersion
|
|
324
|
+
stateTransitionBytecodeVersion
|
|
325
|
+
transactionsCount
|
|
326
|
+
messageReceiptCount
|
|
327
|
+
transactionsRoot
|
|
328
|
+
messageOutboxRoot
|
|
329
|
+
eventInboxRoot
|
|
330
|
+
height
|
|
331
|
+
prevRoot
|
|
332
|
+
time
|
|
333
|
+
applicationHash
|
|
334
|
+
}
|
|
335
|
+
sender
|
|
336
|
+
recipient
|
|
337
|
+
nonce
|
|
338
|
+
amount
|
|
339
|
+
data
|
|
340
|
+
}
|
|
341
|
+
`,oU=Y`
|
|
342
|
+
fragment TxParametersFragment on TxParameters {
|
|
343
|
+
version
|
|
344
|
+
maxInputs
|
|
345
|
+
maxOutputs
|
|
346
|
+
maxWitnesses
|
|
347
|
+
maxGasPerTx
|
|
348
|
+
maxSize
|
|
349
|
+
maxBytecodeSubsections
|
|
350
|
+
}
|
|
351
|
+
`,cU=Y`
|
|
352
|
+
fragment PredicateParametersFragment on PredicateParameters {
|
|
353
|
+
version
|
|
354
|
+
maxPredicateLength
|
|
355
|
+
maxPredicateDataLength
|
|
356
|
+
maxGasPerPredicate
|
|
357
|
+
maxMessageDataLength
|
|
358
|
+
}
|
|
359
|
+
`,uU=Y`
|
|
360
|
+
fragment ScriptParametersFragment on ScriptParameters {
|
|
361
|
+
version
|
|
362
|
+
maxScriptLength
|
|
363
|
+
maxScriptDataLength
|
|
364
|
+
}
|
|
365
|
+
`,lU=Y`
|
|
366
|
+
fragment ContractParametersFragment on ContractParameters {
|
|
367
|
+
version
|
|
368
|
+
contractMaxSize
|
|
369
|
+
maxStorageSlots
|
|
370
|
+
}
|
|
371
|
+
`,dU=Y`
|
|
372
|
+
fragment FeeParametersFragment on FeeParameters {
|
|
373
|
+
version
|
|
374
|
+
gasPriceFactor
|
|
375
|
+
gasPerByte
|
|
376
|
+
}
|
|
377
|
+
`,fU=Y`
|
|
378
|
+
fragment DependentCostFragment on DependentCost {
|
|
379
|
+
... on LightOperation {
|
|
380
|
+
type: __typename
|
|
381
|
+
base
|
|
382
|
+
unitsPerGas
|
|
383
|
+
}
|
|
384
|
+
... on HeavyOperation {
|
|
385
|
+
type: __typename
|
|
386
|
+
base
|
|
387
|
+
gasPerUnit
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
`,pU=Y`
|
|
391
|
+
fragment GasCostsFragment on GasCosts {
|
|
392
|
+
contractRoot {
|
|
393
|
+
...DependentCostFragment
|
|
394
|
+
}
|
|
395
|
+
stateRoot {
|
|
396
|
+
...DependentCostFragment
|
|
397
|
+
}
|
|
398
|
+
vmInitialization {
|
|
399
|
+
...DependentCostFragment
|
|
400
|
+
}
|
|
401
|
+
s256 {
|
|
402
|
+
...DependentCostFragment
|
|
403
|
+
}
|
|
404
|
+
ecr1
|
|
405
|
+
newStoragePerByte
|
|
406
|
+
}
|
|
407
|
+
${fU}`,hU=Y`
|
|
408
|
+
fragment consensusParametersFragment on ConsensusParameters {
|
|
409
|
+
version
|
|
410
|
+
txParams {
|
|
411
|
+
...TxParametersFragment
|
|
412
|
+
}
|
|
413
|
+
predicateParams {
|
|
414
|
+
...PredicateParametersFragment
|
|
415
|
+
}
|
|
416
|
+
scriptParams {
|
|
417
|
+
...ScriptParametersFragment
|
|
418
|
+
}
|
|
419
|
+
contractParams {
|
|
420
|
+
...ContractParametersFragment
|
|
421
|
+
}
|
|
422
|
+
feeParams {
|
|
423
|
+
...FeeParametersFragment
|
|
424
|
+
}
|
|
425
|
+
gasCosts {
|
|
426
|
+
...GasCostsFragment
|
|
427
|
+
}
|
|
428
|
+
baseAssetId
|
|
429
|
+
chainId
|
|
430
|
+
}
|
|
431
|
+
${oU}
|
|
432
|
+
${cU}
|
|
433
|
+
${uU}
|
|
434
|
+
${lU}
|
|
435
|
+
${dU}
|
|
436
|
+
${pU}`,gx=Y`
|
|
437
|
+
fragment chainInfoFragment on ChainInfo {
|
|
438
|
+
name
|
|
439
|
+
daHeight
|
|
440
|
+
consensusParameters {
|
|
441
|
+
...consensusParametersFragment
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
${hU}`,mU=Y`
|
|
445
|
+
fragment contractBalanceFragment on ContractBalance {
|
|
446
|
+
contract
|
|
447
|
+
amount
|
|
448
|
+
assetId
|
|
449
|
+
}
|
|
450
|
+
`,So=Y`
|
|
451
|
+
fragment pageInfoFragment on PageInfo {
|
|
452
|
+
hasPreviousPage
|
|
453
|
+
hasNextPage
|
|
454
|
+
startCursor
|
|
455
|
+
endCursor
|
|
456
|
+
}
|
|
457
|
+
`,_x=Y`
|
|
458
|
+
fragment nodeInfoFragment on NodeInfo {
|
|
459
|
+
utxoValidation
|
|
460
|
+
vmBacktrace
|
|
461
|
+
maxTx
|
|
462
|
+
maxDepth
|
|
463
|
+
nodeVersion
|
|
464
|
+
}
|
|
465
|
+
`,gU=Y`
|
|
466
|
+
fragment relayedTransactionStatusFragment on RelayedTransactionStatus {
|
|
467
|
+
... on RelayedTransactionFailed {
|
|
468
|
+
blockHeight
|
|
469
|
+
failure
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
`,_U=Y`
|
|
473
|
+
fragment transactionRawPayload on Transaction {
|
|
474
|
+
id
|
|
475
|
+
rawPayload
|
|
476
|
+
}
|
|
477
|
+
`,AU=Y`
|
|
478
|
+
query getVersion {
|
|
479
|
+
nodeInfo {
|
|
480
|
+
nodeVersion
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
`,yU=Y`
|
|
484
|
+
query getNodeInfo {
|
|
485
|
+
nodeInfo {
|
|
486
|
+
...nodeInfoFragment
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
${_x}`,bU=Y`
|
|
490
|
+
query getChain {
|
|
491
|
+
chain {
|
|
492
|
+
...chainInfoFragment
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
${gx}`,vU=Y`
|
|
496
|
+
query getChainAndNodeInfo {
|
|
497
|
+
chain {
|
|
498
|
+
...chainInfoFragment
|
|
499
|
+
}
|
|
500
|
+
nodeInfo {
|
|
501
|
+
...nodeInfoFragment
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
${gx}
|
|
505
|
+
${_x}`,wU=Y`
|
|
506
|
+
query getTransaction($transactionId: TransactionId!) {
|
|
507
|
+
transaction(id: $transactionId) {
|
|
508
|
+
...transactionFragment
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
${lf}`,EU=Y`
|
|
512
|
+
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
|
513
|
+
transaction(id: $transactionId) {
|
|
514
|
+
...transactionFragment
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
${lf}`,CU=Y`
|
|
518
|
+
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
|
519
|
+
transactions(after: $after, before: $before, first: $first, last: $last) {
|
|
520
|
+
edges {
|
|
521
|
+
node {
|
|
522
|
+
...transactionFragment
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
pageInfo {
|
|
526
|
+
...pageInfoFragment
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
${lf}
|
|
531
|
+
${So}`,IU=Y`
|
|
532
|
+
query getTransactionsByOwner($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
|
533
|
+
transactionsByOwner(
|
|
534
|
+
owner: $owner
|
|
535
|
+
after: $after
|
|
536
|
+
before: $before
|
|
537
|
+
first: $first
|
|
538
|
+
last: $last
|
|
539
|
+
) {
|
|
540
|
+
pageInfo {
|
|
541
|
+
...pageInfoFragment
|
|
542
|
+
}
|
|
543
|
+
edges {
|
|
544
|
+
node {
|
|
545
|
+
...transactionFragment
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
${So}
|
|
551
|
+
${lf}`,SU=Y`
|
|
552
|
+
query estimatePredicates($encodedTransaction: HexString!) {
|
|
553
|
+
estimatePredicates(tx: $encodedTransaction) {
|
|
554
|
+
...transactionEstimatePredicatesFragment
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
${eU}`,xU=Y`
|
|
558
|
+
query getLatestBlock {
|
|
559
|
+
chain {
|
|
560
|
+
latestBlock {
|
|
561
|
+
...blockFragment
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
${df}`,TU=Y`
|
|
566
|
+
query getLatestBlockHeight {
|
|
567
|
+
chain {
|
|
568
|
+
latestBlock {
|
|
569
|
+
height
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
`,NU=Y`
|
|
574
|
+
query getBlock($blockId: BlockId, $height: U32) {
|
|
575
|
+
block(id: $blockId, height: $height) {
|
|
576
|
+
...blockFragment
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
${df}`,RU=Y`
|
|
580
|
+
query getBlockWithTransactions($blockId: BlockId, $blockHeight: U32) {
|
|
581
|
+
block(id: $blockId, height: $blockHeight) {
|
|
582
|
+
...blockFragment
|
|
583
|
+
transactions {
|
|
584
|
+
...transactionRawPayload
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
${df}
|
|
589
|
+
${_U}`,kU=Y`
|
|
590
|
+
query getBlocks($after: String, $before: String, $first: Int, $last: Int) {
|
|
591
|
+
blocks(after: $after, before: $before, first: $first, last: $last) {
|
|
592
|
+
pageInfo {
|
|
593
|
+
...pageInfoFragment
|
|
594
|
+
}
|
|
595
|
+
edges {
|
|
596
|
+
node {
|
|
597
|
+
...blockFragment
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
${So}
|
|
603
|
+
${df}`,BU=Y`
|
|
604
|
+
query getCoin($coinId: UtxoId!) {
|
|
605
|
+
coin(utxoId: $coinId) {
|
|
606
|
+
...coinFragment
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
${NA}`,OU=Y`
|
|
610
|
+
query getCoins($filter: CoinFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
|
611
|
+
coins(
|
|
612
|
+
filter: $filter
|
|
613
|
+
after: $after
|
|
614
|
+
before: $before
|
|
615
|
+
first: $first
|
|
616
|
+
last: $last
|
|
617
|
+
) {
|
|
618
|
+
pageInfo {
|
|
619
|
+
...pageInfoFragment
|
|
620
|
+
}
|
|
621
|
+
edges {
|
|
622
|
+
node {
|
|
623
|
+
...coinFragment
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
${So}
|
|
629
|
+
${NA}`,PU=Y`
|
|
630
|
+
query getCoinsToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {
|
|
631
|
+
coinsToSpend(
|
|
632
|
+
owner: $owner
|
|
633
|
+
queryPerAsset: $queryPerAsset
|
|
634
|
+
excludedIds: $excludedIds
|
|
635
|
+
) {
|
|
636
|
+
...coinFragment
|
|
637
|
+
...messageCoinFragment
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
${NA}
|
|
641
|
+
${aU}`,DU=Y`
|
|
642
|
+
query getContract($contractId: ContractId!) {
|
|
643
|
+
contract(id: $contractId) {
|
|
644
|
+
bytecode
|
|
645
|
+
id
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
`,MU=Y`
|
|
649
|
+
query getContractBalance($contract: ContractId!, $asset: AssetId!) {
|
|
650
|
+
contractBalance(contract: $contract, asset: $asset) {
|
|
651
|
+
...contractBalanceFragment
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
${mU}`,FU=Y`
|
|
655
|
+
query getBalance($owner: Address!, $assetId: AssetId!) {
|
|
656
|
+
balance(owner: $owner, assetId: $assetId) {
|
|
657
|
+
amount
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
`,LU=Y`
|
|
661
|
+
query getLatestGasPrice {
|
|
662
|
+
latestGasPrice {
|
|
663
|
+
gasPrice
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
`,UU=Y`
|
|
667
|
+
query estimateGasPrice($blockHorizon: U32!) {
|
|
668
|
+
estimateGasPrice(blockHorizon: $blockHorizon) {
|
|
669
|
+
gasPrice
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
`,QU=Y`
|
|
673
|
+
query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
|
674
|
+
balances(
|
|
675
|
+
filter: $filter
|
|
676
|
+
after: $after
|
|
677
|
+
before: $before
|
|
678
|
+
first: $first
|
|
679
|
+
last: $last
|
|
680
|
+
) {
|
|
681
|
+
pageInfo {
|
|
682
|
+
...pageInfoFragment
|
|
683
|
+
}
|
|
684
|
+
edges {
|
|
685
|
+
node {
|
|
686
|
+
assetId
|
|
687
|
+
amount
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
${So}`,qU=Y`
|
|
693
|
+
query getMessages($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
|
694
|
+
messages(
|
|
695
|
+
owner: $owner
|
|
696
|
+
after: $after
|
|
697
|
+
before: $before
|
|
698
|
+
first: $first
|
|
699
|
+
last: $last
|
|
700
|
+
) {
|
|
701
|
+
pageInfo {
|
|
702
|
+
...pageInfoFragment
|
|
703
|
+
}
|
|
704
|
+
edges {
|
|
705
|
+
node {
|
|
706
|
+
...messageFragment
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
${So}
|
|
712
|
+
${mx}`,VU=Y`
|
|
713
|
+
query getMessageProof($transactionId: TransactionId!, $nonce: Nonce!, $commitBlockId: BlockId, $commitBlockHeight: U32) {
|
|
714
|
+
messageProof(
|
|
715
|
+
transactionId: $transactionId
|
|
716
|
+
nonce: $nonce
|
|
717
|
+
commitBlockId: $commitBlockId
|
|
718
|
+
commitBlockHeight: $commitBlockHeight
|
|
719
|
+
) {
|
|
720
|
+
...messageProofFragment
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
${sU}`,JU=Y`
|
|
724
|
+
query getMessageStatus($nonce: Nonce!) {
|
|
725
|
+
messageStatus(nonce: $nonce) {
|
|
726
|
+
state
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
`,zU=Y`
|
|
730
|
+
query getRelayedTransactionStatus($relayedTransactionId: RelayedTransactionId!) {
|
|
731
|
+
relayedTransactionStatus(id: $relayedTransactionId) {
|
|
732
|
+
...relayedTransactionStatusFragment
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
${gU}`,GU=Y`
|
|
736
|
+
mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean, $gasPrice: U64) {
|
|
737
|
+
dryRun(
|
|
738
|
+
txs: $encodedTransactions
|
|
739
|
+
utxoValidation: $utxoValidation
|
|
740
|
+
gasPrice: $gasPrice
|
|
741
|
+
) {
|
|
742
|
+
...dryRunTransactionExecutionStatusFragment
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
${iU}`,HU=Y`
|
|
746
|
+
mutation submit($encodedTransaction: HexString!) {
|
|
747
|
+
submit(tx: $encodedTransaction) {
|
|
748
|
+
id
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
`,WU=Y`
|
|
752
|
+
mutation produceBlocks($startTimestamp: Tai64Timestamp, $blocksToProduce: U32!) {
|
|
753
|
+
produceBlocks(
|
|
754
|
+
blocksToProduce: $blocksToProduce
|
|
755
|
+
startTimestamp: $startTimestamp
|
|
756
|
+
)
|
|
757
|
+
}
|
|
758
|
+
`,ZU=Y`
|
|
759
|
+
query getMessageByNonce($nonce: Nonce!) {
|
|
760
|
+
message(nonce: $nonce) {
|
|
761
|
+
...messageFragment
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
${mx}`,YU=Y`
|
|
765
|
+
query isUserAccount($blobId: BlobId!, $contractId: ContractId!, $transactionId: TransactionId!) {
|
|
766
|
+
blob(id: $blobId) {
|
|
767
|
+
id
|
|
768
|
+
}
|
|
769
|
+
contract(id: $contractId) {
|
|
770
|
+
id
|
|
771
|
+
}
|
|
772
|
+
transaction(id: $transactionId) {
|
|
773
|
+
id
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
`,XU=Y`
|
|
777
|
+
query getConsensusParametersVersion {
|
|
778
|
+
chain {
|
|
779
|
+
latestBlock {
|
|
780
|
+
header {
|
|
781
|
+
consensusParametersVersion
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
`,$U=Y`
|
|
787
|
+
subscription submitAndAwait($encodedTransaction: HexString!) {
|
|
788
|
+
submitAndAwait(tx: $encodedTransaction) {
|
|
789
|
+
...transactionStatusSubscriptionFragment
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
${TA}`,KU=Y`
|
|
793
|
+
subscription submitAndAwaitStatus($encodedTransaction: HexString!) {
|
|
794
|
+
submitAndAwaitStatus(tx: $encodedTransaction) {
|
|
795
|
+
...transactionStatusSubscriptionFragment
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
${TA}`,jU=Y`
|
|
799
|
+
subscription statusChange($transactionId: TransactionId!) {
|
|
800
|
+
statusChange(id: $transactionId) {
|
|
801
|
+
...transactionStatusSubscriptionFragment
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
${TA}`;function e8(e){return{getVersion(t,n){return e(AU,t,n)},getNodeInfo(t,n){return e(yU,t,n)},getChain(t,n){return e(bU,t,n)},getChainAndNodeInfo(t,n){return e(vU,t,n)},getTransaction(t,n){return e(wU,t,n)},getTransactionWithReceipts(t,n){return e(EU,t,n)},getTransactions(t,n){return e(CU,t,n)},getTransactionsByOwner(t,n){return e(IU,t,n)},estimatePredicates(t,n){return e(SU,t,n)},getLatestBlock(t,n){return e(xU,t,n)},getLatestBlockHeight(t,n){return e(TU,t,n)},getBlock(t,n){return e(NU,t,n)},getBlockWithTransactions(t,n){return e(RU,t,n)},getBlocks(t,n){return e(kU,t,n)},getCoin(t,n){return e(BU,t,n)},getCoins(t,n){return e(OU,t,n)},getCoinsToSpend(t,n){return e(PU,t,n)},getContract(t,n){return e(DU,t,n)},getContractBalance(t,n){return e(MU,t,n)},getBalance(t,n){return e(FU,t,n)},getLatestGasPrice(t,n){return e(LU,t,n)},estimateGasPrice(t,n){return e(UU,t,n)},getBalances(t,n){return e(QU,t,n)},getMessages(t,n){return e(qU,t,n)},getMessageProof(t,n){return e(VU,t,n)},getMessageStatus(t,n){return e(JU,t,n)},getRelayedTransactionStatus(t,n){return e(zU,t,n)},dryRun(t,n){return e(GU,t,n)},submit(t,n){return e(HU,t,n)},produceBlocks(t,n){return e(WU,t,n)},getMessageByNonce(t,n){return e(ZU,t,n)},isUserAccount(t,n){return e(YU,t,n)},getConsensusParametersVersion(t,n){return e(XU,t,n)},submitAndAwait(t,n){return e($U,t,n)},submitAndAwaitStatus(t,n){return e(KU,t,n)},statusChange(t,n){return e(jU,t,n)}}}var af=class{constructor(e){this.stream=e}static async create(e){let{url:t,query:n,variables:r,fetchFn:i}=e,a=await i(`${t}-sub`,{method:"POST",body:JSON.stringify({query:Ww(n),variables:r}),headers:{"Content-Type":"application/json",Accept:"text/event-stream"}}),[s,o]=a.body.tee().map(c=>c.getReader());return await new af(s).next(),new af(o)}events=[];parsingLeftover="";async next(){for(;;){if(this.events.length>0){let{data:s,errors:o}=this.events.shift();if(Array.isArray(o))throw new y(y.CODES.INVALID_REQUEST,o.map(c=>c.message).join(`
|
|
805
|
+
|
|
806
|
+
`));return{value:s,done:!1}}let{value:e,done:t}=await this.stream.read();if(t)return{value:e,done:t};let n=af.textDecoder.decode(e).replace(`:keep-alive-text
|
|
807
|
+
|
|
808
|
+
`,"");if(n==="")continue;let r=`${this.parsingLeftover}${n}`,i=/data:.*\n\n/g,a=[...r.matchAll(i)].flatMap(s=>s);a.forEach(s=>{try{this.events.push(JSON.parse(s.replace(/^data:/,"")))}catch{throw new y(T.STREAM_PARSING_ERROR,`Error while parsing stream data response: ${r}`)}}),this.parsingLeftover=r.replace(a.join(),"")}}return(){return Promise.resolve({done:!0,value:void 0})}[Symbol.asyncIterator](){return this}},Ax=af;$e(Ax,"textDecoder",new TextDecoder);var ra=new Map,WS=class{ttl;constructor(e){if(this.ttl=e,typeof e!="number"||this.ttl<=0)throw new y(T.INVALID_TTL,`Invalid TTL: ${this.ttl}. Use a value greater than zero.`)}set(e,t){let n=Date.now(),r=ra.get(e)||{utxos:new Set,messages:new Set,timestamp:n};t.utxos.forEach(i=>r.utxos.add(M(i))),t.messages.forEach(i=>r.messages.add(M(i))),ra.set(e,r)}unset(e){ra.delete(e)}getActiveData(){let e={utxos:[],messages:[]},t=Date.now();return ra.forEach((n,r)=>{t-n.timestamp<this.ttl?(e.utxos.push(...n.utxos),e.messages.push(...n.messages)):ra.delete(r)}),e}isCached(e){let t=Date.now();for(let[n,r]of ra.entries())if(t-r.timestamp>this.ttl)ra.delete(n);else if(r.utxos.has(e)||r.messages.has(e))return!0;return!1}clear(){ra.clear()}},t8=e=>{let{type:t}=e;switch(e.type){case be.Coin:{let n=D(e.predicate??"0x"),r=D(e.predicateData??"0x");return{type:be.Coin,txID:M(D(e.id).slice(0,lr)),outputIndex:Ln(D(e.id).slice(lr,Ya)),owner:M(e.owner),amount:C(e.amount),assetId:M(e.assetId),txPointer:{blockHeight:Ln(D(e.txPointer).slice(0,8)),txIndex:Ln(D(e.txPointer).slice(8,16))},witnessIndex:e.witnessIndex,predicateGasUsed:C(e.predicateGasUsed),predicateLength:C(n.length),predicateDataLength:C(r.length),predicate:M(n),predicateData:M(r)}}case be.Contract:return{type:be.Contract,txID:Ne,outputIndex:0,balanceRoot:Ne,stateRoot:Ne,txPointer:{blockHeight:Ln(D(e.txPointer).slice(0,8)),txIndex:Ln(D(e.txPointer).slice(8,16))},contractID:M(e.contractId)};case be.Message:{let n=D(e.predicate??"0x"),r=D(e.predicateData??"0x"),i=D(e.data??"0x");return{type:be.Message,sender:M(e.sender),recipient:M(e.recipient),amount:C(e.amount),nonce:M(e.nonce),witnessIndex:e.witnessIndex,predicateGasUsed:C(e.predicateGasUsed),predicateLength:C(n.length),predicateDataLength:C(r.length),predicate:M(n),predicateData:M(r),data:M(i),dataLength:i.length}}default:throw new y(T.INVALID_TRANSACTION_INPUT,`Invalid transaction input type: ${t}.`)}},n8=e=>{let{type:t}=e;switch(t){case we.Coin:return{type:we.Coin,to:M(e.to),amount:C(e.amount),assetId:M(e.assetId)};case we.Contract:return{type:we.Contract,inputIndex:e.inputIndex,balanceRoot:Ne,stateRoot:Ne};case we.Change:return{type:we.Change,to:M(e.to),amount:C(0),assetId:M(e.assetId)};case we.Variable:return{type:we.Variable,to:Ne,amount:C(0),assetId:Ne};case we.ContractCreated:return{type:we.ContractCreated,contractId:M(e.contractId),stateRoot:M(e.stateRoot)};default:throw new y(T.INVALID_TRANSACTION_INPUT,`Invalid transaction output type: ${t}.`)}},ZS=e=>!("data"in e);var r8=e=>"id"in e;var i8=e=>e.type===fe.Revert&&e.val.toString("hex")===jd,a8=e=>e.type===fe.Panic&&e.contractId!=="0x0000000000000000000000000000000000000000000000000000000000000000",YS=e=>e.reduce((t,n)=>(i8(n)&&t.missingOutputVariables.push(n),a8(n)&&t.missingOutputContractIds.push(n),t),{missingOutputVariables:[],missingOutputContractIds:[]}),ze=e=>e||Ne;function s8(e){let{receiptType:t}=e;switch(t){case"CALL":return{type:fe.Call,from:ze(e.id||e.contractId),to:ze(e?.to),amount:C(e.amount),assetId:ze(e.assetId),gas:C(e.gas),param1:C(e.param1),param2:C(e.param2),pc:C(e.pc),is:C(e.is)};case"RETURN":return{type:fe.Return,id:ze(e.id||e.contractId),val:C(e.val),pc:C(e.pc),is:C(e.is)};case"RETURN_DATA":return{type:fe.ReturnData,id:ze(e.id||e.contractId),ptr:C(e.ptr),len:C(e.len),digest:ze(e.digest),pc:C(e.pc),data:ze(e.data),is:C(e.is)};case"PANIC":return{type:fe.Panic,id:ze(e.id),reason:C(e.reason),pc:C(e.pc),is:C(e.is),contractId:ze(e.contractId)};case"REVERT":return{type:fe.Revert,id:ze(e.id||e.contractId),val:C(e.ra),pc:C(e.pc),is:C(e.is)};case"LOG":return{type:fe.Log,id:ze(e.id||e.contractId),val0:C(e.ra),val1:C(e.rb),val2:C(e.rc),val3:C(e.rd),pc:C(e.pc),is:C(e.is)};case"LOG_DATA":return{type:fe.LogData,id:ze(e.id||e.contractId),val0:C(e.ra),val1:C(e.rb),ptr:C(e.ptr),len:C(e.len),digest:ze(e.digest),pc:C(e.pc),data:ze(e.data),is:C(e.is)};case"TRANSFER":return{type:fe.Transfer,from:ze(e.id||e.contractId),to:ze(e.toAddress||e?.to),amount:C(e.amount),assetId:ze(e.assetId),pc:C(e.pc),is:C(e.is)};case"TRANSFER_OUT":return{type:fe.TransferOut,from:ze(e.id||e.contractId),to:ze(e.toAddress||e.to),amount:C(e.amount),assetId:ze(e.assetId),pc:C(e.pc),is:C(e.is)};case"SCRIPT_RESULT":return{type:fe.ScriptResult,result:C(e.result),gasUsed:C(e.gasUsed)};case"MESSAGE_OUT":{let n=ze(e.sender),r=ze(e.recipient),i=ze(e.nonce),a=C(e.amount),s=e.data?D(e.data):Uint8Array.from([]),o=ze(e.digest),c=C(e.len).toNumber(),u=qr.getMessageId({sender:n,recipient:r,nonce:i,amount:a,data:M(s)});return{type:fe.MessageOut,sender:n,recipient:r,amount:a,nonce:i,len:c,data:s,digest:o,messageId:u}}case"MINT":{let n=ze(e.id||e.contractId),r=ze(e.subId),i=vm(n,r);return{type:fe.Mint,subId:r,contractId:n,assetId:i,val:C(e.val),pc:C(e.pc),is:C(e.is)}}case"BURN":{let n=ze(e.id||e.contractId),r=ze(e.subId),i=vm(n,r);return{type:fe.Burn,subId:r,contractId:n,assetId:i,val:C(e.val),pc:C(e.pc),is:C(e.is)}}default:throw new y(T.INVALID_RECEIPT_TYPE,`Invalid receipt type: ${t}.`)}}var pl=e=>e.filter(r=>r.type===fe.ScriptResult).reduce((r,i)=>r.add(i.gasUsed),C(0));function en(e,t){let n=C(t.base),r=C(0);return"unitsPerGas"in t?r=C(e).div(C(t.unitsPerGas)):r=C(e).mul(C(t.gasPerUnit)),n.add(r)}function o8(e,t,n){let r=[],i=e.filter(o=>{if("owner"in o||"sender"in o){if("predicate"in o&&o.predicate&&o.predicate!=="0x")return!0;if(!r.includes(o.witnessIndex))return r.push(o.witnessIndex),!0}return!1}),a=en(t,n.vmInitialization);return i.reduce((o,c)=>"predicate"in c&&c.predicate&&c.predicate!=="0x"?o.add(a.add(en(D(c.predicate).length,n.contractRoot)).add(C(c.predicateGasUsed))):o.add(n.ecr1),C(0))}function yx(e){let{gasCosts:t,gasPerByte:n,inputs:r,metadataGas:i,txBytesSize:a}=e,s=en(a,t.vmInitialization),o=C(a).mul(n),c=o8(r,a,t);return s.add(o).add(c).add(i).maxU64()}function RA(e){let{gasPerByte:t,witnessesLength:n,witnessLimit:r,minGas:i,gasLimit:a=C(0),maxGasPerTx:s}=e,o=C(0);r?.gt(0)&&r.gte(n)&&(o=C(r).sub(n).mul(t));let c=o.add(i).add(a);return c.gte(s)?s:c}function bx({gasCosts:e,stateRootSize:t,txBytesSize:n,contractBytesSize:r}){let i=en(r,e.contractRoot),a=en(t,e.stateRoot),s=en(n,e.s256),o=C(4+32+32+32),c=en(o,e.s256);return i.add(a).add(s).add(c).maxU64()}function vx({gasCosts:e,txBytesSize:t}){return en(t,e.s256)}function c8({gasCosts:e,txBytesSize:t,witnessBytesSize:n}){let r=en(t,e.s256),i=en(n,e.s256);return r.add(i)}function XS({gasCosts:e,txBytesSize:t,consensusSize:n}){let r=en(t,e.s256);if(n){let i=en(n,e.s256);r.add(i)}return r}function u8({gasCosts:e,txBytesSize:t,subsectionSize:n,subsectionsSize:r}){let i=en(t,e.s256),a=en(n,e.s256);i.add(a);let s=en(r,e.stateRoot);return i.add(s),i}function l8({gasCosts:e,baseMinGas:t,subsectionSize:n}){let r=C(e.newStoragePerByte).mul(n);return C(t).add(r)}var sf=e=>{let{gas:t,gasPrice:n,priceFactor:r,tip:i}=e;return t.mul(n).div(r).add(C(i))};function _A(e){return Object.keys(e).forEach(t=>{switch(e[t]?.constructor.name){case"Uint8Array":e[t]=M(e[t]);break;case"Array":e[t]=_A(e[t]);break;case"BN":e[t]=e[t].toHex();break;case"Address":e[t]=e[t].toB256();break;case"Object":e[t]=_A(e[t]);break;default:break}}),e}function d8(e){return _A(Xe(e))}var f8=(e,t)=>{let n=`The transaction reverted with reason: "${e}".`;return vC.includes(e)&&(n=`${n}
|
|
809
|
+
|
|
810
|
+
You can read more about this error at:
|
|
811
|
+
|
|
812
|
+
${wC}#variant.${e}`),new y(T.SCRIPT_REVERTED,n,{...t,reason:e})},ul=e=>JSON.stringify(e,null,2),p8=(e,t,n)=>{let r="The transaction reverted with an unknown reason.",i=e.find(({type:s})=>s===fe.Revert),a="";if(i){let s=C(i.val).toHex(),o=t[t.length-1],c=t[t.length-2];switch(s){case _C:{a="require",r=`The transaction reverted because a "require" statement has thrown ${t.length?ul(o):"an error."}.`;break}case AC:{let u=t.length>=2?` comparing ${ul(o)} and ${ul(c)}.`:".";a="assert_eq",r=`The transaction reverted because of an "assert_eq" statement${u}`;break}case bC:{let u=t.length>=2?` comparing ${ul(c)} and ${ul(o)}.`:".";a="assert_ne",r=`The transaction reverted because of an "assert_ne" statement${u}`;break}case yC:a="assert",r='The transaction reverted because an "assert" statement failed to evaluate to true.';break;case jd:a="MissingOutputChange",r=`The transaction reverted because it's missing an "OutputChange".`;break;default:throw new y(T.UNKNOWN,`The transaction reverted with an unknown reason: ${i.val}`,{...n,reason:"unknown"})}}return new y(T.SCRIPT_REVERTED,r,{...n,reason:a})},ff=e=>{let{receipts:t,statusReason:n,logs:r}=e,i=t.some(({type:o})=>o===fe.Panic),a=t.some(({type:o})=>o===fe.Revert),s={logs:r,receipts:t,panic:i,revert:a,reason:""};return i?f8(n,s):p8(t,r,s)};var h8=class extends Error{constructor(e){super(),this.index=e,this.message=`Witness at index "${e}" was not found`}name="NoWitnessAtIndexError"};var xo=e=>e.type===be.Coin,kA=e=>e.type===be.Message,wx=e=>e.type===be.Message&&C(e.data).isZero(),m8=e=>xo(e)||kA(e),dl=e=>xo(e)||wx(e),Ex=e=>xo(e)?e.owner:e.recipient,g8=(e,t)=>Ex(e)===t.toB256(),_8=(e,t,n)=>e.filter(dl).reduce((r,i)=>xo(i)&&i.assetId===t||kA(i)&&t===n?r.add(i.amount):r,C(0));var A8=(e,t)=>e.reduce((n,r)=>(xo(r)&&r.owner===t.toB256()?n.utxos.push(r.id):kA(r)&&r.recipient===t.toB256()&&n.messages.push(r.nonce),n),{utxos:[],messages:[]}),y8=e=>{let t=D(e);return{data:M(t),dataLength:t.length}},To=class{tip;maturity;maxFee;witnessLimit;inputs=[];outputs=[];witnesses=[];constructor({tip:e,maturity:t,maxFee:n,witnessLimit:r,inputs:i,outputs:a,witnesses:s}={}){this.tip=e?C(e):void 0,this.maturity=t&&t>0?t:void 0,this.witnessLimit=Un(r)?C(r):void 0,this.maxFee=C(n),this.inputs=i??[],this.outputs=a??[],this.witnesses=s??[]}static getPolicyMeta(e){let t=0,n=[],{tip:r,witnessLimit:i,maturity:a}=e;return C(r).gt(0)&&(t+=ln.Tip,n.push({data:C(r),type:ln.Tip})),Un(i)&&C(i).gte(0)&&(t+=ln.WitnessLimit,n.push({data:C(i),type:ln.WitnessLimit})),a&&a>0&&(t+=ln.Maturity,n.push({data:a,type:ln.Maturity})),t+=ln.MaxFee,n.push({data:e.maxFee,type:ln.MaxFee}),{policyTypes:t,policies:n}}getBaseTransaction(){let e=this.inputs?.map(t8)??[],t=this.outputs?.map(n8)??[],n=this.witnesses?.map(y8)??[],{policyTypes:r,policies:i}=To.getPolicyMeta(this);return{policyTypes:r,inputs:e,outputs:t,policies:i,witnesses:n,inputsCount:e.length,outputsCount:t.length,witnessesCount:n.length}}toTransactionBytes(){return new Sn().encode(this.toTransaction())}pushInput(e){return this.inputs.push(e),this.inputs.length-1}pushOutput(e){return this.outputs.push(e),this.outputs.length-1}addWitness(e){return this.witnesses.push(e),this.witnesses.length-1}addEmptyWitness(){return this.addWitness(re([Ne,Ne])),this.witnesses.length-1}updateWitnessByOwner(e,t){let n=se.fromAddressOrString(e),r=this.getCoinInputWitnessIndexByOwner(n);typeof r=="number"&&this.updateWitness(r,t)}updateWitness(e,t){if(!this.witnesses[e])throw new h8(e);this.witnesses[e]=t}async addAccountWitnesses(e){let t=Array.isArray(e)?e:[e];return await Promise.all(t.map(async n=>{this.addWitness(await n.signTransaction(this))})),this}getCoinInputs(){return this.inputs.filter(e=>e.type===be.Coin)}getCoinOutputs(){return this.outputs.filter(e=>e.type===we.Coin)}getChangeOutputs(){return this.outputs.filter(e=>e.type===we.Change)}getCoinInputWitnessIndexByOwner(e){let t=Xa(e);return this.inputs.find(r=>{switch(r.type){case be.Coin:return M(r.owner)===t.toB256();case be.Message:return M(r.recipient)===t.toB256();default:return!1}})?.witnessIndex}addCoinInput(e){let{assetId:t,owner:n,amount:r,id:i,predicate:a,predicateData:s}=e,o;e.predicate?o=0:(o=this.getCoinInputWitnessIndexByOwner(n),typeof o!="number"&&(o=this.addEmptyWitness()));let c={id:i,type:be.Coin,owner:n.toB256(),amount:r,assetId:t,txPointer:"0x00000000000000000000000000000000",witnessIndex:o,predicate:a,predicateData:s};this.pushInput(c),this.addChangeOutput(n,t)}addMessageInput(e){let{recipient:t,sender:n,amount:r,predicate:i,nonce:a,predicateData:s}=e,o;e.predicate?o=0:(o=this.getCoinInputWitnessIndexByOwner(t),typeof o!="number"&&(o=this.addEmptyWitness()));let c={nonce:a,type:be.Message,sender:n.toB256(),recipient:t.toB256(),data:ZS(e)?"0x":e.data,amount:r,witnessIndex:o,predicate:i,predicateData:s};this.pushInput(c),ZS(e)&&this.addChangeOutput(t,e.assetId)}addResource(e){return r8(e)?this.addCoinInput(e):this.addMessageInput(e),this}addResources(e){return e.forEach(t=>this.addResource(t)),this}addCoinOutput(e,t,n){return this.pushOutput({type:we.Coin,to:Xa(e).toB256(),amount:t,assetId:n}),this}addCoinOutputs(e,t){return t.map(uf).forEach(n=>{this.pushOutput({type:we.Coin,to:Xa(e).toB256(),amount:n.amount,assetId:n.assetId})}),this}addChangeOutput(e,t){this.getChangeOutputs().find(r=>M(r.assetId)===t)||this.pushOutput({type:we.Change,to:Xa(e).toB256(),assetId:t})}byteSize(){return this.toTransactionBytes().length}metadataGas(e){throw new y(y.CODES.NOT_IMPLEMENTED,"Not implemented")}calculateMinGas(e){let{consensusParameters:t}=e,{gasCosts:n,feeParameters:{gasPerByte:r}}=t;return yx({gasPerByte:r,gasCosts:n,inputs:this.inputs,txBytesSize:this.byteSize(),metadataGas:this.metadataGas(n)})}calculateMaxGas(e,t){let{consensusParameters:n}=e,{feeParameters:{gasPerByte:r},txParameters:{maxGasPerTx:i}}=n,a=this.toTransaction().witnesses.reduce((s,o)=>s+o.dataLength,0);return RA({gasPerByte:r,minGas:t,witnessesLength:a,witnessLimit:this.witnessLimit,maxGasPerTx:i})}fundWithFakeUtxos(e,t,n){let r=a=>this.inputs.find(s=>"assetId"in s?s.assetId===a:!1),i=(a,s)=>{let o=r(a),c=s;a===t&&(c=C("1000000000000000000")),o&&"assetId"in o?(o.id=M(Ft(Ya)),o.amount=c):this.addResources([{id:M(Ft(Ya)),amount:c,assetId:a,owner:n||se.fromRandom(),blockCreated:C(1),txCreatedIdx:C(1)}])};return i(t,C(1e11)),e.forEach(a=>i(a.assetId,a.amount)),this}getCoinOutputsQuantities(){return this.getCoinOutputs().map(({amount:t,assetId:n})=>({amount:C(t),assetId:n.toString()}))}toJSON(){return d8(this)}removeWitness(e){this.witnesses.splice(e,1),this.adjustWitnessIndexes(e)}adjustWitnessIndexes(e){this.inputs.filter(dl).forEach(t=>{t.witnessIndex>e&&(t.witnessIndex-=1)})}updatePredicateGasUsed(e){let t=e.filter(m8);this.inputs.filter(dl).forEach(n=>{let r=Ex(n),i=t.find(a=>g8(a,se.fromString(String(r))));i&&"predicateGasUsed"in i&&C(i.predicateGasUsed).gt(0)&&(n.predicateGasUsed=i.predicateGasUsed)})}byteLength(){return this.toTransactionBytes().byteLength}};function hl(e,t){let n=e.toTransaction();n.type===Ce.Script&&(n.receiptsRoot=Ne),n.inputs=n.inputs.map(a=>{let s=Xe(a);switch(s.type){case be.Coin:return s.txPointer={blockHeight:0,txIndex:0},s.predicateGasUsed=C(0),s;case be.Message:return s.predicateGasUsed=C(0),s;case be.Contract:return s.txPointer={blockHeight:0,txIndex:0},s.txID=Ne,s.outputIndex=0,s.balanceRoot=Ne,s.stateRoot=Ne,s;default:return s}}),n.outputs=n.outputs.map(a=>{let s=Xe(a);switch(s.type){case we.Contract:return s.balanceRoot=Ne,s.stateRoot=Ne,s;case we.Change:return s.amount=C(0),s;case we.Variable:return s.to=Ne,s.amount=C(0),s.assetId=Ne,s;default:return s}}),n.witnessesCount=0,n.witnesses=[];let r=N0(t),i=re([r,new Sn().encode(n)]);return at(i)}var AA=class extends To{static from(e){return new this(Xe(e))}type=Ce.Blob;blobId;witnessIndex;constructor({witnessIndex:e,blobId:t,...n}){super(n),this.blobId=t,this.witnessIndex=e??0}toTransaction(){let e=this.getBaseTransaction(),{witnessIndex:t,blobId:n}=this;return{type:Ce.Blob,...e,blobId:n,witnessIndex:t}}getTransactionId(e){return hl(this,e)}metadataGas(e){return c8({gasCosts:e,txBytesSize:this.byteSize(),witnessBytesSize:this.witnesses[this.witnessIndex].length})}},b8=e=>{let t=new Uint8Array(32);return t.set(D(e)),t},v8=e=>{let t,n;return Array.isArray(e)?(t=e[0],n=e[1]):(t=e.key,n=e.value),{key:M(t),value:M(b8(n))}},yA=class extends To{static from(e){return new this(Xe(e))}type=Ce.Create;bytecodeWitnessIndex;salt;storageSlots;constructor({bytecodeWitnessIndex:e,salt:t,storageSlots:n,...r}){super(r),this.bytecodeWitnessIndex=e??0,this.salt=M(t??Ne),this.storageSlots=[...n??[]]}toTransaction(){let e=this.getBaseTransaction(),t=this.bytecodeWitnessIndex,n=this.storageSlots?.map(v8)??[];return{type:Ce.Create,...e,bytecodeWitnessIndex:t,storageSlotsCount:C(n.length),salt:this.salt?M(this.salt):Ne,storageSlots:n}}getContractCreatedOutputs(){return this.outputs.filter(e=>e.type===we.ContractCreated)}getTransactionId(e){return hl(this,e)}addContractCreatedOutput(e,t){this.pushOutput({type:we.ContractCreated,contractId:e,stateRoot:t})}metadataGas(e){return bx({contractBytesSize:C(D(this.witnesses[this.bytecodeWitnessIndex]||"0x").length),gasCosts:e,stateRootSize:this.storageSlots.length,txBytesSize:this.byteSize()})}},$S={bytes:D("0x24000000"),encodeScriptData:()=>new Uint8Array(0)},w8={bytes:D("0x5040C0105D44C0064C40001124000000"),encodeScriptData:()=>new Uint8Array(0)},oa=class extends To{static from(e){return new this(Xe(e))}type=Ce.Script;gasLimit;script;scriptData;abis;constructor({script:e,scriptData:t,gasLimit:n,...r}={}){super(r),this.gasLimit=C(n),this.script=D(e??$S.bytes),this.scriptData=D(t??$S.encodeScriptData()),this.abis=r.abis}toTransaction(){let e=D(this.script??"0x"),t=D(this.scriptData??"0x");return{type:Ce.Script,scriptGasLimit:this.gasLimit,...super.getBaseTransaction(),scriptLength:C(e.length),scriptDataLength:C(t.length),receiptsRoot:Ne,script:M(e),scriptData:M(t)}}getContractInputs(){return this.inputs.filter(e=>e.type===be.Contract)}getContractOutputs(){return this.outputs.filter(e=>e.type===we.Contract)}getVariableOutputs(){return this.outputs.filter(e=>e.type===we.Variable)}setScript(e,t){this.scriptData=e.encodeScriptData(t),this.script=e.bytes}addVariableOutputs(e=1){let t=e;for(;t;)this.pushOutput({type:we.Variable}),t-=1;return this.outputs.length-1}calculateMaxGas(e,t){let{consensusParameters:n}=e,{feeParameters:{gasPerByte:r},txParameters:{maxGasPerTx:i}}=n,a=this.toTransaction().witnesses.reduce((s,o)=>s+o.dataLength,0);return RA({gasPerByte:r,minGas:t,witnessesLength:a,witnessLimit:this.witnessLimit,gasLimit:this.gasLimit,maxGasPerTx:i})}addContractInputAndOutput(e){let t=Xa(e);if(this.getContractInputs().find(r=>r.contractId===t.toB256()))return this;let n=super.pushInput({type:be.Contract,contractId:t.toB256(),txPointer:"0x00000000000000000000000000000000"});return this.pushOutput({type:we.Contract,inputIndex:n}),this}getTransactionId(e){return hl(this,e)}setData(e,t){let n=new Qn(e);return this.scriptData=n.functions.main.encodeArguments(t),this}metadataGas(e){return vx({gasCosts:e,txBytesSize:this.byteSize()})}},bA=class extends To{static from(e){return e instanceof bA?e:new this(Xe(e))}type=Ce.Upgrade;upgradePurpose;bytecodeWitnessIndex;constructor({upgradePurpose:e,bytecodeWitnessIndex:t,...n}={}){super(n),this.bytecodeWitnessIndex=t??0,this.upgradePurpose=e??{type:In.ConsensusParameters,checksum:"0x"}}addConsensusParametersUpgradePurpose(e){return this.bytecodeWitnessIndex=this.addWitness(e),this.upgradePurpose={type:In.ConsensusParameters,checksum:Gt(e)},this}addStateTransitionUpgradePurpose(e){return this.upgradePurpose={type:In.StateTransition,data:M(e)},this}addUpgradePurpose(e,t){return e===In.ConsensusParameters&&this.addConsensusParametersUpgradePurpose(t),e===In.StateTransition&&this.addStateTransitionUpgradePurpose(t),this}toTransaction(){let e;if(this.upgradePurpose.type===In.ConsensusParameters)e={type:In.ConsensusParameters,data:{witnessIndex:this.bytecodeWitnessIndex,checksum:this.upgradePurpose.checksum}};else if(this.upgradePurpose.type===In.StateTransition)e={type:In.StateTransition,data:{bytecodeRoot:M(this.upgradePurpose.data)}};else throw new y(y.CODES.NOT_IMPLEMENTED,"Invalid upgrade purpose");return{type:Ce.Upgrade,...super.getBaseTransaction(),upgradePurpose:e}}getTransactionId(e){return hl(this,e)}metadataGas(e){let t=this.byteSize();if(this.upgradePurpose.type===In.ConsensusParameters){let n=this.bytecodeWitnessIndex,r=this.witnesses[n].length;return XS({gasCosts:e,txBytesSize:t,consensusSize:r})}if(this.upgradePurpose.type===In.StateTransition)return XS({gasCosts:e,txBytesSize:t});throw new y(y.CODES.NOT_IMPLEMENTED,"Invalid upgrade purpose")}},vA=class extends To{static from(e){return e instanceof vA?e:new this(Xe(e))}type=Ce.Upload;witnessIndex;subsection;constructor({witnessIndex:e,subsection:t,...n}={}){super(n),this.witnessIndex=e??0,this.subsection=t??{proofSet:[],root:Ne,subsectionIndex:0,subsectionsNumber:0}}addSubsection(e){let{subsection:t,...n}=e;this.subsection=n,this.witnessIndex=this.addWitness(t)}getTransactionId(e){return hl(this,e)}toTransaction(){let e=this.getBaseTransaction(),{subsectionIndex:t,subsectionsNumber:n,root:r,proofSet:i}=this.subsection;return{type:Ce.Upload,...e,subsectionIndex:t,subsectionsNumber:n,root:M(r),proofSet:i.map(M),witnessIndex:this.witnessIndex,proofSetCount:i.length}}metadataGas(e){return u8({gasCosts:e,txBytesSize:this.byteSize(),subsectionSize:D(this.witnesses[this.witnessIndex]).length,subsectionsSize:this.subsection.subsectionsNumber})}calculateMinGas(e){let t=super.calculateMinGas(e),{gasCosts:n}=e.consensusParameters,r=this.witnesses[this.witnessIndex]??Ne;return l8({gasCosts:n,baseMinGas:t.toNumber(),subsectionSize:D(r).length})}},qn=e=>{if(e instanceof oa||e instanceof yA||e instanceof AA||e instanceof bA||e instanceof vA)return e;let{type:t}=e;switch(e.type){case Ce.Script:return oa.from(e);case Ce.Create:return yA.from(e);case Ce.Blob:return AA.from(e);case Ce.Upgrade:return bA.from(e);case Ce.Upload:return vA.from(e);default:throw new y(T.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${t}.`)}},os=e=>e.type===Ce.Script,E8=e=>e.type===Ce.Create;var C8=e=>{let{gasPrice:t,rawPayload:n,tip:r,totalFee:i,consensusParameters:{gasCosts:a,feeParams:s,maxGasPerTx:o}}=e;if(i)return i;let c=C(s.gasPerByte),u=C(s.gasPriceFactor),d=D(n),[p]=new Sn().decode(d,0),{type:h,witnesses:_,inputs:I,policies:v}=p,b=C(0),w=C(0);if(h!==Ce.Create&&h!==Ce.Script)return C(0);if(h===Ce.Create){let{bytecodeWitnessIndex:V,storageSlots:Z}=p,X=C(D(_[V].data).length);b=bx({contractBytesSize:X,gasCosts:a,stateRootSize:Z.length||0,txBytesSize:d.length})}else{let{scriptGasLimit:V}=p;V&&(w=V),b=vx({gasCosts:a,txBytesSize:d.length})}let x=yx({gasCosts:a,gasPerByte:C(c),inputs:I,metadataGas:b,txBytesSize:d.length}),R=v.find(V=>V.type===ln.WitnessLimit)?.data,k=_.reduce((V,Z)=>V+Z.dataLength,0),q=RA({gasPerByte:c,minGas:x,witnessesLength:k,gasLimit:w,witnessLimit:R,maxGasPerTx:o});return sf({gasPrice:t,gas:q,priceFactor:u,tip:r})},I8=({abi:e,receipt:t})=>{let n=new Qn(e),r=t.param1.toHex(8),i=n.getFunction(r),a=i.jsonFn.inputs,s=t.param2.toHex(),o,c=i.decodeArguments(s);return c&&(o=a.reduce((d,p,h)=>{let _=c[h],I=p.name;return I?{...d,[I]:JSON.parse(JSON.stringify(_))}:d},{})),{functionSignature:i.signature,functionName:i.name,argumentsProvided:o,...t.amount?.isZero()?{}:{amount:t.amount,assetId:t.assetId}}};function S8(e,t){return e.filter(n=>t.includes(n.type))}function BA(e,t){return e.filter(n=>n.type===t)}function x8(e){return BA(e,be.Coin)}function T8(e){return BA(e,be.Message)}function Cx(e){return S8(e,[be.Coin,be.Message])}function KS(e){return e.type===be.Coin}function N8(e){return BA(e,be.Contract)}function R8(e,t){return x8(e).find(r=>r.assetId===t)}function k8(e,t){let n=new Map;return Cx(e).forEach(r=>{let i=KS(r)?r.assetId:t,a=KS(r)?r.owner:r.recipient,s=n.get(i);s||(s=new Map,n.set(i,s));let o=s.get(a);o||(o=new sr(0),s.set(a,o)),s.set(a,o.add(r.amount))}),n}function B8(e){return T8(e)?.[0]}function Ix(e,t,n=!1){let r=R8(e,t);if(r)return r;if(n)return B8(e)}function O8(e,t){if(t==null)return;let n=e?.[t];if(n){if(n.type!==be.Contract)throw new y(T.INVALID_TRANSACTION_INPUT,"Contract input should be of type 'contract'.");return n}}function OA(e){return e.type===be.Coin?e.owner.toString():e.type===be.Message?e.recipient.toString():""}function pf(e,t){return e.filter(n=>n.type===t)}function P8(e){return pf(e,we.ContractCreated)}function Sx(e){return pf(e,we.Coin)}function D8(e){return pf(e,we.Change)}function M8(e){return pf(e,we.Contract)}function of(e,t){return(e??[]).filter(n=>n.type===t)}function xx(e){switch(e){case Ce.Mint:return"Mint";case Ce.Create:return"Create";case Ce.Script:return"Script";case Ce.Blob:return"Blob";case Ce.Upgrade:return"Upgrade";case Ce.Upload:return"Upload";default:throw new y(T.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${e}.`)}}function No(e,t){return xx(e)===t}function F8(e){return No(e,"Mint")}function Tx(e){return No(e,"Create")}function Nx(e){return No(e,"Script")}function L8(e){return No(e,"Upgrade")}function U8(e){return No(e,"Upload")}function Q8(e){return No(e,"Blob")}function q8(e){return of(e,fe.Call)}function V8(e){return of(e,fe.MessageOut)}function J8(e,t){let n=e.assetsSent||[],r=t.assetsSent||[],i=new Map;return n.forEach(a=>{i.set(a.assetId,{...a})}),r.forEach(a=>{let s=i.get(a.assetId);s?s.amount=C(s.amount).add(a.amount):i.set(a.assetId,{...a})}),Array.from(i.values())}function z8(e,t){return e.name===t.name&&e.from?.address===t.from?.address&&e.to?.address===t.to?.address&&e.from?.type===t.from?.type&&e.to?.type===t.to?.type}function G8(e,t){return t.assetsSent?.length?e.assetsSent?.length?J8(e,t):t.assetsSent:e.assetsSent}function H8(e,t){return t.calls?.length?[...e.calls||[],...t.calls]:e.calls}function W8(e,t){return{...e,assetsSent:G8(e,t),calls:H8(e,t)}}function fl(e,t){let n=e.findIndex(r=>z8(r,t));return n===-1?[...e,t]:e.map((r,i)=>i===n?W8(r,t):r)}function Z8({inputs:e,receipts:t,baseAssetId:n}){return V8(t).reduce((a,s)=>{let o=Ix(e,n,!0);if(o){let c=OA(o);return fl(a,{name:"Withdraw from Fuel",from:{type:1,address:c},to:{type:1,address:s.recipient.toString(),chain:"ethereum"},assetsSent:[{amount:s.amount,assetId:n}]})}return a},[])}function Y8(e,t,n,r,i){let a=t?.[e.contractID];return a?[I8({abi:a,receipt:n,rawPayload:r,maxInputs:i})]:[]}function X8(e){return e.amount?.isZero()?void 0:[{amount:e.amount,assetId:e.assetId}]}function $8(e,t,n,r,i,a,s){let o=e.assetId===Ne?s:e.assetId,c=Ix(n,o,o===s);if(!c)return[];let u=OA(c),d=Y8(t,r,e,i,a);return[{name:"Contract call",from:{type:1,address:u},to:{type:0,address:e.to},assetsSent:X8(e),calls:d}]}function K8({inputs:e,outputs:t,receipts:n,abiMap:r,rawPayload:i,maxInputs:a,baseAssetId:s}){let o=q8(n);return M8(t).flatMap(u=>{let d=O8(e,u.inputIndex);return d?o.filter(p=>p.to===d.contractID).flatMap(p=>$8(p,d,e,r,i,a,s)):[]})}function j8(e,t,n){let{to:r,assetId:i,amount:a}=e,{from:s}=e,o=t.some(u=>u.contractID===r)?0:1;return Ne===s&&(s=n.find(d=>d.assetId===i)?.to||s),{name:"Transfer asset",from:{type:t.some(u=>u.contractID===s)?0:1,address:s},to:{type:o,address:r},assetsSent:[{assetId:i.toString(),amount:a}]}}function eQ({inputs:e,outputs:t,receipts:n,baseAssetId:r}){let i=[],a=Sx(t),s=N8(e),o=D8(t),c=k8(e,r);a.forEach(({amount:p,assetId:h,to:_})=>{let I=c.get(h)||new Map,v,b;for(let[w,x]of I)if(b||(b=w),x.gte(p)){v=w;break}v=v||b,v&&(i=fl(i,{name:"Transfer asset",from:{type:1,address:v},to:{type:1,address:_},assetsSent:[{assetId:h,amount:p}]}))});let u=of(n,fe.Transfer),d=of(n,fe.TransferOut);return[...u,...d].forEach(p=>{let h=j8(p,s,o);i=fl(i,h)}),i}function tQ(e){return Sx(e).reduce((r,i)=>fl(r,{name:"Pay network fee to block producer",from:{type:1,address:"Network"},to:{type:1,address:i.to.toString()},assetsSent:[{assetId:i.assetId.toString(),amount:i.amount}]}),[])}function nQ({inputs:e,outputs:t}){let n=P8(t),r=Cx(e)[0],i=OA(r);return n.reduce((s,o)=>fl(s,{name:"Contract created",from:{type:1,address:i},to:{type:0,address:o?.contractId||""}}),[])}function rQ({transactionType:e,inputs:t,outputs:n,receipts:r,abiMap:i,rawPayload:a,maxInputs:s,baseAssetId:o}){return Tx(e)?[...nQ({inputs:t,outputs:n})]:Nx(e)?[...eQ({inputs:t,outputs:n,receipts:r,baseAssetId:o}),...K8({inputs:t,outputs:n,receipts:r,abiMap:i,rawPayload:a,maxInputs:s,baseAssetId:o}),...Z8({inputs:t,receipts:r,baseAssetId:o})]:[...tQ(n)]}var Eo=e=>s8(e),iQ=e=>{let t=[];return e.forEach(n=>{n.type===fe.Mint&&t.push({subId:n.subId,contractId:n.contractId,assetId:n.assetId,amount:n.val})}),t},aQ=e=>{let t=[];return e.forEach(n=>{n.type===fe.Burn&&t.push({subId:n.subId,contractId:n.contractId,assetId:n.assetId,amount:n.val})}),t},sQ=e=>{switch(e){case"FailureStatus":return"failure";case"SuccessStatus":return"success";case"SubmittedStatus":return"submitted";case"SqueezedOutStatus":return"squeezedout";default:throw new y(T.INVALID_TRANSACTION_STATUS,`Invalid transaction status: ${e}.`)}},oQ=e=>{let t,n,r,i,a,s=!1,o=!1,c=!1;if(e?.type)switch(r=sQ(e.type),e.type){case"SuccessStatus":t=e.time,n=e.block.id,o=!0,i=C(e.totalFee),a=C(e.totalGas);break;case"FailureStatus":t=e.time,n=e.block.id,s=!0,i=C(e.totalFee),a=C(e.totalGas);break;case"SubmittedStatus":t=e.time,c=!0;break;default:}return{time:t,blockId:n,status:r,totalFee:i,totalGas:a,isStatusFailure:s,isStatusSuccess:o,isStatusPending:c}};function cQ(e){let{id:t,receipts:n,gasPerByte:r,gasPriceFactor:i,transaction:a,transactionBytes:s,gqlTransactionStatus:o,abiMap:c={},maxInputs:u,gasCosts:d,maxGasPerTx:p,gasPrice:h,baseAssetId:_}=e,I=pl(n),v=M(s),b=rQ({transactionType:a.type,inputs:a.inputs||[],outputs:a.outputs||[],receipts:n,rawPayload:v,abiMap:c,maxInputs:u,baseAssetId:_}),w=xx(a.type),x=C(a.policies?.find(B=>B.type===ln.Tip)?.data),{isStatusFailure:R,isStatusPending:k,isStatusSuccess:q,blockId:U,status:V,time:Z,totalFee:X}=oQ(o),de=C8({totalFee:X,gasPrice:h,rawPayload:v,tip:x,consensusParameters:{gasCosts:d,maxGasPerTx:p,feeParams:{gasPerByte:r,gasPriceFactor:i}}}),O=iQ(n),ie=aQ(n),F;return Z&&(F=_d.fromTai64(Z)),{id:t,tip:x,fee:de,gasUsed:I,operations:b,type:w,blockId:U,time:Z,status:V,receipts:n,mintedAssets:O,burnedAssets:ie,isTypeMint:F8(a.type),isTypeCreate:Tx(a.type),isTypeScript:Nx(a.type),isTypeUpgrade:L8(a.type),isTypeUpload:U8(a.type),isTypeBlob:Q8(a.type),isStatusFailure:R,isStatusSuccess:q,isStatusPending:k,date:F,transaction:a}}function hf(e,t,n={}){return e.reduce((r,i)=>{if(i.type===fe.LogData||i.type===fe.Log){let a=new Qn(n[i.id]||t),s=i.type===fe.Log?new j("u64").encode(i.val0):i.data,[o]=a.decodeLog(s,i.val1.toString());r.push(o)}return r},[])}function uQ(e){return e.map(t=>{let n="amount"in t?{...t,amount:C(t.amount)}:t;switch(n.type){case"CoinOutput":return{...n,type:we.Coin};case"ContractOutput":return{...n,type:we.Contract,inputIndex:parseInt(n.inputIndex,10)};case"ChangeOutput":return{...n,type:we.Change};case"VariableOutput":return{...n,type:we.Variable};case"ContractCreated":return{...n,type:we.ContractCreated,contractId:n.contract};default:return Gw(n)}})}var wA=class{constructor(e,t,n,r){this.submitTxSubscription=r,this.id=typeof e=="string"?e:e.getTransactionId(t.getChainId()),this.provider=t,this.abis=n,this.request=typeof e=="string"?void 0:e}id;provider;gasUsed=C(0);gqlTransaction;request;status;abis;static async create(e,t,n){let r=new wA(e,t,n);return await r.fetch(),r}applyMalleableSubscriptionFields(e){let t=this.status;if(!t)return;let n=e;(t.type==="SuccessStatus"||t.type==="FailureStatus")&&(n.inputs=n.inputs.map((r,i)=>{if("txPointer"in r){let a=t.transaction.inputs?.[i];return{...r,txPointer:Xi.decodeFromGqlScalar(a.txPointer)}}return r}),n.outputs=uQ(t.transaction.outputs),"receiptsRoot"in t.transaction&&(n.receiptsRoot=t.transaction.receiptsRoot))}async getTransaction(){if(this.request){let t=this.request.toTransaction();return this.applyMalleableSubscriptionFields(t),{tx:t,bytes:this.request.toTransactionBytes()}}let e=this.gqlTransaction??await this.fetch();return{tx:this.decodeTransaction(e),bytes:D(e.rawPayload)}}getReceipts(){let e=this.status??this.gqlTransaction?.status;switch(e?.type){case"SuccessStatus":case"FailureStatus":return e.receipts.map(Eo);default:return[]}}async fetch(){let e=await this.provider.operations.getTransactionWithReceipts({transactionId:this.id});if(!e.transaction){let t=await this.provider.operations.statusChange({transactionId:this.id});for await(let{statusChange:n}of t)if(n){this.status=n;break}return this.fetch()}return this.gqlTransaction=e.transaction,e.transaction}decodeTransaction(e){return new Sn().decode(D(e.rawPayload),0)?.[0]}async getTransactionSummary(e){let{tx:t,bytes:n}=await this.getTransaction(),{gasPerByte:r,gasPriceFactor:i,gasCosts:a,maxGasPerTx:s}=this.provider.getGasConfig(),o=await this.provider.getLatestGasPrice(),c=this.provider.getChain().consensusParameters.txParameters.maxInputs,u=this.provider.getBaseAssetId();return cQ({id:this.id,receipts:this.getReceipts(),transaction:t,transactionBytes:n,gqlTransactionStatus:this.status??this.gqlTransaction?.status,gasPerByte:r,gasPriceFactor:i,abiMap:e,maxInputs:c,gasCosts:a,maxGasPerTx:s,gasPrice:o,baseAssetId:u})}async waitForStatusChange(){let e=this.gqlTransaction?.status?.type;if(e&&e!=="SubmittedStatus")return;let t=this.submitTxSubscription??await this.provider.operations.statusChange({transactionId:this.id});for await(let n of t){let r="statusChange"in n?n.statusChange:n.submitAndAwaitStatus;if(this.status=r,r.type==="SqueezedOutStatus")throw this.unsetResourceCache(),new y(T.TRANSACTION_SQUEEZED_OUT,`Transaction Squeezed Out with reason: ${r.reason}`);if(r.type!=="SubmittedStatus")break}}async assembleResult(e){let t=await this.getTransactionSummary(e),n={...t},r=[];this.abis&&(r=hf(t.receipts,this.abis.main,this.abis.otherContractsAbis),n.logs=r);let{receipts:i}=n,a=this.status??this.gqlTransaction?.status;if(a?.type==="FailureStatus"){this.unsetResourceCache();let{reason:s}=a;throw ff({receipts:i,statusReason:s,logs:r})}return n}async waitForResult(e){return await this.waitForStatusChange(),this.assembleResult(e)}async wait(e){return this.waitForResult(e)}unsetResourceCache(){this.provider.cache?.unset(this.id)}};function lQ(e,t){let n=e.baseDelay??150;switch(e.backoff){case"linear":return n*t;case"fixed":return n;case"exponential":default:return 2**(t-1)*n}}function Rx(e,t,n=0){return t===void 0?e:async(...r)=>{try{return await e(...r)}catch(i){let a=i;if(a.cause?.code!=="ECONNREFUSED")throw a;let s=n+1;if(s>t.maxRetries)throw a;let o=lQ(t,s);return await Jw(o),Rx(e,t,s)(...r)}}}var dQ=(e,t)=>{switch(e){case"not enough coins to fit the target":throw new y(T.NOT_ENOUGH_FUNDS,"The account(s) sending the transaction don't have enough funds to cover the transaction.",{},t);default:throw new y(T.INVALID_REQUEST,e)}},jS=10,ex=512,fQ=60,pQ=5,hQ=2e4,mQ=1.2,tx=e=>{let{name:t,daHeight:n,consensusParameters:r}=e,{contractParams:i,feeParams:a,predicateParams:s,scriptParams:o,txParams:c,gasCosts:u,baseAssetId:d,chainId:p,version:h}=r;return{name:t,baseChainHeight:C(n),consensusParameters:{version:h,chainId:C(p),baseAssetId:d,feeParameters:{version:a.version,gasPerByte:C(a.gasPerByte),gasPriceFactor:C(a.gasPriceFactor)},contractParameters:{version:i.version,contractMaxSize:C(i.contractMaxSize),maxStorageSlots:C(i.maxStorageSlots)},txParameters:{version:c.version,maxInputs:C(c.maxInputs),maxOutputs:C(c.maxOutputs),maxWitnesses:C(c.maxWitnesses),maxGasPerTx:C(c.maxGasPerTx),maxSize:C(c.maxSize),maxBytecodeSubsections:C(c.maxBytecodeSubsections)},predicateParameters:{version:s.version,maxPredicateLength:C(s.maxPredicateLength),maxPredicateDataLength:C(s.maxPredicateDataLength),maxGasPerPredicate:C(s.maxGasPerPredicate),maxMessageDataLength:C(s.maxMessageDataLength)},scriptParameters:{version:o.version,maxScriptLength:C(o.maxScriptLength),maxScriptDataLength:C(o.maxScriptDataLength)},gasCosts:u}}},EA,kx,pn=class{constructor(e,t={}){sa(this,EA),$e(this,"operations"),$e(this,"cache"),$e(this,"url"),$e(this,"urlWithoutAuth"),$e(this,"consensusParametersTimestamp"),$e(this,"options",{timeout:void 0,resourceCacheTTL:void 0,fetch:void 0,retryOptions:void 0,headers:void 0});let{url:n,urlWithoutAuth:r,headers:i}=pn.extractBasicAuth(e);this.url=n,this.urlWithoutAuth=r,this.url=e;let{FUELS:a}=Vw,s={...i,...t.headers,Source:`ts-sdk-${a}`};this.options={...this.options,...t,headers:s},this.operations=this.createOperations();let{resourceCacheTTL:o}=this.options;Un(o)?o!==-1?this.cache=new WS(o):this.cache=void 0:this.cache=new WS(hQ)}static clearChainAndNodeCaches(){pn.nodeInfoCache={},pn.chainInfoCache={}}static getFetchFn(e){let{retryOptions:t,timeout:n,headers:r}=e;return Rx(async(...i)=>{let a=i[0],s=i[1],o=n?AbortSignal.timeout(n):void 0,c={...s,signal:o,headers:{...s?.headers,...r}};return e.requestMiddleware&&(c=await e.requestMiddleware(c)),e.fetch?e.fetch(a,c,e):fetch(a,c)},t)}static extractBasicAuth(e){let t;try{t=new URL(e)}catch(a){throw new y(y.CODES.INVALID_URL,"Invalid URL provided.",{url:e},a)}let n=t.username,r=t.password,i=`${t.origin}${t.pathname}`;return n&&r?{url:e,urlWithoutAuth:i,headers:{Authorization:`Basic ${btoa(`${n}:${r}`)}`}}:{url:e,urlWithoutAuth:e,headers:void 0}}static async create(e,t={}){let n=new pn(e,t);return await n.fetchChainAndNodeInfo(),n}getChain(){let e=pn.chainInfoCache[this.urlWithoutAuth];if(!e)throw new y(T.CHAIN_INFO_CACHE_EMPTY,"Chain info cache is empty. Make sure you have called `Provider.create` to initialize the provider.");return e}getNode(){let e=pn.nodeInfoCache[this.urlWithoutAuth];if(!e)throw new y(T.NODE_INFO_CACHE_EMPTY,"Node info cache is empty. Make sure you have called `Provider.create` to initialize the provider.");return e}getGasConfig(){let{txParameters:{maxGasPerTx:e},predicateParameters:{maxGasPerPredicate:t},feeParameters:{gasPriceFactor:n,gasPerByte:r},gasCosts:i}=this.getChain().consensusParameters;return{maxGasPerTx:e,maxGasPerPredicate:t,gasPriceFactor:n,gasPerByte:r,gasCosts:i}}async connect(e,t){let{url:n,urlWithoutAuth:r,headers:i}=pn.extractBasicAuth(e);this.url=n,this.urlWithoutAuth=r,this.options=t??this.options,this.options={...this.options,headers:{...this.options.headers,...i}},this.operations=this.createOperations(),await this.fetchChainAndNodeInfo()}async fetchChainAndNodeInfo(e=!1){let t,n;try{if(e)throw new Error("Jumps to the catch block andre-fetch");t=this.getNode(),n=this.getChain()}catch{let i=await this.operations.getChainAndNodeInfo();t={maxDepth:C(i.nodeInfo.maxDepth),maxTx:C(i.nodeInfo.maxTx),nodeVersion:i.nodeInfo.nodeVersion,utxoValidation:i.nodeInfo.utxoValidation,vmBacktrace:i.nodeInfo.vmBacktrace},pn.ensureClientVersionIsSupported(t),n=tx(i.chain),pn.chainInfoCache[this.urlWithoutAuth]=n,pn.nodeInfoCache[this.urlWithoutAuth]=t,this.consensusParametersTimestamp=Date.now()}return{chain:n,nodeInfo:t}}static ensureClientVersionIsSupported(e){let{isMajorSupported:t,isMinorSupported:n,supportedVersion:r}=qw(e.nodeVersion);(!t||!n)&&console.warn(`The Fuel Node that you are trying to connect to is using fuel-core version ${e.nodeVersion},
|
|
813
|
+
which is not supported by the version of the TS SDK that you are using.
|
|
814
|
+
Things may not work as expected.
|
|
815
|
+
Supported fuel-core version: ${r}.`)}createOperations(){let e=pn.getFetchFn(this.options),t=new lx.GraphQLClient(this.urlWithoutAuth,{fetch:(i,a)=>e(i,a,this.options),responseMiddleware:i=>{if("response"in i){let a=i.response;if(Array.isArray(a?.errors))for(let s of a.errors)dQ(s.message,s)}}}),n=(i,a)=>i.definitions.find(c=>c.kind==="OperationDefinition")?.operation==="subscription"?Ax.create({url:this.urlWithoutAuth,query:i,fetchFn:(c,u)=>e(c,u,this.options),variables:a}):t.request(i,a),r=i=>({getBlobs(a){let s=a.blobIds.map((d,p)=>`$blobId${p}: BlobId!`).join(", "),o=a.blobIds.map((d,p)=>`blob${p}: blob(id: $blobId${p}) { id }`).join(`
|
|
816
|
+
`),c=a.blobIds.reduce((d,p,h)=>(d[`blobId${h}`]=p,d),{}),u=Y`
|
|
817
|
+
query getBlobs(${s}) {
|
|
818
|
+
${o}
|
|
819
|
+
}
|
|
820
|
+
`;return i(u,c)}});return{...e8(n),...r(n)}}async getVersion(){let{nodeInfo:{nodeVersion:e}}=await this.operations.getVersion();return e}async getBlockNumber(){let{chain:{latestBlock:{height:e}}}=await this.operations.getLatestBlockHeight();return C(e)}async fetchNode(){let{nodeInfo:e}=await this.operations.getNodeInfo(),t={maxDepth:C(e.maxDepth),maxTx:C(e.maxTx),nodeVersion:e.nodeVersion,utxoValidation:e.utxoValidation,vmBacktrace:e.vmBacktrace};return pn.nodeInfoCache[this.urlWithoutAuth]=t,t}async fetchChain(){let{chain:e}=await this.operations.getChain(),t=tx(e);return pn.chainInfoCache[this.urlWithoutAuth]=t,t}getChainId(){let{consensusParameters:{chainId:e}}=this.getChain();return e.toNumber()}getBaseAssetId(){let{consensusParameters:{baseAssetId:e}}=this.getChain();return e}validateTransaction(e){let{consensusParameters:{txParameters:{maxInputs:t,maxOutputs:n}}}=this.getChain();if(C(e.inputs.length).gt(t))throw new y(T.MAX_INPUTS_EXCEEDED,`The transaction exceeds the maximum allowed number of inputs. Tx inputs: ${e.inputs.length}, max inputs: ${t}`);if(C(e.outputs.length).gt(n))throw new y(T.MAX_OUTPUTS_EXCEEDED,`The transaction exceeds the maximum allowed number of outputs. Tx outputs: ${e.outputs.length}, max outputs: ${n}`)}async sendTransaction(e,{estimateTxDependencies:t=!0}={}){let n=qn(e);t&&await this.estimateTxDependencies(n),this.validateTransaction(n);let r=M(n.toTransactionBytes()),i;os(n)&&(i=n.abis);let a=await this.operations.submitAndAwaitStatus({encodedTransaction:r});return gA(this,EA,kx).call(this,n.inputs,n.getTransactionId(this.getChainId())),new wA(n,this,i,a)}async dryRun(e,{utxoValidation:t,estimateTxDependencies:n=!0}={}){let r=qn(e);if(n)return this.estimateTxDependencies(r);let i=M(r.toTransactionBytes()),{dryRun:a}=await this.operations.dryRun({encodedTransactions:i,utxoValidation:t||!1}),[{receipts:s,status:o}]=a;return{receipts:s.map(Eo),dryRunStatus:o}}async estimatePredicates(e){if(!!!e.inputs.find(a=>"predicate"in a&&a.predicate&&!Sm(D(a.predicate),D("0x"))&&new sr(a.predicateGasUsed).isZero()))return e;let n=M(e.toTransactionBytes()),r=await this.operations.estimatePredicates({encodedTransaction:n}),{estimatePredicates:{inputs:i}}=r;return i&&i.forEach((a,s)=>{"predicateGasUsed"in a&&C(a.predicateGasUsed).gt(0)&&(e.inputs[s].predicateGasUsed=a.predicateGasUsed)}),e}async estimateTxDependencies(e){if(E8(e))return{receipts:[],outputVariables:0,missingContractIds:[]};let t=[],n=[],r=0,i;this.validateTransaction(e);for(let a=0;a<jS;a++){let{dryRun:[{receipts:s,status:o}]}=await this.operations.dryRun({encodedTransactions:[M(e.toTransactionBytes())],utxoValidation:!1});t=s.map(Eo),i=o;let{missingOutputVariables:c,missingOutputContractIds:u}=YS(t);if((c.length!==0||u.length!==0)&&os(e)){r+=c.length,e.addVariableOutputs(c.length),u.forEach(({contractId:h})=>{e.addContractInputAndOutput(se.fromString(h)),n.push(h)});let{maxFee:p}=await this.estimateTxGasAndFee({transactionRequest:e});e.maxFee=p}else break}return{receipts:t,outputVariables:r,missingContractIds:n,dryRunStatus:i}}async estimateMultipleTxDependencies(e){let t=e.map(()=>({receipts:[],outputVariables:0,missingContractIds:[],dryRunStatus:void 0})),n=Xe(e),r=new Map;n.forEach((s,o)=>{os(s)&&r.set(o,M(s.toTransactionBytes()))});let i=Array.from(r.keys()),a=0;for(;i.length>0&&a<jS;){let s=i.map(u=>r.get(u)),o=await this.operations.dryRun({encodedTransactions:s,utxoValidation:!1}),c=[];for(let u=0;u<o.dryRun.length;u++){let d=i[u],{receipts:p,status:h}=o.dryRun[u],_=t[d];_.receipts=p.map(Eo),_.dryRunStatus=h;let{missingOutputVariables:I,missingOutputContractIds:v}=YS(_.receipts),b=I.length>0||v.length>0,w=n[d];if(b&&os(w)){_.outputVariables+=I.length,w.addVariableOutputs(I.length),v.forEach(({contractId:R})=>{w.addContractInputAndOutput(se.fromString(R)),_.missingContractIds.push(R)});let{maxFee:x}=await this.estimateTxGasAndFee({transactionRequest:w});w.maxFee=x,r.set(d,M(w.toTransactionBytes())),c.push(d)}}i=c,a+=1}return t}async dryRunMultipleTransactions(e,{utxoValidation:t,estimateTxDependencies:n=!0}={}){if(n)return this.estimateMultipleTxDependencies(e);let r=e.map(s=>M(s.toTransactionBytes())),{dryRun:i}=await this.operations.dryRun({encodedTransactions:r,utxoValidation:t||!1});return i.map(({receipts:s,status:o})=>({receipts:s.map(Eo),dryRunStatus:o}))}async autoRefetchConfigs(){if(Date.now()-(this.consensusParametersTimestamp??0)<6e4)return;let n=this.getChain(),{consensusParameters:{version:r}}=n,{chain:{latestBlock:{header:{consensusParametersVersion:i}}}}=await this.operations.getConsensusParametersVersion();r!==i&&await this.fetchChainAndNodeInfo(!0)}async estimateTxGasAndFee(e){let{transactionRequest:t}=e,{gasPrice:n}=e;await this.autoRefetchConfigs();let r=this.getChain(),{gasPriceFactor:i,maxGasPerTx:a}=this.getGasConfig(),s=t.calculateMinGas(r);n||(n=await this.estimateGasPrice(10));let o=sf({gasPrice:C(n),gas:s,priceFactor:i,tip:t.tip}).add(1),c=C(0);os(t)&&(c=t.gasLimit,t.gasLimit.eq(0)&&(t.gasLimit=s,t.gasLimit=a.sub(t.calculateMaxGas(r,s)),c=t.gasLimit));let u=t.calculateMaxGas(r,s),d=sf({gasPrice:C(n),gas:u,priceFactor:i,tip:t.tip}).add(1);return{minGas:s,minFee:o,maxGas:u,maxFee:d,gasPrice:n,gasLimit:c}}async simulate(e,{estimateTxDependencies:t=!0}={}){let n=qn(e);if(t)return this.estimateTxDependencies(n);let r=[M(n.toTransactionBytes())],{dryRun:i}=await this.operations.dryRun({encodedTransactions:r,utxoValidation:!0});return{receipts:i.map(s=>{let{id:o,receipts:c,status:u}=s,d=c.map(Eo);return{id:o,receipts:d,status:u}})[0].receipts}}async getTransactionCost(e,{signatureCallback:t}={}){let n=Xe(qn(e)),r=n.maxFee.eq(0),i=os(n);i&&(n.gasLimit=C(0));let a=Xe(n),s=0;if(t&&os(a)){let x=a.witnesses.length;await t(a),s=a.witnesses.length-x}await this.estimatePredicates(a),n.updatePredicateGasUsed(a.inputs);let{maxFee:o,maxGas:c,minFee:u,minGas:d,gasPrice:p,gasLimit:h}=await this.estimateTxGasAndFee({transactionRequest:a}),_=[],I,v=[],b=0,w=C(0);if(n.maxFee=o,i){if(n.gasLimit=h,t&&await t(n),{receipts:_,missingContractIds:v,outputVariables:b,dryRunStatus:I}=await this.estimateTxDependencies(n),I&&"reason"in I)throw this.extractDryRunError(n,_,I);let{maxGasPerTx:x}=this.getGasConfig(),R=pl(_);w=C(R.muln(mQ)).max(x.sub(d)),n.gasLimit=w,{maxFee:o,maxGas:c,minFee:u,minGas:d,gasPrice:p}=await this.estimateTxGasAndFee({transactionRequest:n,gasPrice:p})}return{receipts:_,gasUsed:w,gasPrice:p,minGas:d,maxGas:c,minFee:u,maxFee:o,outputVariables:b,missingContractIds:v,addedSignatures:s,estimatedPredicates:n.inputs,dryRunStatus:I,updateMaxFee:r}}async getCoins(e,t,n){let r=se.fromAddressOrString(e),{coins:{edges:i,pageInfo:a}}=await this.operations.getCoins({...this.validatePaginationArgs({paginationLimit:ex,inputArgs:n}),filter:{owner:r.toB256(),assetId:t&&M(t)}});return{coins:i.map(({node:o})=>({id:o.utxoId,assetId:o.assetId,amount:C(o.amount),owner:se.fromAddressOrString(o.owner),blockCreated:C(o.blockCreated),txCreatedIdx:C(o.txCreatedIdx)})),pageInfo:a}}async getResourcesToSpend(e,t,n){let r=se.fromAddressOrString(e),i={messages:n?.messages?.map(c=>M(c))||[],utxos:n?.utxos?.map(c=>M(c))||[]};if(this.cache){let c=this.cache.getActiveData();i.messages.push(...c.messages),i.utxos.push(...c.utxos)}let a={owner:r.toB256(),queryPerAsset:t.map(uf).map(({assetId:c,amount:u,max:d})=>({assetId:M(c),amount:u.toString(10),max:d?d.toString(10):void 0})),excludedIds:i};return(await this.operations.getCoinsToSpend(a)).coinsToSpend.flat().map(c=>{switch(c.type){case"MessageCoin":return{amount:C(c.amount),assetId:c.assetId,daHeight:C(c.daHeight),sender:se.fromAddressOrString(c.sender),recipient:se.fromAddressOrString(c.recipient),nonce:c.nonce};case"Coin":return{id:c.utxoId,amount:C(c.amount),assetId:c.assetId,owner:se.fromAddressOrString(c.owner),blockCreated:C(c.blockCreated),txCreatedIdx:C(c.txCreatedIdx)};default:return null}}).filter(c=>!!c)}async getBlobs(e){let t=await this.operations.getBlobs({blobIds:e}),n=[];return Object.keys(t).forEach(r=>{let i=t[r];n.push(i?.id??null)}),n.filter(r=>r)}async getBlock(e){let t;if(e==="latest"){let{chain:{latestBlock:s}}=await this.operations.getLatestBlock();t=s}else{let o=typeof e=="string"&&e.length===66?{blockId:e}:{height:C(e).toString(10)};t=(await this.operations.getBlock(o)).block}if(!t)return null;let{header:n,height:r,id:i,transactions:a}=t;return{id:i,height:C(r),time:n.time,header:{applicationHash:n.applicationHash,daHeight:C(n.daHeight),eventInboxRoot:n.eventInboxRoot,messageOutboxRoot:n.messageOutboxRoot,prevRoot:n.prevRoot,stateTransitionBytecodeVersion:n.stateTransitionBytecodeVersion,transactionsCount:n.transactionsCount,transactionsRoot:n.transactionsRoot},transactionIds:a.map(s=>s.id)}}async getBlocks(e){let{blocks:{edges:t,pageInfo:n}}=await this.operations.getBlocks({...this.validatePaginationArgs({paginationLimit:pQ,inputArgs:e})});return{blocks:t.map(({node:i})=>({id:i.id,height:C(i.height),time:i.header.time,header:{applicationHash:i.header.applicationHash,daHeight:C(i.header.daHeight),eventInboxRoot:i.header.eventInboxRoot,messageOutboxRoot:i.header.messageOutboxRoot,prevRoot:i.header.prevRoot,stateTransitionBytecodeVersion:i.header.stateTransitionBytecodeVersion,transactionsCount:i.header.transactionsCount,transactionsRoot:i.header.transactionsRoot},transactionIds:i.transactions.map(a=>a.id)})),pageInfo:n}}async getBlockWithTransactions(e){let t;typeof e=="number"?t={blockHeight:C(e).toString(10)}:e==="latest"?t={blockHeight:(await this.getBlockNumber()).toString()}:t={blockId:e};let{block:n}=await this.operations.getBlockWithTransactions(t);return n?{id:n.id,height:C(n.height,10),time:n.header.time,header:{applicationHash:n.header.applicationHash,daHeight:C(n.header.daHeight),eventInboxRoot:n.header.eventInboxRoot,messageOutboxRoot:n.header.messageOutboxRoot,prevRoot:n.header.prevRoot,stateTransitionBytecodeVersion:n.header.stateTransitionBytecodeVersion,transactionsCount:n.header.transactionsCount,transactionsRoot:n.header.transactionsRoot},transactionIds:n.transactions.map(r=>r.id),transactions:n.transactions.map(r=>new Sn().decode(D(r.rawPayload),0)?.[0])}:null}async getTransaction(e){let{transaction:t}=await this.operations.getTransaction({transactionId:e});if(!t)return null;try{return new Sn().decode(D(t.rawPayload),0)?.[0]}catch(n){if(n instanceof y&&n.code===T.UNSUPPORTED_TRANSACTION_TYPE)return console.warn("Unsupported transaction type encountered"),null;throw n}}async getTransactions(e){let{transactions:{edges:t,pageInfo:n}}=await this.operations.getTransactions({...this.validatePaginationArgs({inputArgs:e,paginationLimit:fQ})}),r=new Sn;return{transactions:t.map(({node:{rawPayload:a}})=>{try{return r.decode(D(a),0)[0]}catch(s){if(s instanceof y&&s.code===T.UNSUPPORTED_TRANSACTION_TYPE)return console.warn("Unsupported transaction type encountered"),null;throw s}}).filter(a=>a!==null),pageInfo:n}}async getContract(e){let{contract:t}=await this.operations.getContract({contractId:e});return t||null}async getContractBalance(e,t){let{contractBalance:n}=await this.operations.getContractBalance({contract:se.fromAddressOrString(e).toB256(),asset:M(t)});return C(n.amount,10)}async getBalance(e,t){let{balance:n}=await this.operations.getBalance({owner:se.fromAddressOrString(e).toB256(),assetId:M(t)});return C(n.amount,10)}async getBalances(e){let{balances:{edges:t}}=await this.operations.getBalances({first:1e4,filter:{owner:se.fromAddressOrString(e).toB256()}});return{balances:t.map(({node:r})=>({assetId:r.assetId,amount:C(r.amount)}))}}async getMessages(e,t){let{messages:{edges:n,pageInfo:r}}=await this.operations.getMessages({...this.validatePaginationArgs({inputArgs:t,paginationLimit:ex}),owner:se.fromAddressOrString(e).toB256()});return{messages:n.map(({node:a})=>({messageId:qr.getMessageId({sender:a.sender,recipient:a.recipient,nonce:a.nonce,amount:C(a.amount),data:a.data}),sender:se.fromAddressOrString(a.sender),recipient:se.fromAddressOrString(a.recipient),nonce:a.nonce,amount:C(a.amount),data:qr.decodeData(a.data),daHeight:C(a.daHeight)})),pageInfo:r}}async getMessageProof(e,t,n,r){let i={transactionId:e,nonce:t};if(n&&r)throw new y(T.INVALID_INPUT_PARAMETERS,"commitBlockId and commitBlockHeight cannot be used together");n&&(i={...i,commitBlockId:n}),r&&(i={...i,commitBlockHeight:r.toNumber().toString()});let a=await this.operations.getMessageProof(i);if(!a.messageProof)return null;let{messageProof:s,messageBlockHeader:o,commitBlockHeader:c,blockProof:u,sender:d,recipient:p,amount:h,data:_}=a.messageProof;return{messageProof:{proofIndex:C(s.proofIndex),proofSet:s.proofSet},blockProof:{proofIndex:C(u.proofIndex),proofSet:u.proofSet},messageBlockHeader:{id:o.id,daHeight:C(o.daHeight),transactionsCount:Number(o.transactionsCount),transactionsRoot:o.transactionsRoot,height:C(o.height),prevRoot:o.prevRoot,time:o.time,applicationHash:o.applicationHash,messageReceiptCount:Number(o.messageReceiptCount),messageOutboxRoot:o.messageOutboxRoot,consensusParametersVersion:Number(o.consensusParametersVersion),eventInboxRoot:o.eventInboxRoot,stateTransitionBytecodeVersion:Number(o.stateTransitionBytecodeVersion)},commitBlockHeader:{id:c.id,daHeight:C(c.daHeight),transactionsCount:Number(c.transactionsCount),transactionsRoot:c.transactionsRoot,height:C(c.height),prevRoot:c.prevRoot,time:c.time,applicationHash:c.applicationHash,messageReceiptCount:Number(c.messageReceiptCount),messageOutboxRoot:c.messageOutboxRoot,consensusParametersVersion:Number(c.consensusParametersVersion),eventInboxRoot:c.eventInboxRoot,stateTransitionBytecodeVersion:Number(c.stateTransitionBytecodeVersion)},sender:se.fromAddressOrString(d),recipient:se.fromAddressOrString(p),nonce:t,amount:C(h),data:_}}async getLatestGasPrice(){let{latestGasPrice:e}=await this.operations.getLatestGasPrice();return C(e.gasPrice)}async estimateGasPrice(e){let{estimateGasPrice:t}=await this.operations.estimateGasPrice({blockHorizon:String(e)});return C(t.gasPrice)}async getMessageStatus(e){return(await this.operations.getMessageStatus({nonce:e})).messageStatus}async produceBlocks(e,t){let{produceBlocks:n}=await this.operations.produceBlocks({blocksToProduce:C(e).toString(10),startTimestamp:t?_d.fromUnixMilliseconds(t).toTai64():void 0});return C(n)}async isUserAccount(e){let{contract:t,blob:n,transaction:r}=await this.operations.isUserAccount({blobId:e,contractId:e,transactionId:e});return!(t||n||r)}async getAddressType(e){let{contract:t,blob:n,transaction:r}=await this.operations.isUserAccount({blobId:e,contractId:e,transactionId:e});return t?"Contract":n?"Blob":r?"Transaction":"Account"}async getTransactionResponse(e){return new wA(e,this)}async getMessageByNonce(e){let{message:t}=await this.operations.getMessageByNonce({nonce:e});return t?{messageId:qr.getMessageId({sender:t.sender,recipient:t.recipient,nonce:t.nonce,amount:C(t.amount),data:t.data}),sender:se.fromAddressOrString(t.sender),recipient:se.fromAddressOrString(t.recipient),nonce:t.nonce,amount:C(t.amount),data:qr.decodeData(t.data),daHeight:C(t.daHeight)}:null}async getRelayedTransactionStatus(e){let{relayedTransactionStatus:t}=await this.operations.getRelayedTransactionStatus({relayedTransactionId:e});return t||null}validatePaginationArgs(e){let{paginationLimit:t,inputArgs:n={}}=e,{first:r,last:i,after:a,before:s}=n;if(a&&s)throw new y(T.INVALID_INPUT_PARAMETERS,'Pagination arguments "after" and "before" cannot be used together');if((r||0)>t||(i||0)>t)throw new y(T.INVALID_INPUT_PARAMETERS,`Pagination limit for this query cannot exceed ${t} items`);if(r&&s)throw new y(T.INVALID_INPUT_PARAMETERS,'The use of pagination argument "first" with "before" is not supported');if(i&&a)throw new y(T.INVALID_INPUT_PARAMETERS,'The use of pagination argument "last" with "after" is not supported');return!r&&!i&&(n.first=t),n}extractDryRunError(e,t,n){let r=n,i=[];return e.abis&&(i=hf(t,e.abis.main,e.abis.otherContractsAbis)),ff({logs:i,receipts:t,statusReason:r.reason})}},cf=pn;EA=new WeakSet;kx=function(e,t){if(!this.cache)return;let n=e.reduce((r,i)=>(i.type===be.Coin?r.utxos.push(i.id):i.type===be.Message&&r.messages.push(i.nonce),r),{utxos:[],messages:[]});this.cache.set(t,n)};$e(cf,"chainInfoCache",{});$e(cf,"nodeInfoCache",{});var oe={eth:{mainnet:1,sepolia:11155111,foundry:31337},fuel:{devnet:0,testnet:0,mainnet:9889}};var gQ="/",_Q=/^\/|\/$/g,AQ=(e="")=>e.replace(_Q,"");function yQ(e,...t){let n=e!=null,r=e?.[0]==="/"&&e.length>1,i=[e,...t].filter(Boolean).map(AQ);return r&&n&&i.unshift(""),i.join(gQ)}function bQ(e,t="./"){return e.map(n=>({...n,icon:yQ(t,n.icon)}))}var vQ="https://cdn.fuel.network/assets/",wQ=[{name:"Ethereum",symbol:"ETH",icon:"eth.svg",networks:[{type:"ethereum",chainId:oe.eth.sepolia,decimals:18},{type:"ethereum",chainId:oe.eth.foundry,decimals:18},{type:"ethereum",chainId:oe.eth.mainnet,decimals:18},{type:"fuel",chainId:oe.fuel.devnet,decimals:9,assetId:"0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"},{type:"fuel",chainId:oe.fuel.testnet,decimals:9,assetId:"0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"},{type:"fuel",chainId:oe.fuel.mainnet,decimals:9,assetId:"0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"}]},{name:"WETH",symbol:"WETH",icon:"weth.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xa38a5a8beeb08d95744bc7f58528073f4052b254def59eba20c99c202b5acaa3",decimals:9}]},{name:"weETH",symbol:"weETH",icon:"weETH.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab",decimals:9}]},{name:"rsETH",symbol:"rsETH",icon:"rsETH.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xbae80f7fb8aa6b90d9b01ef726ec847cc4f59419c4d5f2ea88fec785d1b0e849",decimals:9}]},{name:"rETH",symbol:"rETH",icon:"reth.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xae78736cd615f374d3085123a210448e74fc6393",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xf3f9a0ed0ce8eac5f89d6b83e41b3848212d5b5f56108c54a205bb228ca30c16",decimals:9}]},{name:"wbETH",symbol:"wbETH",icon:"wbeth.png",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xa2E3356610840701BDf5611a53974510Ae27E2e1",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x7843c74bef935e837f2bcf67b5d64ecb46dd53ff86375530b0caf3699e8ffafe",decimals:9}]},{name:"rstETH",symbol:"rstETH",icon:"rstETH.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x7a4EffD87C2f3C55CA251080b1343b605f327E3a",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x962792286fbc9b1d5860b4551362a12249362c21594c77abf4b3fe2bbe8d977a",decimals:9}]},{name:"amphrETH",symbol:"amphrETH",icon:"amphrETH.png",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x5fD13359Ba15A84B76f7F87568309040176167cd",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x05fc623e57bd7bc1258efa8e4f62b05af5471d73df6f2c2dc11ecc81134c4f36",decimals:9}]},{name:"Manta mBTC",symbol:"Manta mBTC",icon:"manta-mbtc.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x4041381e947CFD3D483d67a25C6aa9Dc924250c5",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b",decimals:9}]},{name:"Manta mETH",symbol:"Manta mETH",icon:"manta-meth.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x8CdF550C04Bc9B9F10938368349C9c8051A772b6",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4",decimals:9}]},{name:"Manta mUSD",symbol:"Manta mUSD",icon:"manta-musd.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x3f24E1d7a973867fC2A03fE199E5502514E0e11E",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x89cb9401e55d49c3269654dd1cdfb0e80e57823a4a7db98ba8fc5953b120fef4",decimals:9}]},{name:"pumpBTC",symbol:"pumpBTC",icon:"pumpbtc.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xf469fbd2abcd6b9de8e169d128226c0fc90a012e",decimals:8},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x0aa5eb2bb97ca915288b653a2529355d4dc66de2b37533213f0e4aeee3d3421f",decimals:8}]},{name:"FBTC",symbol:"FBTC",icon:"fbtc.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xc96de26018a54d51c097160568752c4e3bd6c364",decimals:8},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xb5ecb0a1e08e2abbabf624ffea089df933376855f468ade35c6375b00c33996a",decimals:8}]},{name:"SolvBTC",symbol:"SolvBTC",icon:"solvBTC.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x7a56e1c57c7475ccf742a1832b028f0456652f97",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x1186afea9affb88809c210e13e2330b5258c2cef04bb8fff5eff372b7bd3f40f",decimals:9}]},{name:"SolvBTC.BBN",symbol:"SolvBTC.BBN",icon:"SolvBTC.BBN.png",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xd9d920aa40f578ab794426f5c90f6c731d159def",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x7a4f087c957d30218223c2baaaa365355c9ca81b6ea49004cfb1590a5399216f",decimals:9}]},{name:"Mantle mETH",symbol:"Mantle mETH",icon:"mantle-meth.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x642a5db59ec323c2f846d4d4cf3e58d78aff64accf4f8f6455ba0aa3ef000a3b",decimals:9}]},{name:"sDAI",symbol:"sDAI",icon:"sdai.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x83f20f44975d03b1b09e64809b757c47f942beea",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958",decimals:9}]},{name:"USDT",symbol:"USDT",icon:"usdt.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xdAC17F958D2ee523a2206206994597C13D831ec7",decimals:6},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xa0265fb5c32f6e8db3197af3c7eb05c48ae373605b8165b6f4a51c5b0ba4812e",decimals:6}]},{name:"USDC",symbol:"USDC",icon:"usdc.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",decimals:6},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b",decimals:6}]},{name:"USDe",symbol:"USDe",icon:"USDe.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x4c9edd5852cd905f086c759e8383e09bff1e68b3",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xb6133b2ef9f6153eb869125d23dcf20d1e735331b5e41b15a6a7a6cec70e8651",decimals:9}]},{name:"sUSDe",symbol:"sUSDe",icon:"sUSDe.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x9d39a5de30e57443bff2a8307a4256c8797a3497",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xd05563025104fc36496c15c7021ad6b31034b0e89a356f4f818045d1f48808bc",decimals:9}]},{name:"rsUSDe",symbol:"rsUSDe",icon:"rsUSDe.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x82f5104b23FF2FA54C2345F821dAc9369e9E0B26",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x78d4522ec607f6e8efb66ea49439d1ee48623cf763f9688a8eada025def033d9",decimals:9}]},{name:"wstETH",symbol:"wstETH",icon:"wsteth.svg",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x1a7815cc9f75db5c24a5b0814bfb706bb9fe485333e98254015de8f48f84c67b",decimals:9}]},{name:"ezETH",symbol:"ezETH",icon:"ezeth.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xbf5495Efe5DB9ce00f80364C8B423567e58d2110",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0",decimals:9}]},{name:"pzETH",symbol:"pzETH",icon:"pzETH.webp",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x8c9532a60e0e7c6bbd2b2c1303f63ace1c3e9811",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x1493d4ec82124de8f9b625682de69dcccda79e882b89a55a8c737b12de67bd68",decimals:9}]},{name:"Re7LRT",symbol:"Re7LRT",icon:"Re7LRT.png",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0x84631c0d0081FDe56DeB72F6DE77abBbF6A9f93a",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0xf2fc648c23a5db24610a1cf696acc4f0f6d9a7d6028dd9944964ab23f6e35995",decimals:9}]},{name:"steakLRT",symbol:"steakLRT",icon:"steakLRT.png",networks:[{type:"ethereum",chainId:oe.eth.mainnet,address:"0xBEEF69Ac7870777598A04B2bd4771c71212E6aBc",decimals:18},{type:"fuel",chainId:oe.fuel.mainnet,contractId:"0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",assetId:"0x4fc8ac9f101df07e2c2dec4a53c8c42c439bdbe5e36ea2d863a61ff60afafc30",decimals:9}]}],ere=bQ(wQ,vQ),nx=(...e)=>{let t={};function n({amount:r,assetId:i}){t[i]?t[i]=t[i].add(r):t[i]=r}return e.forEach(r=>r.forEach(n)),Object.entries(t).map(([r,i])=>({assetId:r,amount:i}))},EQ=e=>{let{assetId:t,amountToTransfer:n,hexlifiedContractId:r}=e,a=new j("u64").encode(new sr(n).toNumber());return Uint8Array.from([...D(r),...a,...D(t)])},CQ=async e=>{let t=EQ(e);await tn.initWasm();let n=tn.gtf(16,0,tn.GTFArgs.ScriptData),r=tn.addi(17,16,32),i=tn.lw(18,17,0),a=tn.addi(19,17,8),s=tn.tr(16,18,19),o=tn.ret(1);return{script:Uint8Array.from([...n.to_bytes(),...r.to_bytes(),...i.to_bytes(),...a.to_bytes(),...s.to_bytes(),...o.to_bytes()]),scriptData:t}},IQ=5,PA=class extends Nd{address;_provider;_connector;constructor(e,t,n){super(),this._provider=t,this._connector=n,this.address=se.fromDynamicInput(e)}get provider(){if(!this._provider)throw new y(T.MISSING_PROVIDER,"Provider not set");return this._provider}set provider(e){this._provider=e}connect(e){return this._provider=e,this.provider}async getResourcesToSpend(e,t){return this.provider.getResourcesToSpend(this.address,e,t)}async getCoins(e,t){return this.provider.getCoins(this.address,e,t)}async getMessages(e){return this.provider.getMessages(this.address,e)}async getBalance(e){let t=e??this.provider.getBaseAssetId();return await this.provider.getBalance(this.address,t)}async getBalances(){return this.provider.getBalances(this.address)}async fund(e,t){let{addedSignatures:n,estimatedPredicates:r,requiredQuantities:i,updateMaxFee:a,gasPrice:s}=t,o=e.maxFee,c=this.provider.getBaseAssetId(),u=i.find(w=>w.assetId===c)?.amount||C(0),d=X6({amount:C(o),assetId:c,coinQuantities:i}),p={};d.forEach(({amount:w,assetId:x})=>{p[x]={required:w,owned:C(0)}}),e.inputs.filter(dl).forEach(w=>{let R=xo(w)?String(w.assetId):c;p[R]&&(p[R].owned=p[R].owned.add(w.amount))});let h=[];Object.entries(p).forEach(([w,{owned:x,required:R}])=>{x.lt(R)&&h.push({assetId:w,amount:R.sub(x)})});let _=h.length>0,I=0;for(;_&&I<IQ;){let w=await this.getResourcesToSpend(h,A8(e.inputs,this.address));e.addResources(w),e.updatePredicateGasUsed(r);let x=Xe(e);if(n&&Array.from({length:n}).forEach(()=>x.addEmptyWitness()),!a){_=!1;break}let{maxFee:R}=await this.provider.estimateTxGasAndFee({transactionRequest:x,gasPrice:s}),k=_8(e.inputs.filter(dl),c,c),q=u.add(R);k.gt(q)?_=!1:h=[{amount:q.sub(k),assetId:c}],I+=1}if(_)throw new y(T.NOT_ENOUGH_FUNDS,`The account ${this.address} does not have enough base asset funds to cover the transaction execution.`);this.provider.validateTransaction(e),e.updatePredicateGasUsed(r);let v=Xe(e);if(n&&Array.from({length:n}).forEach(()=>v.addEmptyWitness()),!a)return e;let{maxFee:b}=await this.provider.estimateTxGasAndFee({transactionRequest:v});return e.maxFee=b,e}async createTransfer(e,t,n,r={}){let i=new oa(r);return i=this.addTransfer(i,{destination:e,amount:t,assetId:n}),i=await this.estimateAndFundTransaction(i,r),i}async transfer(e,t,n,r={}){let i=await this.createTransfer(e,t,n,r);return this.sendTransaction(i,{estimateTxDependencies:!1})}async batchTransfer(e,t={}){let n=new oa(t);return n=this.addBatchTransfer(n,e),n=await this.estimateAndFundTransaction(n,t),this.sendTransaction(n,{estimateTxDependencies:!1})}addTransfer(e,t){let{destination:n,amount:r,assetId:i}=t;return this.validateTransferAmount(r),e.addCoinOutput(se.fromAddressOrString(n),r,i??this.provider.getBaseAssetId()),e}addBatchTransfer(e,t){let n=this.provider.getBaseAssetId();return t.forEach(({destination:r,amount:i,assetId:a})=>{this.addTransfer(e,{destination:r,amount:i,assetId:a??n})}),e}async transferToContract(e,t,n,r={}){if(C(t).lte(0))throw new y(T.INVALID_TRANSFER_AMOUNT,"Transfer amount must be a positive number.");let i=se.fromAddressOrString(e),a=n??this.provider.getBaseAssetId(),{script:s,scriptData:o}=await CQ({hexlifiedContractId:i.toB256(),amountToTransfer:C(t),assetId:a}),c=new oa({...r,script:s,scriptData:o});c.addContractInputAndOutput(i);let u=await this.getTransactionCost(c,{quantities:[{amount:C(t),assetId:String(a)}]});return c=this.validateGasLimitAndMaxFee({transactionRequest:c,gasUsed:u.gasUsed,maxFee:u.maxFee,txParams:r}),await this.fund(c,u),this.sendTransaction(c)}async withdrawToBaseLayer(e,t,n={}){let r=se.fromAddressOrString(e),i=D("0x".concat(r.toHexString().substring(2).padStart(64,"0"))),a=D("0x".concat(C(t).toHex().substring(2).padStart(16,"0"))),o={script:new Uint8Array([...D(w8.bytes),...i,...a]),...n},c=this.provider.getBaseAssetId(),u=new oa(o),d=[{amount:C(t),assetId:c}],p=await this.getTransactionCost(u,{quantities:d});return u=this.validateGasLimitAndMaxFee({transactionRequest:u,gasUsed:p.gasUsed,maxFee:p.maxFee,txParams:n}),await this.fund(u,p),this.sendTransaction(u)}async getTransactionCost(e,{signatureCallback:t,quantities:n=[]}={}){let r=Xe(qn(e)),i=this.provider.getBaseAssetId(),a=r.getCoinOutputsQuantities(),s=nx(a,n),o=[{assetId:i,amount:C("100000000000000000")}],c=p=>r.inputs.find(h=>h.type===be.Coin?h.assetId===p:wx(h)?i===p:!1),u=(p,h)=>{let _=c(p),I=h;_&&"amount"in _?_.amount=I:r.addResources(this.generateFakeResources([{amount:h,assetId:p}]))};return nx(s,o).forEach(({amount:p,assetId:h})=>u(h,p)),{...await this.provider.getTransactionCost(r,{signatureCallback:t}),requiredQuantities:s}}async signMessage(e){if(!this._connector)throw new y(T.MISSING_CONNECTOR,"A connector is required to sign messages.");return this._connector.signMessage(this.address.toString(),e)}async signTransaction(e){if(!this._connector)throw new y(T.MISSING_CONNECTOR,"A connector is required to sign transactions.");return this._connector.signTransaction(this.address.toString(),e)}async sendTransaction(e,{estimateTxDependencies:t=!0}={}){if(this._connector)return this.provider.getTransactionResponse(await this._connector.sendTransaction(this.address.toString(),e));let n=qn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.sendTransaction(n,{estimateTxDependencies:!1})}async simulateTransaction(e,{estimateTxDependencies:t=!0}={}){let n=qn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.simulate(n,{estimateTxDependencies:!1})}generateFakeResources(e){return e.map(t=>({id:M(Ft(Ya)),owner:this.address,blockCreated:C(1),txCreatedIdx:C(1),...t}))}validateTransferAmount(e){if(C(e).lte(0))throw new y(T.INVALID_TRANSFER_AMOUNT,"Transfer amount must be a positive number.")}async estimateAndFundTransaction(e,t){let n=e,r=await this.getTransactionCost(n);return n=this.validateGasLimitAndMaxFee({transactionRequest:n,gasUsed:r.gasUsed,maxFee:r.maxFee,txParams:t}),n=await this.fund(n,r),n}validateGasLimitAndMaxFee({gasUsed:e,maxFee:t,transactionRequest:n,txParams:{gasLimit:r,maxFee:i}}){let a=qn(n);if(!Un(r))a.gasLimit=e;else if(e.gt(r))throw new y(T.GAS_LIMIT_TOO_LOW,`Gas limit '${r}' is lower than the required: '${e}'.`);if(!Un(i))a.maxFee=t;else if(t.gt(i))throw new y(T.MAX_FEE_TOO_LOW,`Max fee '${i}' is lower than the required: '${t}'.`);return a}},Io=class{address;publicKey;compressedPublicKey;privateKey;constructor(e){typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e=`0x${e}`);let t=un(e,32);this.privateKey=M(t),this.publicKey=M(Ei.getPublicKey(t,!1).slice(1)),this.compressedPublicKey=M(Ei.getPublicKey(t,!0)),this.address=se.fromPublicKey(this.publicKey)}sign(e){let t=Ei.sign(D(e),D(this.privateKey)),n=un(`0x${t.r.toString(16)}`,32),r=un(`0x${t.s.toString(16)}`,32);return r[0]|=(t.recovery||0)<<7,M(re([n,r]))}addPoint(e){let t=Ei.ProjectivePoint.fromHex(D(this.compressedPublicKey)),n=Ei.ProjectivePoint.fromHex(D(e));return`0x${t.add(n).toHex(!0)}`}static recoverPublicKey(e,t){let n=D(t),r=n.slice(0,32),i=n.slice(32,64),a=(i[0]&128)>>7;i[0]&=127;let o=new Ei.Signature(BigInt(M(r)),BigInt(M(i))).addRecoveryBit(a).recoverPublicKey(D(e)).toRawBytes(!1).slice(1);return M(o)}static recoverAddress(e,t){return se.fromPublicKey(Io.recoverPublicKey(e,t))}static generatePrivateKey(e){return e?Gt(re([Ft(32),D(e)])):Ft(32)}static extendPublicKey(e){let t=Ei.ProjectivePoint.fromHex(D(e));return M(t.toRawBytes(!1).slice(1))}},rx=13,ix=8,ax=1,fA=32,SQ=16,sx=e=>/^0x/.test(e)?e.slice(2):e;async function xQ(e,t,n){let r=ur(sx(e),"hex"),i=se.fromAddressOrString(t),a=Ft(fA),s=am({password:ur(n),salt:a,dklen:fA,n:2**rx,r:ix,p:ax}),o=Ft(SQ),c=await I0(r,s,o),u=Uint8Array.from([...s.subarray(16,32),...c]),d=sm(u),p=Ws(d,"hex"),h={id:T0(),version:3,address:sx(i.toHexString()),crypto:{cipher:"aes-128-ctr",mac:p,cipherparams:{iv:Ws(o,"hex")},ciphertext:Ws(c,"hex"),kdf:"scrypt",kdfparams:{dklen:fA,n:2**rx,p:ax,r:ix,salt:Ws(a,"hex")}}};return JSON.stringify(h)}async function TQ(e,t){let n=JSON.parse(e),{crypto:{mac:r,ciphertext:i,cipherparams:{iv:a},kdfparams:{dklen:s,n:o,r:c,p:u,salt:d}}}=n,p=ur(i,"hex"),h=ur(a,"hex"),_=ur(d,"hex"),I=ur(t),v=am({password:I,salt:_,n:o,p:u,r:c,dklen:s}),b=Uint8Array.from([...v.subarray(16,32),...p]),w=sm(b),x=Ws(w,"hex");if(r!==x)throw new y(T.INVALID_PASSWORD,"Failed to decrypt the keystore wallet, the provided password is incorrect.");let R=await C0(p,v,h);return M(R)}var Bx=class extends PA{signer;constructor(e,t){let n=new Io(e);super(n.address,t),this.signer=()=>n}get privateKey(){return this.signer().privateKey}get publicKey(){return this.signer().publicKey}async signMessage(e){let t=await this.signer().sign(R0(e));return M(t)}async signTransaction(e){let t=qn(e),n=this.provider.getChainId(),r=t.getTransactionId(n),i=await this.signer().sign(r);return M(i)}async populateTransactionWitnessesSignature(e){let t=qn(e),n=await this.signTransaction(t);return t.updateWitnessByOwner(this.address,n),t}async sendTransaction(e,{estimateTxDependencies:t=!1}={}){let n=qn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.sendTransaction(await this.populateTransactionWitnessesSignature(n),{estimateTxDependencies:!1})}async simulateTransaction(e,{estimateTxDependencies:t=!0}={}){let n=qn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.dryRun(await this.populateTransactionWitnessesSignature(n),{utxoValidation:!0,estimateTxDependencies:!1})}async encrypt(e){return xQ(this.privateKey,this.address,e)}};$e(Bx,"defaultPath","m/44'/1179993420'/0'/0/0");var nf=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];function NQ(e){return(1<<e)-1}function Ox(e){return(1<<e)-1<<8-e}function pA(e){return Array.isArray(e)?e:e.split(/\s+/)}function RQ(e){return Array.isArray(e)?e.join(" "):e}function kQ(e){let t=[0],n=11;for(let a=0;a<e.length;a+=1)n>8?(t[t.length-1]<<=8,t[t.length-1]|=e[a],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=e[a]>>8-n,t.push(e[a]&NQ(8-n)),n+=3);let r=e.length/4,i=D(at(e))[0]&Ox(r);return t[t.length-1]<<=r,t[t.length-1]|=i>>8-r,t}function BQ(e,t){let n=Math.ceil(11*e.length/8),r=D(new Uint8Array(n)),i=0;for(let u=0;u<e.length;u+=1){let d=t.indexOf(e[u].normalize("NFKD"));if(d===-1)throw new y(T.INVALID_MNEMONIC,`Invalid mnemonic: the word '${e[u]}' is not found in the provided wordlist.`);for(let p=0;p<11;p+=1)d&1<<10-p&&(r[i>>3]|=1<<7-i%8),i+=1}let a=32*e.length/3,s=e.length/3,o=Ox(s);if((D(at(r.slice(0,a/8)))[0]&o)!==(r[r.length-1]&o))throw new y(T.INVALID_CHECKSUM,"Checksum validation failed for the provided mnemonic.");return r.slice(0,a/8)}var OQ=Ur("Bitcoin seed"),PQ="0x0488ade4",DQ="0x04358394",ox=[12,15,18,21,24];function cx(e){if(e.length!==2048)throw new y(T.INVALID_WORD_LIST,`Expected word list length of 2048, but got ${e.length}.`)}function MQ(e){if(e.length%4!==0||e.length<16||e.length>32)throw new y(T.INVALID_ENTROPY,`Entropy should be between 16 and 32 bytes and a multiple of 4, but got ${e.length} bytes.`)}function hA(e){if(!ox.includes(e.length)){let t=`Invalid mnemonic size. Expected one of [${ox.join(", ")}] words, but got ${e.length}.`;throw new y(T.INVALID_MNEMONIC,t)}}var ia=class{wordlist;constructor(e=nf){this.wordlist=e,cx(this.wordlist)}mnemonicToEntropy(e){return ia.mnemonicToEntropy(e,this.wordlist)}entropyToMnemonic(e){return ia.entropyToMnemonic(e,this.wordlist)}static mnemonicToEntropy(e,t=nf){let n=pA(e);return hA(n),M(BQ(n,t))}static entropyToMnemonic(e,t=nf){let n=D(e);return cx(t),MQ(n),kQ(n).map(r=>t[r]).join(" ")}static mnemonicToSeed(e,t=""){hA(pA(e));let n=Ur(RQ(e)),r=Ur(`mnemonic${t}`);return S0(n,r,2048,64,"sha512")}static mnemonicToMasterKeys(e,t=""){let n=ia.mnemonicToSeed(e,t);return ia.masterKeysFromSeed(n)}static isMnemonicValid(e){let t=pA(e),n=0;try{hA(t)}catch{return!1}for(;n<t.length;){if(ia.binarySearch(t[n])===!1)return!1;n+=1}return!0}static binarySearch(e){let t=nf,n=0,r=t.length-1;for(;n<=r;){let i=Math.floor((n+r)/2);if(t[i]===e)return!0;e<t[i]?r=i-1:n=i+1}return!1}static masterKeysFromSeed(e){let t=D(e);if(t.length<16||t.length>64)throw new y(T.INVALID_SEED,`Seed length should be between 16 and 64 bytes, but received ${t.length} bytes.`);return D(Sd("sha512",OQ,t))}static seedToExtendedKey(e,t=!1){let n=ia.masterKeysFromSeed(e),r=D(t?DQ:PQ),i="0x00",a="0x00000000",s="0x00000000",o=n.slice(32),c=n.slice(0,32),u=re([r,i,a,s,o,re(["0x00",c])]),d=Xu(at(at(u)),0,4);return Ad(re([u,d]))}static generate(e=32,t=""){let n=t?at(re([Ft(e),D(t)])):Ft(e);return ia.entropyToMnemonic(n)}},DA=ia,Px=2147483648,Dx=M("0x0488ade4"),MA=M("0x0488b21e"),Mx=M("0x04358394"),FA=M("0x043587cf");function ux(e){return Ad(re([e,Xu(at(at(e)),0,4)]))}function FQ(e=!1,t=!1){return e?t?FA:MA:t?Mx:Dx}function LQ(e){return[MA,FA].includes(M(e.slice(0,4)))}function UQ(e){return[Dx,Mx,MA,FA].includes(M(e.slice(0,4)))}function QQ(e,t=0){let n=e.split("/");if(n.length===0||n[0]==="m"&&t!==0)throw new y(T.HD_WALLET_ERROR,`invalid path - ${e}`);return n[0]==="m"&&n.shift(),n.map(r=>~r.indexOf("'")?parseInt(r,10)+Px:parseInt(r,10))}var Co=class{depth=0;index=0;fingerprint=M("0x00000000");parentFingerprint=M("0x00000000");privateKey;publicKey;chainCode;constructor(e){if(e.privateKey){let t=new Io(e.privateKey);this.publicKey=M(t.compressedPublicKey),this.privateKey=M(e.privateKey)}else{if(!e.publicKey)throw new y(T.HD_WALLET_ERROR,"Both public and private Key cannot be missing. At least one should be provided.");this.publicKey=M(e.publicKey)}this.parentFingerprint=e.parentFingerprint||this.parentFingerprint,this.fingerprint=Xu(x0(at(this.publicKey)),0,4),this.depth=e.depth||this.depth,this.index=e.index||this.index,this.chainCode=e.chainCode}get extendedKey(){return this.toExtendedKey()}deriveIndex(e){let t=this.privateKey&&D(this.privateKey),n=D(this.publicKey),r=D(this.chainCode),i=new Uint8Array(37);if(e&Px){if(!t)throw new y(T.HD_WALLET_ERROR,"Cannot derive a hardened index without a private Key.");i.set(t,1)}else i.set(D(this.publicKey));i.set(un(e,4),33);let a=D(Sd("sha512",r,i)),s=a.slice(0,32),o=a.slice(32);if(t){let d="0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",p=C(s).add(t).mod(d).toBytes(32);return new Co({privateKey:p,chainCode:o,index:e,depth:this.depth+1,parentFingerprint:this.fingerprint})}let u=new Io(M(s)).addPoint(n);return new Co({publicKey:u,chainCode:o,index:e,depth:this.depth+1,parentFingerprint:this.fingerprint})}derivePath(e){return QQ(e,this.depth).reduce((n,r)=>n.deriveIndex(r),this)}toExtendedKey(e=!1,t=!1){if(this.depth>=256)throw new y(T.HD_WALLET_ERROR,`Exceeded max depth of 255. Current depth: ${this.depth}.`);let n=FQ(this.privateKey==null||e,t),r=M(Uint8Array.from([this.depth])),i=this.parentFingerprint,a=Fs(this.index,4),s=this.chainCode,o=this.privateKey!=null&&!e?re(["0x00",this.privateKey]):this.publicKey,c=D(re([n,r,i,a,s,o]));return ux(c)}static fromSeed(e){let t=DA.masterKeysFromSeed(e);return new Co({chainCode:D(t.slice(32)),privateKey:D(t.slice(0,32))})}static fromExtendedKey(e){let t=M(un(zw(e))),n=D(t),r=ux(n.slice(0,78))===e;if(n.length!==82||!UQ(n))throw new y(T.HD_WALLET_ERROR,"Provided key is not a valid extended key.");if(!r)throw new y(T.HD_WALLET_ERROR,"Provided key has an invalid checksum.");let i=n[4],a=M(n.slice(5,9)),s=parseInt(M(n.slice(9,13)).substring(2),16),o=M(n.slice(13,45)),c=n.slice(45,78);if(i===0&&a!=="0x00000000"||i===0&&s!==0)throw new y(T.HD_WALLET_ERROR,"Inconsistency detected: Depth is zero but fingerprint/index is non-zero.");if(LQ(n)){if(c[0]!==3)throw new y(T.HD_WALLET_ERROR,"Invalid public extended key.");return new Co({publicKey:c,chainCode:o,index:s,depth:i,parentFingerprint:a})}if(c[0]!==0)throw new y(T.HD_WALLET_ERROR,"Invalid private extended key.");return new Co({privateKey:c.slice(1),chainCode:o,index:s,depth:i,parentFingerprint:a})}},mA=Co,Fx=class extends PA{unlock(e){return new mn(e,this._provider)}},mn=class extends Bx{lock(){return this.signer=()=>new Io("0x00"),new Fx(this.address,this._provider)}static generate(e){let t=Io.generatePrivateKey(e?.entropy);return new mn(t,e?.provider)}static fromSeed(e,t,n){let i=mA.fromSeed(e).derivePath(t||mn.defaultPath);return new mn(i.privateKey,n)}static fromMnemonic(e,t,n,r){let i=DA.mnemonicToSeed(e,n),s=mA.fromSeed(i).derivePath(t||mn.defaultPath);return new mn(s.privateKey,r)}static fromExtendedKey(e,t){let n=mA.fromExtendedKey(e);return new mn(n.privateKey,t)}static async fromEncryptedJson(e,t,n){let r=await TQ(e,t);return new mn(r,n)}},Wt=class{static fromAddress(e,t){return new Fx(e,t)}static fromPrivateKey(e,t){return new mn(e,t)}};$e(Wt,"generate",mn.generate);$e(Wt,"fromSeed",mn.fromSeed);$e(Wt,"fromMnemonic",mn.fromMnemonic);$e(Wt,"fromExtendedKey",mn.fromExtendedKey);$e(Wt,"fromEncryptedJson",mn.fromEncryptedJson);var VQ=class{storage=new Map;async getItem(e){return await this.storage.get(e)}async setItem(e,t){await this.storage.set(e,t)}async removeItem(e){await this.storage.delete(e)}async clear(){await this.storage.clear()}},cs,Lx=class{constructor(e){sa(this,cs,void 0),$e(this,"pathKey","{}"),$e(this,"rootPath",`m/44'/1179993420'/${this.pathKey}'/0/0`),$e(this,"numberOfAccounts",0),fr(this,cs,e.secret||DA.generate()),this.rootPath=e.rootPath||this.rootPath,this.numberOfAccounts=e.numberOfAccounts||1}getDerivePath(e){return this.rootPath.includes(this.pathKey)?this.rootPath.replace(this.pathKey,String(e)):`${this.rootPath}/${e}`}serialize(){return{secret:tt(this,cs),rootPath:this.rootPath,numberOfAccounts:this.numberOfAccounts}}getAccounts(){let e=[],t=0;do{let n=Wt.fromMnemonic(tt(this,cs),this.getDerivePath(t));e.push({publicKey:n.publicKey,address:n.address}),t+=1}while(t<this.numberOfAccounts);return e}addAccount(){this.numberOfAccounts+=1;let e=Wt.fromMnemonic(tt(this,cs),this.getDerivePath(this.numberOfAccounts-1));return{publicKey:e.publicKey,address:e.address}}exportAccount(e){let t=0,n=se.fromAddressOrString(e);do{let r=Wt.fromMnemonic(tt(this,cs),this.getDerivePath(t));if(r.address.equals(n))return r.privateKey;t+=1}while(t<this.numberOfAccounts);throw new y(T.WALLET_MANAGER_ERROR,`Account with address '${e}' not found in derived wallets.`)}getWallet(e){let t=this.exportAccount(e);return Wt.fromPrivateKey(t)}};cs=new WeakMap;$e(Lx,"type","mnemonic");var aa,Ux=class{constructor(e={}){sa(this,aa,[]),e.secret?fr(this,aa,[e.secret]):fr(this,aa,e.accounts||[Wt.generate().privateKey])}serialize(){return{accounts:tt(this,aa)}}getPublicAccount(e){let t=Wt.fromPrivateKey(e);return{address:t.address,publicKey:t.publicKey}}getAccounts(){return tt(this,aa).map(e=>this.getPublicAccount(e))}addAccount(){let e=Wt.generate();return tt(this,aa).push(e.privateKey),this.getPublicAccount(e.privateKey)}exportAccount(e){let t=se.fromAddressOrString(e),n=tt(this,aa).find(r=>Wt.fromPrivateKey(r).address.equals(t));if(!n)throw new y(T.WALLET_MANAGER_ERROR,`No private key found for address '${e}'.`);return n}getWallet(e){let t=this.exportAccount(e);return Wt.fromPrivateKey(t)}};aa=new WeakMap;$e(Ux,"type","privateKey");var Ii={invalid_vault_type:"The provided Vault type is invalid.",address_not_found:"No private key found for address the specified wallet address.",vault_not_found:"The specified vault was not found.",wallet_not_unlocked:"The wallet is currently locked.",passphrase_not_match:"The provided passphrase did not match the expected value."};function Si(e,t){if(!e)throw new y(T.WALLET_MANAGER_ERROR,t)}var hn,us,Zr,CA,Qx,IA,qx,Vx=class extends qQ{constructor(e){super(),sa(this,CA),sa(this,IA),$e(this,"storage",new VQ),$e(this,"STORAGE_KEY","WalletManager"),sa(this,hn,[]),sa(this,us,""),sa(this,Zr,!0),this.storage=e?.storage||this.storage}get isLocked(){return tt(this,Zr)}exportVault(e){Si(!tt(this,Zr),Ii.wallet_not_unlocked);let t=tt(this,hn).find((n,r)=>r===e);return Si(t,Ii.vault_not_found),t.vault.serialize()}getVaults(){return tt(this,hn).map((e,t)=>({title:e.title,type:e.type,vaultId:t}))}getAccounts(){return tt(this,hn).flatMap((e,t)=>e.vault.getAccounts().map(n=>({...n,vaultId:t})))}getWallet(e){let t=se.fromAddressOrString(e),n=tt(this,hn).find(r=>r.vault.getAccounts().find(i=>i.address.equals(t)));return Si(n,Ii.address_not_found),n.vault.getWallet(t)}exportPrivateKey(e){let t=se.fromAddressOrString(e);Si(!tt(this,Zr),Ii.wallet_not_unlocked);let n=tt(this,hn).find(r=>r.vault.getAccounts().find(i=>i.address.equals(t)));return Si(n,Ii.address_not_found),n.vault.exportAccount(t)}async addAccount(e){await this.loadState();let t=tt(this,hn)[e?.vaultId||0];await Si(t,Ii.vault_not_found);let n=t.vault.addAccount();return await this.saveState(),n}async removeVault(e){tt(this,hn).splice(e,1),await this.saveState()}async addVault(e){await this.loadState();let t=this.getVaultClass(e.type),n=new t(e);fr(this,hn,tt(this,hn).concat({title:e.title,type:e.type,vault:n})),await this.saveState()}lock(){fr(this,Zr,!0),fr(this,hn,[]),fr(this,us,""),this.emit("lock")}async unlock(e){fr(this,us,e),fr(this,Zr,!1);try{await this.loadState(),this.emit("unlock")}catch(t){throw await this.lock(),t}}async updatePassphrase(e,t){let n=tt(this,Zr);await this.unlock(e),fr(this,us,t),await this.saveState(),await this.loadState(),n&&await this.lock()}async loadState(){await Si(!tt(this,Zr),Ii.wallet_not_unlocked);let e=await this.storage.getItem(this.STORAGE_KEY);if(e){let t=await w0(tt(this,us),JSON.parse(e));fr(this,hn,gA(this,IA,qx).call(this,t.vaults))}}async saveState(){await Si(!tt(this,Zr),Ii.wallet_not_unlocked);let e=await E0(tt(this,us),{vaults:gA(this,CA,Qx).call(this,tt(this,hn))});await this.storage.setItem(this.STORAGE_KEY,JSON.stringify(e)),this.emit("update")}getVaultClass(e){let t=Vx.Vaults.find(n=>n.type===e);return Si(t,Ii.invalid_vault_type),t}},JQ=Vx;hn=new WeakMap;us=new WeakMap;Zr=new WeakMap;CA=new WeakSet;Qx=function(e){return e.map(({title:t,type:n,vault:r})=>({title:t,type:n,data:r.serialize()}))};IA=new WeakSet;qx=function(e){return e.map(({title:t,type:n,data:r})=>{let i=this.getVaultClass(n);return{title:t,type:n,vault:new i(r)}})};$e(JQ,"Vaults",[Lx,Ux]);var zQ=class{constructor(e){throw new y(T.NOT_IMPLEMENTED,"Not implemented.")}serialize(){throw new y(T.NOT_IMPLEMENTED,"Not implemented.")}getAccounts(){throw new y(T.NOT_IMPLEMENTED,"Not implemented.")}addAccount(){throw new y(T.NOT_IMPLEMENTED,"Not implemented.")}exportAccount(e){throw new y(T.NOT_IMPLEMENTED,"Not implemented.")}getWallet(e){throw new y(T.NOT_IMPLEMENTED,"Not implemented.")}};$e(zQ,"type");var Jx=(e=>(e.ping="ping",e.version="version",e.connect="connect",e.disconnect="disconnect",e.isConnected="isConnected",e.accounts="accounts",e.currentAccount="currentAccount",e.signMessage="signMessage",e.sendTransaction="sendTransaction",e.assets="assets",e.addAsset="addAsset",e.addAssets="addAssets",e.networks="networks",e.currentNetwork="currentNetwork",e.addNetwork="addNetwork",e.selectNetwork="selectNetwork",e.addABI="addABI",e.getABI="getABI",e.hasABI="hasABI",e))(Jx||{}),LA=(e=>(e.connectors="connectors",e.currentConnector="currentConnector",e.connection="connection",e.accounts="accounts",e.currentAccount="currentAccount",e.networks="networks",e.currentNetwork="currentNetwork",e.assets="assets",e.abis="abis",e))(LA||{}),HQ="FuelConnector",WQ=class{storage;constructor(e){this.storage=e}async setItem(e,t){this.storage.setItem(e,t)}async getItem(e){return this.storage.getItem(e)}async removeItem(e){this.storage.removeItem(e)}async clear(){this.storage.clear()}},ZQ=class extends GQ{name="";metadata={};connected=!1;installed=!1;external=!0;events=LA;async ping(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async version(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async isConnected(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async accounts(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async connect(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async disconnect(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async signMessage(e,t){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async signTransaction(e,t){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async sendTransaction(e,t){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async currentAccount(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addAssets(e){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addAsset(e){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async assets(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addNetwork(e){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async selectNetwork(e){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async networks(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async currentNetwork(){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addABI(e,t){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async getABI(e){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async hasABI(e){throw new y(y.CODES.NOT_IMPLEMENTED,"Method not implemented.")}on(e,t){return super.on(e,t),this}};function YQ(e,{cache:t,cacheTime:n,key:r}){return async(...i)=>{if(t[r]&&t[r]?.value)return t[r]?.value;clearTimeout(t[r]?.timeout);let a=await e(...i);return t[r]={timeout:Number(setTimeout(()=>{t[r]=null},n)),value:a},a}}function XQ(){let e={};return e.promise=new Promise((t,n)=>{e.reject=n,e.resolve=t}),e}async function rf(e,t=1050){let n=new Promise((r,i)=>{setTimeout(()=>{i(new y(y.CODES.TIMEOUT_EXCEEDED,"Promise timed out"))},t)});return Promise.race([n,e])}var $Q=2e3,KQ=5e3,{warn:jQ}=console,ll=class extends ZQ{_storage=null;_connectors=[];_targetObject=null;_unsubscribes=[];_targetUnsubscribe=()=>{};_pingCache={};_currentConnector;_initializationPromise=null;constructor(e=ll.defaultConfig){super(),this.setMaxListeners(1e3),this._connectors=e.connectors??[],this._targetObject=this.getTargetObject(e.targetObject),this._storage=e.storage===void 0?this.getStorage():e.storage,this.setupMethods(),this._initializationPromise=this.initialize()}async initialize(){try{let e=this.setDefaultConnector();this._targetUnsubscribe=this.setupConnectorListener(),await e}catch{throw new y(T.INVALID_PROVIDER,"Error initializing Fuel Connector")}}async init(){return await this._initializationPromise,this}getTargetObject(e){return e||(typeof window<"u"?window:typeof document<"u"?document:null)}getStorage(){if(typeof window<"u")return new WQ(window.localStorage)}async setDefaultConnector(){let e=await this._storage?.getItem(ll.STORAGE_KEY)||this._connectors[0]?.name;if(e)return this.selectConnector(e,{emitEvents:!1})}setupConnectorEvents(e){if(!this._currentConnector)return;let t=this._currentConnector;this._unsubscribes.map(n=>n()),this._unsubscribes=e.map(n=>{let r=(...i)=>this.emit(n,...i);return t.on(n,r),()=>t.off(n,r)})}async callMethod(e,...t){let n=await this.hasConnector();if(await this.pingConnector(),!this._currentConnector||!n)throw new y(T.MISSING_CONNECTOR,`No connector selected for calling ${e}. Use hasConnector before executing other methods.`);if(typeof this._currentConnector[e]=="function")return this._currentConnector[e](...t)}setupMethods(){Object.values(Jx).forEach(e=>{this[e]=async(...t)=>this.callMethod(e,...t)})}async fetchConnectorStatus(e){let t=Date.now(),[n,r]=await Promise.allSettled([rf(e.isConnected()),rf(this.pingConnector(e))]);return t<(e._latestUpdate||0)||(e._latestUpdate=Date.now(),e.installed=r.status==="fulfilled"&&r.value,e.connected=n.status==="fulfilled"&&n.value),{installed:e.installed,connected:e.connected}}async fetchConnectorsStatus(){return Promise.all(this._connectors.map(async e=>this.fetchConnectorStatus(e)))}async pingConnector(e){let t=e||this._currentConnector;if(!t)return!1;try{return await YQ(async()=>rf(t.ping()),{key:t.name,cache:this._pingCache,cacheTime:KQ})()}catch{throw new y(T.INVALID_PROVIDER,"Current connector is not available.")}}setupConnectorListener=()=>{let{_targetObject:e}=this,t=HQ;if(e?.on)return e.on(t,this.addConnector),()=>{e.off?.(t,this.addConnector)};if(e?.addEventListener){let n=r=>{this.addConnector(r.detail)};return e.addEventListener(t,n),()=>{e.removeEventListener?.(t,n)}}return()=>{}};addConnector=async e=>{this.getConnector(e)||this._connectors.push(e),await this.fetchConnectorStatus(e),this.emit(this.events.connectors,this._connectors),this._currentConnector||await this.selectConnector(e.name,{emitEvents:!1})};triggerConnectorEvents=async()=>{let[e,t,n]=await Promise.all([this.isConnected(),this.networks(),this.currentNetwork()]);if(this.emit(this.events.connection,e),this.emit(this.events.networks,t),this.emit(this.events.currentNetwork,n),e){let[r,i]=await Promise.all([this.accounts(),this.currentAccount()]);this.emit(this.events.accounts,r),this.emit(this.events.currentAccount,i)}};getConnector=e=>this._connectors.find(t=>{let n=typeof e=="string"?e:e.name;return t.name===n||t===e})||null;async connectors(){return await this.fetchConnectorsStatus(),this._connectors}async selectConnector(e,t={emitEvents:!0}){let n=this.getConnector(e);if(!n)return!1;if(this._currentConnector?.name===e)return!0;let{installed:r}=await this.fetchConnectorStatus(n);return r?(this._currentConnector=n,this.emit(this.events.currentConnector,n),this.setupConnectorEvents(Object.values(LA)),await this._storage?.setItem(ll.STORAGE_KEY,n.name),t.emitEvents&&this.triggerConnectorEvents(),!0):!1}currentConnector(){return this._currentConnector}async hasConnector(){if(this._currentConnector)return!0;let e=XQ();return this.once(this.events.currentConnector,()=>{e.resolve(!0)}),rf(e.promise,$Q).then(()=>!0).catch(()=>!1)}async hasWallet(){return this.hasConnector()}async getProvider(e){return jQ("getProvider is deprecated and is going to be removed in the future, use getWallet instead."),this._getProvider(e)}async _getProvider(e){let t;if(e&&"getTransactionResponse"in e)t=e;else if(e&&"chainId"in e&&"url"in e)t=await cf.create(e.url);else{if(e)throw new y(T.INVALID_PROVIDER,"Provider is not valid.");{let n=await this.currentNetwork();t=await cf.create(n.url)}}return t}async getWallet(e,t){let n=await this._getProvider(t);return new PA(e,n,this)}unsubscribe(){this._unsubscribes.map(e=>e()),this._targetUnsubscribe(),this.removeAllListeners()}async clean(){await this._storage?.removeItem(ll.STORAGE_KEY)}async destroy(){this.unsubscribe(),await this.clean()}},zx=ll;$e(zx,"STORAGE_KEY","fuel-current-connector");$e(zx,"defaultConfig",{});var Yx=Cn(bo(),1);var Ut=Cn(bo(),1);function Gx(e,t){if(!e)throw new y(T.TRANSACTION_ERROR,t)}function Wx(e){return e.reduce((t,n,r)=>{let{program:i,externalAbis:a}=n.getCallConfig();return r===0?(t.main=i.interface.jsonAbi,t.otherContractsAbis={}):t.otherContractsAbis[i.id.toB256()]=i.interface.jsonAbi,t.otherContractsAbis={...t.otherContractsAbis,...a},t},{})}var Zx=(e,t,n)=>{if(!t)return[];let{main:r,otherContractsAbis:i}=Wx(n);return hf(e,r,i)},QA=class{#e;constructor(...e){this.#e=e||[]}entries(){return this.#e}push(...e){this.#e.push(...e)}concat(e){return this.#e.concat(e)}extend(e){this.#e.push(...e)}toBytes(){return re(this.#e.reduce((e,t)=>(e.push(t.to_bytes()),e),[]))}toHex(){return M(this.toBytes())}toString(){return`Program:
|
|
821
|
+
${JSON.stringify(this.#e,null,2)}`}byteLength(){return this.toBytes().byteLength}},eq=e=>fm+dm({maxInputs:e}),Gie=ue+Za+Td+ue+ue;function tq(e){let t=[...e.receipts],n,r;if(t.forEach(a=>{a.type===fe.ScriptResult?n=a:(a.type===fe.Return||a.type===fe.ReturnData||a.type===fe.Revert)&&(r=a)}),!n||!r)throw new y(T.SCRIPT_REVERTED,"Transaction reverted.");return{code:n.result,gasUsed:n.gasUsed,receipts:t,scriptResultReceipt:n,returnReceipt:r,callResult:e}}function qA(e,t,n=[]){try{let r=tq(e);return t(r)}catch(r){if(r.code===T.SCRIPT_REVERTED){let i=e?.dryRunStatus?.reason;throw ff({logs:n,receipts:e.receipts,statusReason:i})}throw r}}function nq(e,t,n){return qA(e,r=>{if(r.returnReceipt.type===fe.Revert)throw new y(T.SCRIPT_REVERTED,`Script Reverted. Logs: ${JSON.stringify(n)}`);if(r.returnReceipt.type!==fe.Return&&r.returnReceipt.type!==fe.ReturnData){let{type:a}=r.returnReceipt;throw new y(T.SCRIPT_REVERTED,`Script Return Type [${a}] Invalid. Logs: ${JSON.stringify({logs:n,receipt:r.returnReceipt})}`)}let i;return r.returnReceipt.type===fe.Return&&(i=r.returnReceipt.val),r.returnReceipt.type===fe.ReturnData&&(i=t.func.decodeOutput(r.returnReceipt.data)[0]),i},n)}var ml=class{bytes;scriptDataEncoder;scriptResultDecoder;constructor(e,t,n){this.bytes=D(e),this.scriptDataEncoder=t,this.scriptResultDecoder=n}static getScriptDataOffsetWithScriptBytes(e,t){return dm({maxInputs:t})+fm+e}getScriptDataOffset(e){return ml.getScriptDataOffsetWithScriptBytes(this.bytes.length,e)}encodeScriptData(e){let t=this.scriptDataEncoder(e);return ArrayBuffer.isView(t)?t:(this.bytes=D(t.script),t.data)}decodeCallResult(e,t=[]){return qA(e,this.scriptResultDecoder,t)}},Xx={assetIdOffset:0,amountOffset:0,gasForwardedOffset:0,callDataOffset:0},rq=Ne,$x=({callDataOffset:e,gasForwardedOffset:t,amountOffset:n,assetIdOffset:r})=>{let i=new QA(Ut.movi(16,e),Ut.movi(17,n),Ut.lw(17,17,0),Ut.movi(18,r));return t?i.push(Ut.movi(19,t),Ut.lw(19,19,0),Ut.call(16,17,18,19)):i.push(Ut.call(16,17,18,Ut.RegId.cgas().to_u8())),i};function Hx(e){if(!e.length)return new Uint8Array;let t=new QA;for(let n=0;n<e.length;n+=1)t.extend($x(e[n]).entries());return t.push(Ut.ret(1)),t.toBytes()}var iq=e=>e===fe.Return||e===fe.ReturnData,aq=(e,t)=>e.find(({type:n,from:r,to:i})=>n===fe.Call&&r===rq&&i===t),sq=e=>t=>{if(Ln(t.code)!==0)throw new y(T.SCRIPT_REVERTED,"Transaction reverted.");let n=aq(t.receipts,e.toB256()),r=C(n?.is);return t.receipts.filter(({type:a})=>iq(a)).flatMap(a=>r.eq(C(a.is))?a.type===fe.Return?[new j("u64").encode(a.val)]:a.type===fe.ReturnData?[D(a.data)]:[new Uint8Array]:[])},oq=(e,t,n=[])=>qA(e,sq(t),n),cq=e=>e.reduce((t,n)=>{let r={...Xx};return n.gas&&(r.gasForwardedOffset=1),t+$x(r).byteLength()},Ut.Instruction.size()),uq=(e,t)=>new ml(Hx(new Array(e.length).fill(Xx)),n=>{let r=n.length;if(r===0)return{data:new Uint8Array,script:new Uint8Array};let i=cq(n),a=(8-i%8)%8,s=i+a,o=eq(t.toNumber())+s,c=[],u=o,d=[];for(let _=0;_<r;_+=1){let I=n[_],v=u,b=v+ue,w=b+Za,x=w+Td+ue+ue,R=x+I.fnSelectorBytes.byteLength,k=D(I.data),q=0;d.push(new j("u64").encode(I.amount||0)),d.push(new te().encode(I.assetId?.toString()||Ne)),d.push(I.contractId.toBytes()),d.push(new j("u64").encode(x)),d.push(new j("u64").encode(R)),d.push(I.fnSelectorBytes),d.push(k),I.gas&&(d.push(new j("u64").encode(I.gas)),q=R+k.byteLength);let U={amountOffset:v,assetIdOffset:b,gasForwardedOffset:q,callDataOffset:w};c.push(U),u=o+re(d).byteLength}let p=Hx(c);return{data:re(d),script:p}},()=>[new Uint8Array]),Kx=(e,t,n,r)=>{let i=e[0]?.getCallConfig();if(e.length===1&&i&&"bytes"in i.program)return nq({receipts:t},i,r);let s=oq({receipts:t},(i?.program).id,r).map((o,c)=>{let{func:u}=e[c].getCallConfig();return u.decodeOutput(o)?.[0]});return n?s:s?.[0]},lq=async e=>{let{funcScope:t,isMultiCall:n,program:r,transactionResponse:i}=e,a=await i.waitForResult(),{receipts:s}=a,o=Array.isArray(t)?t:[t],c=o[0]?.getCallConfig(),u=Zx(s,c,o),d=Kx(o,s,n,u),p=pl(s);return{isMultiCall:n,functionScopes:o,value:d,program:r,transactionResult:a,transactionResponse:i,transactionId:i.id,logs:u,gasUsed:p}},UA=e=>{let{funcScopes:t,callResult:n,isMultiCall:r}=e,{receipts:i}=n,a=Array.isArray(t)?t:[t],s=a[0]?.getCallConfig(),o=Zx(i,s,a),c=Kx(a,i,r,o),u=pl(i);return{functionScopes:a,callResult:n,isMultiCall:r,gasUsed:u,value:c}};function dq(e){let{program:t,args:n,forward:r,func:i,callParameters:a,externalAbis:s}=e.getCallConfig(),o=i.encodeArguments(n);return{contractId:t.id,fnSelectorBytes:i.selectorBytes,data:o,assetId:r?.assetId,amount:r?.amount,gas:a?.gasLimit,externalContractsAbis:s}}var jx=class{transactionRequest;program;functionInvocationScopes=[];txParameters;requiredCoins=[];isMultiCall=!1;hasCallParamsGasLimit=!1;externalAbis={};addSignersCallback;constructor(e,t){this.program=e,this.isMultiCall=t,this.transactionRequest=new oa}get calls(){if(!this.getProvider().getChain())throw new y(y.CODES.CHAIN_INFO_CACHE_EMPTY,"Provider chain info cache is empty. Please make sure to initialize the `Provider` properly by running `await Provider.create()``");return this.functionInvocationScopes.map(n=>dq(n))}updateScriptRequest(){let e=this.getProvider(),{consensusParameters:{txParameters:{maxInputs:t}}}=e.getChain(),n=uq(this.functionInvocationScopes,t);this.transactionRequest.setScript(n,this.calls)}updateContractInputAndOutput(){this.calls.forEach(t=>{t.contractId&&this.transactionRequest.addContractInputAndOutput(t.contractId),t.externalContractsAbis&&Object.keys(t.externalContractsAbis).forEach(n=>this.transactionRequest.addContractInputAndOutput(se.fromB256(n)))})}getRequiredCoins(){return this.calls.map(t=>({assetId:String(t.assetId),amount:C(t.amount||0)})).filter(({assetId:t,amount:n})=>t&&!C(n).isZero())}updateRequiredCoins(){let e=this.getRequiredCoins(),t=(n,{assetId:r,amount:i})=>{let a=n.get(r)?.amount||C(0);return n.set(r,{assetId:String(r),amount:a.add(i)})};this.requiredCoins=Array.from(e.reduce(t,new Map).values())}addCall(e){return this.addCalls([e]),this}addCalls(e){return this.functionInvocationScopes.push(...e),this.updateContractInputAndOutput(),this.updateRequiredCoins(),this}async prepareTransaction(){await Yx.initWasm(),this.updateScriptRequest(),this.updateRequiredCoins(),this.checkGasLimitTotal(),this.transactionRequest.type===Ce.Script&&(this.transactionRequest.abis=Wx(this.functionInvocationScopes))}checkGasLimitTotal(){let e=this.calls.reduce((t,n)=>t.add(n.gas||0),C(0));if(this.transactionRequest.gasLimit.eq(0))this.transactionRequest.gasLimit=e;else if(e.gt(this.transactionRequest.gasLimit))throw new y(T.TRANSACTION_ERROR,"Transaction's gasLimit must be equal to or greater than the combined forwarded gas of all calls.")}async getTransactionCost(){let e=Xe(await this.getTransactionRequest());return(this.program.account??Wt.generate({provider:this.getProvider()})).getTransactionCost(e,{quantities:this.getRequiredCoins(),signatureCallback:this.addSignersCallback})}async fundWithRequiredCoins(){let e=await this.getTransactionRequest();e=Xe(e);let t=await this.getTransactionCost(),{gasUsed:n,missingContractIds:r,outputVariables:i,maxFee:a}=t;return this.setDefaultTxParams(e,n,a),e.inputs=e.inputs.filter(s=>s.type!==be.Coin),r.forEach(s=>{e.addContractInputAndOutput(se.fromString(s))}),e.addVariableOutputs(i),await this.program.account?.fund(e,t),this.addSignersCallback&&await this.addSignersCallback(e),e}txParams(e){this.txParameters=e;let t=this.transactionRequest;return t.tip=C(e.tip||t.tip),t.gasLimit=C(e.gasLimit||t.gasLimit),t.maxFee=e.maxFee?C(e.maxFee):t.maxFee,t.witnessLimit=e.witnessLimit?C(e.witnessLimit):t.witnessLimit,t.maturity=e.maturity||t.maturity,t.addVariableOutputs(this.txParameters?.variableOutputs||0),this}addContracts(e){return e.forEach(t=>{this.transactionRequest.addContractInputAndOutput(t.id),this.externalAbis[t.id.toB256()]=t.interface.jsonAbi}),this}addTransfer(e){let{amount:t,destination:n,assetId:r}=e,i=this.getProvider().getBaseAssetId();return this.transactionRequest=this.transactionRequest.addCoinOutput(se.fromAddressOrString(n),t,r||i),this}addBatchTransfer(e){let t=this.getProvider().getBaseAssetId();return e.forEach(({destination:n,amount:r,assetId:i})=>{this.transactionRequest=this.transactionRequest.addCoinOutput(se.fromAddressOrString(n),r,i||t)}),this}addSigners(e){return this.addSignersCallback=async t=>t.addAccountWitnesses(e),this}async getTransactionRequest(){return await this.prepareTransaction(),this.transactionRequest}async call(){Gx(this.program.account,"Wallet is required!");let e=await this.fundWithRequiredCoins(),t=await this.program.account.sendTransaction(e,{estimateTxDependencies:!1});return{transactionId:t.id,waitForResult:async()=>lq({funcScope:this.functionInvocationScopes,isMultiCall:this.isMultiCall,program:this.program,transactionResponse:t})}}async simulate(){if(Gx(this.program.account,"Wallet is required!"),!("populateTransactionWitnessesSignature"in this.program.account))throw new y(T.ABI_MAIN_METHOD_MISSING,"An unlocked wallet is required to simulate a contract call.");let e=await this.fundWithRequiredCoins(),t=await this.program.account.simulateTransaction(e,{estimateTxDependencies:!1});return UA({funcScopes:this.functionInvocationScopes,callResult:t,isMultiCall:this.isMultiCall})}async dryRun(){let{receipts:e}=await this.getTransactionCost(),t={receipts:e};return UA({funcScopes:this.functionInvocationScopes,callResult:t,isMultiCall:this.isMultiCall})}async get(){let{receipts:e}=await this.getTransactionCost(),t={receipts:e};return UA({funcScopes:this.functionInvocationScopes,callResult:t,isMultiCall:this.isMultiCall})}getProvider(){return this.program.provider}async getTransactionId(e){let t=e??await this.getProvider().getChainId();return(await this.getTransactionRequest()).getTransactionId(t)}setDefaultTxParams(e,t,n){let r=Un(this.txParameters?.gasLimit)||this.hasCallParamsGasLimit,i=Un(this.txParameters?.maxFee),{gasLimit:a,maxFee:s}=e;if(!r)e.gasLimit=t;else if(a.lt(t))throw new y(T.GAS_LIMIT_TOO_LOW,`Gas limit '${a}' is lower than the required: '${t}'.`);if(!i)e.maxFee=n;else if(n.gt(s))throw new y(T.MAX_FEE_TOO_LOW,`Max fee '${s}' is lower than the required: '${n}'.`)}},eT=class extends jx{func;callParameters;forward;args;constructor(e,t,n){super(e,!1),this.func=t,this.args=n||[],this.setArguments(...n),super.addCall(this)}getCallConfig(){return{func:this.func,program:this.program,callParameters:this.callParameters,txParameters:this.txParameters,forward:this.forward,args:this.args,externalAbis:this.externalAbis}}setArguments(...e){return this.args=e||[],this}callParams(e){if(!this.hasCallParamsGasLimit&&e?.gasLimit!==void 0&&(this.hasCallParamsGasLimit=!0),this.callParameters=e,e?.forward){if(!this.func.attributes.find(t=>t.name==="payable"))throw new y(T.TRANSACTION_ERROR,`The target function ${this.func.name} cannot accept forwarded funds as it's not marked as 'payable'.`);this.forward=uf(e.forward)}return this.setArguments(...this.args),this.updateRequiredCoins(),this}},fq=class extends jx{constructor(e,t){super(e,!0),this.addCalls(t)}addCall(e){return super.addCalls([e])}addCalls(e){return super.addCalls(e)}},pq=class{id;provider;interface;account;functions={};constructor(e,t,n){this.interface=t instanceof Qn?t:new Qn(t),this.id=se.fromAddressOrString(e),n&&"provider"in n?(this.provider=n.provider,this.account=n):(this.provider=n,this.account=null),Object.keys(this.interface.functions).forEach(r=>{let i=this.interface.getFunction(r);Object.defineProperty(this.functions,i.name,{value:this.buildFunction(i),writable:!1})})}buildFunction(e){return(()=>{let t=(...n)=>new eT(this,e,n);return Object.defineProperty(t,"isReadOnly",{value:()=>e.isReadOnly(),writable:!1}),t})()}multiCall(e){return new fq(this,e)}getBalance(e){return this.provider.getContractBalance(this.id,e)}};var lae=new ml("0x24000000",()=>new Uint8Array(0),()=>{});var Yr=Cn(bo(),1);var ca=Cn(bo(),1);var hq=Object.defineProperty,mq=(e,t)=>{for(var n in t)hq(e,n,{get:t[n],enumerable:!0})};var gq={};mq(gq,{getContractId:()=>Aq,getContractRoot:()=>tT,getContractStorageRoot:()=>_q,hexlifyWithPrefix:()=>yq});var tT=e=>{let n=D(e),r=Xh(n,16384);return dA(r.map(i=>M(i)))},_q=e=>{let t=new HS;return e.forEach(({key:n,value:r})=>t.update(at(n),r)),t.root},Aq=(e,t,n)=>{let r=tT(D(e));return at(re(["0x4655454C",t,r,n]))},yq=e=>M(e.startsWith("0x")?e:`0x${e}`);BigInt.prototype.asBigDecimal=function(){return new Jt(this.toString())};BigInt.prototype.scaleDown=function(e){return VA(this,e)};sr.prototype.asBigDecimal=function(){return new Jt(this.toString(10))};sr.prototype.scaleDown=function(e){return VA(BigInt(this.toString(10)),e)};function VA(e,t){let n=new Jt(10).pow(Number(t));return e.asBigDecimal().dividedBy(n)}import("process").then(e=>e.stdout.write(""));var Vn=null;try{Vn=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Ke(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Ke.prototype.__isLong__;Object.defineProperty(Ke.prototype,"__isLong__",{value:!0});function Zt(e){return(e&&e.__isLong__)===!0}function nT(e){var t=Math.clz32(e&-e);return e?31-t:t}Ke.isLong=Zt;var rT={},iT={};function ls(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=iT[e],r)?r:(n=Le(e,0,!0),i&&(iT[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=rT[e],r)?r:(n=Le(e,e<0?-1:0,!1),i&&(rT[e]=n),n))}Ke.fromInt=ls;function Jn(e,t){if(isNaN(e))return t?xi:pr;if(t){if(e<0)return xi;if(e>=cT)return dT}else{if(e<=-sT)return gn;if(e+1>=sT)return lT}return e<0?Jn(-e,t).neg():Le(e%ko|0,e/ko|0,t)}Ke.fromNumber=Jn;function Le(e,t,n){return new Ke(e,t,n)}Ke.fromBits=Le;var mf=Math.pow;function zA(e,t,n){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(n=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?xi:pr;if(n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return zA(e.substring(1),t,n).neg();for(var i=Jn(mf(n,8)),a=pr,s=0;s<e.length;s+=8){var o=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+o),n);if(o<8){var u=Jn(mf(n,o));a=a.mul(u).add(Jn(c))}else a=a.mul(i),a=a.add(Jn(c))}return a.unsigned=t,a}Ke.fromString=zA;function hr(e,t){return typeof e=="number"?Jn(e,t):typeof e=="string"?zA(e,t):Le(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ke.fromValue=hr;var aT=65536,bq=1<<24,ko=aT*aT,cT=ko*ko,sT=cT/2,oT=ls(bq),pr=ls(0);Ke.ZERO=pr;var xi=ls(0,!0);Ke.UZERO=xi;var Ro=ls(1);Ke.ONE=Ro;var uT=ls(1,!0);Ke.UONE=uT;var JA=ls(-1);Ke.NEG_ONE=JA;var lT=Le(-1,2147483647,!1);Ke.MAX_VALUE=lT;var dT=Le(-1,-1,!0);Ke.MAX_UNSIGNED_VALUE=dT;var gn=Le(0,-2147483648,!1);Ke.MIN_VALUE=gn;var G=Ke.prototype;G.toInt=function(){return this.unsigned?this.low>>>0:this.low};G.toNumber=function(){return this.unsigned?(this.high>>>0)*ko+(this.low>>>0):this.high*ko+(this.low>>>0)};G.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(gn)){var n=Jn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=Jn(mf(t,6),this.unsigned),s=this,o="";;){var c=s.div(a),u=s.sub(c.mul(a)).toInt()>>>0,d=u.toString(t);if(s=c,s.isZero())return d+o;for(;d.length<6;)d="0"+d;o=""+d+o}};G.getHighBits=function(){return this.high};G.getHighBitsUnsigned=function(){return this.high>>>0};G.getLowBits=function(){return this.low};G.getLowBitsUnsigned=function(){return this.low>>>0};G.getNumBitsAbs=function(){if(this.isNegative())return this.eq(gn)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return this.high!=0?n+33:n+1};G.isZero=function(){return this.high===0&&this.low===0};G.eqz=G.isZero;G.isNegative=function(){return!this.unsigned&&this.high<0};G.isPositive=function(){return this.unsigned||this.high>=0};G.isOdd=function(){return(this.low&1)===1};G.isEven=function(){return(this.low&1)===0};G.equals=function(t){return Zt(t)||(t=hr(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};G.eq=G.equals;G.notEquals=function(t){return!this.eq(t)};G.neq=G.notEquals;G.ne=G.notEquals;G.lessThan=function(t){return this.comp(t)<0};G.lt=G.lessThan;G.lessThanOrEqual=function(t){return this.comp(t)<=0};G.lte=G.lessThanOrEqual;G.le=G.lessThanOrEqual;G.greaterThan=function(t){return this.comp(t)>0};G.gt=G.greaterThan;G.greaterThanOrEqual=function(t){return this.comp(t)>=0};G.gte=G.greaterThanOrEqual;G.ge=G.greaterThanOrEqual;G.compare=function(t){if(Zt(t)||(t=hr(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1};G.comp=G.compare;G.negate=function(){return!this.unsigned&&this.eq(gn)?gn:this.not().add(Ro)};G.neg=G.negate;G.add=function(t){Zt(t)||(t=hr(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,a=this.low&65535,s=t.high>>>16,o=t.high&65535,c=t.low>>>16,u=t.low&65535,d=0,p=0,h=0,_=0;return _+=a+u,h+=_>>>16,_&=65535,h+=i+c,p+=h>>>16,h&=65535,p+=r+o,d+=p>>>16,p&=65535,d+=n+s,d&=65535,Le(h<<16|_,d<<16|p,this.unsigned)};G.subtract=function(t){return Zt(t)||(t=hr(t)),this.add(t.neg())};G.sub=G.subtract;G.multiply=function(t){if(this.isZero())return this;if(Zt(t)||(t=hr(t)),Vn){var n=Vn.mul(this.low,this.high,t.low,t.high);return Le(n,Vn.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?xi:pr;if(this.eq(gn))return t.isOdd()?gn:pr;if(t.eq(gn))return this.isOdd()?gn:pr;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(oT)&&t.lt(oT))return Jn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,a=this.low>>>16,s=this.low&65535,o=t.high>>>16,c=t.high&65535,u=t.low>>>16,d=t.low&65535,p=0,h=0,_=0,I=0;return I+=s*d,_+=I>>>16,I&=65535,_+=a*d,h+=_>>>16,_&=65535,_+=s*u,h+=_>>>16,_&=65535,h+=i*d,p+=h>>>16,h&=65535,h+=a*u,p+=h>>>16,h&=65535,h+=s*c,p+=h>>>16,h&=65535,p+=r*d+i*u+a*c+s*o,p&=65535,Le(_<<16|I,p<<16|h,this.unsigned)};G.mul=G.multiply;G.divide=function(t){if(Zt(t)||(t=hr(t)),t.isZero())throw Error("division by zero");if(Vn){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?Vn.div_u:Vn.div_s)(this.low,this.high,t.low,t.high);return Le(n,Vn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?xi:pr;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return xi;if(t.gt(this.shru(1)))return uT;a=xi}else{if(this.eq(gn)){if(t.eq(Ro)||t.eq(JA))return gn;if(t.eq(gn))return Ro;var s=this.shr(1);return r=s.div(t).shl(1),r.eq(pr)?t.isNegative()?Ro:JA:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(gn))return this.unsigned?xi:pr;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=pr}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),c=o<=48?1:mf(2,o-48),u=Jn(r),d=u.mul(t);d.isNegative()||d.gt(i);)r-=c,u=Jn(r,this.unsigned),d=u.mul(t);u.isZero()&&(u=Ro),a=a.add(u),i=i.sub(d)}return a};G.div=G.divide;G.modulo=function(t){if(Zt(t)||(t=hr(t)),Vn){var n=(this.unsigned?Vn.rem_u:Vn.rem_s)(this.low,this.high,t.low,t.high);return Le(n,Vn.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};G.mod=G.modulo;G.rem=G.modulo;G.not=function(){return Le(~this.low,~this.high,this.unsigned)};G.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};G.clz=G.countLeadingZeros;G.countTrailingZeros=function(){return this.low?nT(this.low):nT(this.high)+32};G.ctz=G.countTrailingZeros;G.and=function(t){return Zt(t)||(t=hr(t)),Le(this.low&t.low,this.high&t.high,this.unsigned)};G.or=function(t){return Zt(t)||(t=hr(t)),Le(this.low|t.low,this.high|t.high,this.unsigned)};G.xor=function(t){return Zt(t)||(t=hr(t)),Le(this.low^t.low,this.high^t.high,this.unsigned)};G.shiftLeft=function(t){return Zt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Le(0,this.low<<t-32,this.unsigned)};G.shl=G.shiftLeft;G.shiftRight=function(t){return Zt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Le(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};G.shr=G.shiftRight;G.shiftRightUnsigned=function(t){return Zt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?Le(this.high,0,this.unsigned):Le(this.high>>>t-32,0,this.unsigned)};G.shru=G.shiftRightUnsigned;G.shr_u=G.shiftRightUnsigned;G.rotateLeft=function(t){var n;return Zt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Le(this.high,this.low,this.unsigned):t<32?(n=32-t,Le(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(t-=32,n=32-t,Le(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))};G.rotl=G.rotateLeft;G.rotateRight=function(t){var n;return Zt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Le(this.high,this.low,this.unsigned):t<32?(n=32-t,Le(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(t-=32,n=32-t,Le(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))};G.rotr=G.rotateRight;G.toSigned=function(){return this.unsigned?Le(this.low,this.high,!1):this};G.toUnsigned=function(){return this.unsigned?this:Le(this.low,this.high,!0)};G.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};G.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};G.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};Ke.fromBytes=function(t,n,r){return r?Ke.fromBytesLE(t,n):Ke.fromBytesBE(t,n)};Ke.fromBytesLE=function(t,n){return new Ke(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)};Ke.fromBytesBE=function(t,n){return new Ke(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Ti=Ke;var A=Cn(Oo(),1);var wf=Cn(Oo(),1);function r1(){return{}}var yl={encode(e,t=wf.default.Writer.create()){return t},decode(e,t){let n=e instanceof wf.default.Reader?e:wf.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=r1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return yl.fromPartial(e??{})},fromPartial(e){return r1()}};var Rn=Cn(Oo(),1),ps;(function(e){e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ps||(ps={}));function Rq(e){switch(e){case 0:case"NULL_VALUE":return ps.NULL_VALUE;case-1:case"UNRECOGNIZED":default:return ps.UNRECOGNIZED}}function kq(e){switch(e){case ps.NULL_VALUE:return"NULL_VALUE";case ps.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function oy(){return{fields:{}}}var P={encode(e,t=Rn.default.Writer.create()){return Object.entries(e.fields).forEach(([n,r])=>{r!==void 0&&ly.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof Rn.default.Reader?e:Rn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=oy();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=ly.decode(n,n.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{fields:a1(e.fields)?Object.entries(e.fields).reduce((t,[n,r])=>(t[n]=r,t),{}):{}}},toJSON(e){let t={};if(e.fields){let n=Object.entries(e.fields);n.length>0&&(t.fields={},n.forEach(([r,i])=>{t.fields[r]=i}))}return t},create(e){return P.fromPartial(e??{})},fromPartial(e){let t=oy();return t.fields=Object.entries(e.fields??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=i),n),{}),t},wrap(e){let t=oy();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function i1(){return{key:"",value:void 0}}var ly={encode(e,t=Rn.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&Ni.encode(Ni.wrap(e.value),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof Rn.default.Reader?e:Rn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=i1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=Ni.unwrap(Ni.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:Po(e.key)?globalThis.String(e.key):"",value:Po(e?.value)?e.value:void 0}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==void 0&&(t.value=e.value),t},create(e){return ly.fromPartial(e??{})},fromPartial(e){let t=i1();return t.key=e.key??"",t.value=e.value??void 0,t}};function cy(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var Ni={encode(e,t=Rn.default.Writer.create()){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&P.encode(P.wrap(e.structValue),t.uint32(42).fork()).ldelim(),e.listValue!==void 0&&Kr.encode(Kr.wrap(e.listValue),t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof Rn.default.Reader?e:Rn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=cy();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.nullValue=n.int32();continue;case 2:if(a!==17)break;i.numberValue=n.double();continue;case 3:if(a!==26)break;i.stringValue=n.string();continue;case 4:if(a!==32)break;i.boolValue=n.bool();continue;case 5:if(a!==42)break;i.structValue=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.listValue=Kr.unwrap(Kr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{nullValue:Po(e.nullValue)?Rq(e.nullValue):void 0,numberValue:Po(e.numberValue)?globalThis.Number(e.numberValue):void 0,stringValue:Po(e.stringValue)?globalThis.String(e.stringValue):void 0,boolValue:Po(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,structValue:a1(e.structValue)?e.structValue:void 0,listValue:globalThis.Array.isArray(e.listValue)?[...e.listValue]:void 0}},toJSON(e){let t={};return e.nullValue!==void 0&&(t.nullValue=kq(e.nullValue)),e.numberValue!==void 0&&(t.numberValue=e.numberValue),e.stringValue!==void 0&&(t.stringValue=e.stringValue),e.boolValue!==void 0&&(t.boolValue=e.boolValue),e.structValue!==void 0&&(t.structValue=e.structValue),e.listValue!==void 0&&(t.listValue=e.listValue),t},create(e){return Ni.fromPartial(e??{})},fromPartial(e){let t=cy();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=cy();if(e===null)t.nullValue=ps.NULL_VALUE;else if(typeof e=="boolean")t.boolValue=e;else if(typeof e=="number")t.numberValue=e;else if(typeof e=="string")t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e=="object")t.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function uy(){return{values:[]}}var Kr={encode(e,t=Rn.default.Writer.create()){for(let n of e.values)Ni.encode(Ni.wrap(n),t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof Rn.default.Reader?e:Rn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=uy();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.values.push(Ni.unwrap(Ni.decode(n,n.uint32())));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?[...e.values]:[]}},toJSON(e){let t={};return e.values?.length&&(t.values=e.values),t},create(e){return Kr.fromPartial(e??{})},fromPartial(e){let t=uy();return t.values=e.values?.map(n=>n)||[],t},wrap(e){let t=uy();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}};function a1(e){return typeof e=="object"&&e!==null}function Po(e){return e!=null}var hs=Cn(Oo(),1);function s1(){return{seconds:BigInt("0"),nanos:0}}var ke={encode(e,t=hs.default.Writer.create()){if(e.seconds!==BigInt("0")){if(BigInt.asIntN(64,e.seconds)!==e.seconds)throw new globalThis.Error("value provided for field message.seconds of type int64 too large");t.uint32(8).int64(e.seconds.toString())}return e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof hs.default.Reader?e:hs.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=s1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.seconds=Bq(n.int64());continue;case 2:if(a!==16)break;i.nanos=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{seconds:o1(e.seconds)?BigInt(e.seconds):BigInt("0"),nanos:o1(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==BigInt("0")&&(t.seconds=e.seconds.toString()),e.nanos!==0&&(t.nanos=Math.round(e.nanos)),t},create(e){return ke.fromPartial(e??{})},fromPartial(e){let t=s1();return t.seconds=e.seconds??BigInt("0"),t.nanos=e.nanos??0,t}};function Bq(e){return BigInt(e.toString())}hs.default.util.Long!==Ti&&(hs.default.util.Long=Ti,hs.default.configure());function o1(e){return e!=null}var Qe=Cn(Oo(),1);var c1;(function(e){e[e.FREE=0]="FREE",e[e.DEV=1]="DEV",e[e.PRO=2]="PRO",e[e.ENTERPRISE=3]="ENTERPRISE",e[e.ANONYMOUS=16]="ANONYMOUS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(c1||(c1={}));var u1;(function(e){e[e.ORG_MEMBER=0]="ORG_MEMBER",e[e.ORG_ADMIN=1]="ORG_ADMIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(u1||(u1={}));var l1;(function(e){e[e.AND=0]="AND",e[e.OR=1]="OR",e[e.THEN=2]="THEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(l1||(l1={}));var d1;(function(e){e[e.READ=0]="READ",e[e.WRITE=1]="WRITE",e[e.ADMIN=2]="ADMIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(d1||(d1={}));var f1;(function(e){e[e.GENERAL=0]="GENERAL",e[e.PROCESSOR_UPLOAD_FAILED=101]="PROCESSOR_UPLOAD_FAILED",e[e.PROCESSOR_UPLOAD_SUCCESS=102]="PROCESSOR_UPLOAD_SUCCESS",e[e.PROCESSOR_OBSOLETED=103]="PROCESSOR_OBSOLETED",e[e.PROCESSOR_STOPPED=104]="PROCESSOR_STOPPED",e[e.PROCESSOR_ACTIVATED=105]="PROCESSOR_ACTIVATED",e[e.PROCESSOR_GENERAL=106]="PROCESSOR_GENERAL",e[e.PROCESSOR_ERROR=107]="PROCESSOR_ERROR",e[e.EXPORT_TASK_FAILED=201]="EXPORT_TASK_FAILED",e[e.EXPORT_TASK_SUCCESS=202]="EXPORT_TASK_SUCCESS",e[e.BILLING_INVOICE=301]="BILLING_INVOICE",e[e.BILLING_PAYMENT=302]="BILLING_PAYMENT",e[e.BILLING_SUBSCRIPTION=303]="BILLING_SUBSCRIPTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(f1||(f1={}));var p1;(function(e){e[e.PENDING=0]="PENDING",e[e.SET_USERNAME=1]="SET_USERNAME",e[e.BANNED=9]="BANNED",e[e.ACTIVE=10]="ACTIVE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(p1||(p1={}));var h1;(function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PRIVATE=1]="PRIVATE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(h1||(h1={}));var m1;(function(e){e[e.SENTIO=0]="SENTIO",e[e.SUBGRAPH=1]="SUBGRAPH",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(m1||(m1={}));var g1;(function(e){e[e.AVG=0]="AVG",e[e.SUM=1]="SUM",e[e.MIN=2]="MIN",e[e.MAX=3]="MAX",e[e.COUNT=4]="COUNT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(g1||(g1={}));var _1;(function(e){e[e.EQ=0]="EQ",e[e.NEQ=1]="NEQ",e[e.EXISTS=9]="EXISTS",e[e.NOT_EXISTS=10]="NOT_EXISTS",e[e.GT=2]="GT",e[e.GTE=3]="GTE",e[e.LT=4]="LT",e[e.LTE=5]="LTE",e[e.BETWEEN=7]="BETWEEN",e[e.NOT_BETWEEN=8]="NOT_BETWEEN",e[e.CONTAINS=11]="CONTAINS",e[e.NOT_CONTAINS=12]="NOT_CONTAINS",e[e.IN_COHORTS=13]="IN_COHORTS",e[e.NOT_IN_COHORTS=14]="NOT_IN_COHORTS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(_1||(_1={}));var A1;(function(e){e[e.EVENTS=0]="EVENTS",e[e.COHORTS=1]="COHORTS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(A1||(A1={}));var y1;(function(e){e[e.SUM=0]="SUM",e[e.CUMULATIVE_SUM=6]="CUMULATIVE_SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.CUMULATIVE_DISTINCT_COUNT=9]="CUMULATIVE_DISTINCT_COUNT",e[e.CUMULATIVE_COUNT=12]="CUMULATIVE_COUNT",e[e.LAST=7]="LAST",e[e.CUMULATIVE_LAST=10]="CUMULATIVE_LAST",e[e.FIRST=8]="FIRST",e[e.CUMULATIVE_FIRST=11]="CUMULATIVE_FIRST",e[e.PERCENTILE_25TH=20]="PERCENTILE_25TH",e[e.PERCENTILE_75TH=21]="PERCENTILE_75TH",e[e.PERCENTILE_90TH=22]="PERCENTILE_90TH",e[e.PERCENTILE_95TH=23]="PERCENTILE_95TH",e[e.PERCENTILE_99TH=24]="PERCENTILE_99TH",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(y1||(y1={}));var b1;(function(e){e[e.EQ=0]="EQ",e[e.NEQ=1]="NEQ",e[e.GT=2]="GT",e[e.GTE=3]="GTE",e[e.LT=4]="LT",e[e.LTE=5]="LTE",e[e.BETWEEN=7]="BETWEEN",e[e.NOT_BETWEEN=8]="NOT_BETWEEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(b1||(b1={}));var v1;(function(e){e[e.SUM=0]="SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.LAST=6]="LAST",e[e.FIRST=7]="FIRST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(v1||(v1={}));var w1;(function(e){e[e.PROCESSOR=0]="PROCESSOR",e[e.UI=1]="UI",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(w1||(w1={}));var E1;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.EMAIL=1]="EMAIL",e[e.SLACK=2]="SLACK",e[e.TELEGRAM=3]="TELEGRAM",e[e.WEBHOOK=4]="WEBHOOK",e[e.DISCORD=5]="DISCORD",e[e.PAGERDUTY=6]="PAGERDUTY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(E1||(E1={}));var C1;(function(e){e[e.STRING=0]="STRING",e[e.NUMBER=1]="NUMBER",e[e.BOOLEAN=2]="BOOLEAN",e[e.LIST=3]="LIST",e[e.TIME=4]="TIME",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(C1||(C1={}));var I1;(function(e){e[e.OnOrAfter=0]="OnOrAfter",e[e.On=1]="On",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(I1||(I1={}));var S1;(function(e){e[e.Disable=0]="Disable",e[e.FirstInTimeRange=1]="FirstInTimeRange",e[e.FirstInGlobal=2]="FirstInGlobal",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(S1||(S1={}));var x1;(function(e){e[e.Day=0]="Day",e[e.Week=1]="Week",e[e.Month=2]="Month",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(x1||(x1={}));var T1;(function(e){e[e.SUM=0]="SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(T1||(T1={}));var vt;(function(e){e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(vt||(vt={}));function Oq(e){switch(e){case 0:case"NULL_VALUE":return vt.NULL_VALUE;case-1:case"UNRECOGNIZED":default:return vt.UNRECOGNIZED}}function Pq(e){switch(e){case vt.NULL_VALUE:return"NULL_VALUE";case vt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function N1(){return{symbol:void 0,address:void 0}}var da={encode(e,t=Qe.default.Writer.create()){return e.symbol!==void 0&&t.uint32(10).string(e.symbol),e.address!==void 0&&Do.encode(e.address,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=N1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.symbol=n.string();continue;case 2:if(a!==18)break;i.address=Do.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{symbol:dt(e.symbol)?globalThis.String(e.symbol):void 0,address:dt(e.address)?Do.fromJSON(e.address):void 0}},toJSON(e){let t={};return e.symbol!==void 0&&(t.symbol=e.symbol),e.address!==void 0&&(t.address=Do.toJSON(e.address)),t},create(e){return da.fromPartial(e??{})},fromPartial(e){let t=N1();return t.symbol=e.symbol??void 0,t.address=e.address!==void 0&&e.address!==null?Do.fromPartial(e.address):void 0,t}};function R1(){return{address:"",chain:""}}var Do={encode(e,t=Qe.default.Writer.create()){return e.address!==""&&t.uint32(10).string(e.address),e.chain!==""&&t.uint32(18).string(e.chain),t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=R1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.address=n.string();continue;case 2:if(a!==18)break;i.chain=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{address:dt(e.address)?globalThis.String(e.address):"",chain:dt(e.chain)?globalThis.String(e.chain):""}},toJSON(e){let t={};return e.address!==""&&(t.address=e.address),e.chain!==""&&(t.chain=e.chain),t},create(e){return Do.fromPartial(e??{})},fromPartial(e){let t=R1();return t.address=e.address??"",t.chain=e.chain??"",t}};function k1(){return{nullValue:void 0,intValue:void 0,floatValue:void 0,bytesValue:void 0,boolValue:void 0,stringValue:void 0,timestampValue:void 0,bigintValue:void 0,bigdecimalValue:void 0,listValue:void 0,structValue:void 0}}var me={encode(e,t=Qe.default.Writer.create()){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.intValue!==void 0&&t.uint32(16).int32(e.intValue),e.floatValue!==void 0&&t.uint32(25).double(e.floatValue),e.bytesValue!==void 0&&t.uint32(34).bytes(e.bytesValue),e.boolValue!==void 0&&t.uint32(40).bool(e.boolValue),e.stringValue!==void 0&&t.uint32(50).string(e.stringValue),e.timestampValue!==void 0&&ke.encode(Dq(e.timestampValue),t.uint32(58).fork()).ldelim(),e.bigintValue!==void 0&&Nt.encode(e.bigintValue,t.uint32(66).fork()).ldelim(),e.bigdecimalValue!==void 0&&Mo.encode(e.bigdecimalValue,t.uint32(74).fork()).ldelim(),e.listValue!==void 0&&Ge.encode(e.listValue,t.uint32(82).fork()).ldelim(),e.structValue!==void 0&&st.encode(e.structValue,t.uint32(90).fork()).ldelim(),t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=k1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.nullValue=n.int32();continue;case 2:if(a!==16)break;i.intValue=n.int32();continue;case 3:if(a!==25)break;i.floatValue=n.double();continue;case 4:if(a!==34)break;i.bytesValue=n.bytes();continue;case 5:if(a!==40)break;i.boolValue=n.bool();continue;case 6:if(a!==50)break;i.stringValue=n.string();continue;case 7:if(a!==58)break;i.timestampValue=Q1(ke.decode(n,n.uint32()));continue;case 8:if(a!==66)break;i.bigintValue=Nt.decode(n,n.uint32());continue;case 9:if(a!==74)break;i.bigdecimalValue=Mo.decode(n,n.uint32());continue;case 10:if(a!==82)break;i.listValue=Ge.decode(n,n.uint32());continue;case 11:if(a!==90)break;i.structValue=st.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{nullValue:dt(e.nullValue)?Oq(e.nullValue):void 0,intValue:dt(e.intValue)?globalThis.Number(e.intValue):void 0,floatValue:dt(e.floatValue)?globalThis.Number(e.floatValue):void 0,bytesValue:dt(e.bytesValue)?L1(e.bytesValue):void 0,boolValue:dt(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,stringValue:dt(e.stringValue)?globalThis.String(e.stringValue):void 0,timestampValue:dt(e.timestampValue)?Mq(e.timestampValue):void 0,bigintValue:dt(e.bigintValue)?Nt.fromJSON(e.bigintValue):void 0,bigdecimalValue:dt(e.bigdecimalValue)?Mo.fromJSON(e.bigdecimalValue):void 0,listValue:dt(e.listValue)?Ge.fromJSON(e.listValue):void 0,structValue:dt(e.structValue)?st.fromJSON(e.structValue):void 0}},toJSON(e){let t={};return e.nullValue!==void 0&&(t.nullValue=Pq(e.nullValue)),e.intValue!==void 0&&(t.intValue=Math.round(e.intValue)),e.floatValue!==void 0&&(t.floatValue=e.floatValue),e.bytesValue!==void 0&&(t.bytesValue=U1(e.bytesValue)),e.boolValue!==void 0&&(t.boolValue=e.boolValue),e.stringValue!==void 0&&(t.stringValue=e.stringValue),e.timestampValue!==void 0&&(t.timestampValue=e.timestampValue.toISOString()),e.bigintValue!==void 0&&(t.bigintValue=Nt.toJSON(e.bigintValue)),e.bigdecimalValue!==void 0&&(t.bigdecimalValue=Mo.toJSON(e.bigdecimalValue)),e.listValue!==void 0&&(t.listValue=Ge.toJSON(e.listValue)),e.structValue!==void 0&&(t.structValue=st.toJSON(e.structValue)),t},create(e){return me.fromPartial(e??{})},fromPartial(e){let t=k1();return t.nullValue=e.nullValue??void 0,t.intValue=e.intValue??void 0,t.floatValue=e.floatValue??void 0,t.bytesValue=e.bytesValue??void 0,t.boolValue=e.boolValue??void 0,t.stringValue=e.stringValue??void 0,t.timestampValue=e.timestampValue??void 0,t.bigintValue=e.bigintValue!==void 0&&e.bigintValue!==null?Nt.fromPartial(e.bigintValue):void 0,t.bigdecimalValue=e.bigdecimalValue!==void 0&&e.bigdecimalValue!==null?Mo.fromPartial(e.bigdecimalValue):void 0,t.listValue=e.listValue!==void 0&&e.listValue!==null?Ge.fromPartial(e.listValue):void 0,t.structValue=e.structValue!==void 0&&e.structValue!==null?st.fromPartial(e.structValue):void 0,t}};function B1(){return{fields:{}}}var st={encode(e,t=Qe.default.Writer.create()){return Object.entries(e.fields).forEach(([n,r])=>{dy.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=B1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=dy.decode(n,n.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{fields:Fq(e.fields)?Object.entries(e.fields).reduce((t,[n,r])=>(t[n]=me.fromJSON(r),t),{}):{}}},toJSON(e){let t={};if(e.fields){let n=Object.entries(e.fields);n.length>0&&(t.fields={},n.forEach(([r,i])=>{t.fields[r]=me.toJSON(i)}))}return t},create(e){return st.fromPartial(e??{})},fromPartial(e){let t=B1();return t.fields=Object.entries(e.fields??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=me.fromPartial(i)),n),{}),t}};function O1(){return{key:"",value:void 0}}var dy={encode(e,t=Qe.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&me.encode(e.value,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=O1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=me.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:dt(e.key)?globalThis.String(e.key):"",value:dt(e.value)?me.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==void 0&&(t.value=me.toJSON(e.value)),t},create(e){return dy.fromPartial(e??{})},fromPartial(e){let t=O1();return t.key=e.key??"",t.value=e.value!==void 0&&e.value!==null?me.fromPartial(e.value):void 0,t}};function P1(){return{values:[]}}var Ge={encode(e,t=Qe.default.Writer.create()){for(let n of e.values)me.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=P1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.values.push(me.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?e.values.map(t=>me.fromJSON(t)):[]}},toJSON(e){let t={};return e.values?.length&&(t.values=e.values.map(n=>me.toJSON(n))),t},create(e){return Ge.fromPartial(e??{})},fromPartial(e){let t=P1();return t.values=e.values?.map(n=>me.fromPartial(n))||[],t}};function D1(){return{entities:[]}}var fa={encode(e,t=Qe.default.Writer.create()){for(let n of e.entities)st.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=D1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entities.push(st.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(t=>st.fromJSON(t)):[]}},toJSON(e){let t={};return e.entities?.length&&(t.entities=e.entities.map(n=>st.toJSON(n))),t},create(e){return fa.fromPartial(e??{})},fromPartial(e){let t=D1();return t.entities=e.entities?.map(n=>st.fromPartial(n))||[],t}};function M1(){return{value:void 0,exp:0}}var Mo={encode(e,t=Qe.default.Writer.create()){return e.value!==void 0&&Nt.encode(e.value,t.uint32(10).fork()).ldelim(),e.exp!==0&&t.uint32(16).int32(e.exp),t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=M1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.value=Nt.decode(n,n.uint32());continue;case 2:if(a!==16)break;i.exp=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{value:dt(e.value)?Nt.fromJSON(e.value):void 0,exp:dt(e.exp)?globalThis.Number(e.exp):0}},toJSON(e){let t={};return e.value!==void 0&&(t.value=Nt.toJSON(e.value)),e.exp!==0&&(t.exp=Math.round(e.exp)),t},create(e){return Mo.fromPartial(e??{})},fromPartial(e){let t=M1();return t.value=e.value!==void 0&&e.value!==null?Nt.fromPartial(e.value):void 0,t.exp=e.exp??0,t}};function F1(){return{negative:!1,data:new Uint8Array(0)}}var Nt={encode(e,t=Qe.default.Writer.create()){return e.negative!==!1&&t.uint32(8).bool(e.negative),e.data.length!==0&&t.uint32(18).bytes(e.data),t},decode(e,t){let n=e instanceof Qe.default.Reader?e:Qe.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=F1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.negative=n.bool();continue;case 2:if(a!==18)break;i.data=n.bytes();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{negative:dt(e.negative)?globalThis.Boolean(e.negative):!1,data:dt(e.data)?L1(e.data):new Uint8Array(0)}},toJSON(e){let t={};return e.negative!==!1&&(t.negative=e.negative),e.data.length!==0&&(t.data=U1(e.data)),t},create(e){return Nt.fromPartial(e??{})},fromPartial(e){let t=F1();return t.negative=e.negative??!1,t.data=e.data??new Uint8Array(0),t}};function L1(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let t=globalThis.atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}}function U1(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{let t=[];return e.forEach(n=>{t.push(globalThis.String.fromCharCode(n))}),globalThis.btoa(t.join(""))}}function Dq(e){let t=BigInt(Math.trunc(e.getTime()/1e3)),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}function Q1(e){let t=(globalThis.Number(e.seconds.toString())||0)*1e3;return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function Mq(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):Q1(ke.fromJSON(e))}Qe.default.util.Long!==Ti&&(Qe.default.util.Long=Ti,Qe.default.configure());function Fq(e){return typeof e=="object"&&e!==null}function dt(e){return e!=null}var Bt;(function(e){e[e.UNKNOWN_TYPE=0]="UNKNOWN_TYPE",e[e.COUNTER=1]="COUNTER",e[e.GAUGE=2]="GAUGE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Bt||(Bt={}));function Lq(e){switch(e){case 0:case"UNKNOWN_TYPE":return Bt.UNKNOWN_TYPE;case 1:case"COUNTER":return Bt.COUNTER;case 2:case"GAUGE":return Bt.GAUGE;case 3:case"HISTOGRAM":return Bt.HISTOGRAM;case-1:case"UNRECOGNIZED":default:return Bt.UNRECOGNIZED}}function Uq(e){switch(e){case Bt.UNKNOWN_TYPE:return"UNKNOWN_TYPE";case Bt.COUNTER:return"COUNTER";case Bt.GAUGE:return"GAUGE";case Bt.HISTOGRAM:return"HISTOGRAM";case Bt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var wt;(function(e){e[e.COUNT=0]="COUNT",e[e.SUM=1]="SUM",e[e.AVG=2]="AVG",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.LAST=5]="LAST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(wt||(wt={}));function Qq(e){switch(e){case 0:case"COUNT":return wt.COUNT;case 1:case"SUM":return wt.SUM;case 2:case"AVG":return wt.AVG;case 3:case"MIN":return wt.MIN;case 4:case"MAX":return wt.MAX;case 5:case"LAST":return wt.LAST;case-1:case"UNRECOGNIZED":default:return wt.UNRECOGNIZED}}function qq(e){switch(e){case wt.COUNT:return"COUNT";case wt.SUM:return"SUM";case wt.AVG:return"AVG";case wt.MIN:return"MIN";case wt.MAX:return"MAX";case wt.LAST:return"LAST";case wt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var ei;(function(e){e[e.ADDRESS=0]="ADDRESS",e[e.OBJECT=1]="OBJECT",e[e.WRAPPED_OBJECT=2]="WRAPPED_OBJECT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ei||(ei={}));function Vq(e){switch(e){case 0:case"ADDRESS":return ei.ADDRESS;case 1:case"OBJECT":return ei.OBJECT;case 2:case"WRAPPED_OBJECT":return ei.WRAPPED_OBJECT;case-1:case"UNRECOGNIZED":default:return ei.UNRECOGNIZED}}function Jq(e){switch(e){case ei.ADDRESS:return"ADDRESS";case ei.OBJECT:return"OBJECT";case ei.WRAPPED_OBJECT:return"WRAPPED_OBJECT";case ei.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var ti;(function(e){e[e.ERC20=0]="ERC20",e[e.ERC721=1]="ERC721",e[e.ERC1155=2]="ERC1155",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ti||(ti={}));function zq(e){switch(e){case 0:case"ERC20":return ti.ERC20;case 1:case"ERC721":return ti.ERC721;case 2:case"ERC1155":return ti.ERC1155;case-1:case"UNRECOGNIZED":default:return ti.UNRECOGNIZED}}function Gq(e){switch(e){case ti.ERC20:return"ERC20";case ti.ERC721:return"ERC721";case ti.ERC1155:return"ERC1155";case ti.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var ve;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ETH_LOG=1]="ETH_LOG",e[e.ETH_BLOCK=2]="ETH_BLOCK",e[e.ETH_TRACE=5]="ETH_TRACE",e[e.ETH_TRANSACTION=11]="ETH_TRANSACTION",e[e.SOL_INSTRUCTION=4]="SOL_INSTRUCTION",e[e.APT_EVENT=6]="APT_EVENT",e[e.APT_CALL=7]="APT_CALL",e[e.APT_RESOURCE=8]="APT_RESOURCE",e[e.SUI_EVENT=3]="SUI_EVENT",e[e.SUI_CALL=9]="SUI_CALL",e[e.SUI_OBJECT=10]="SUI_OBJECT",e[e.SUI_OBJECT_CHANGE=12]="SUI_OBJECT_CHANGE",e[e.FUEL_CALL=13]="FUEL_CALL",e[e.FUEL_BLOCK=17]="FUEL_BLOCK",e[e.COSMOS_CALL=14]="COSMOS_CALL",e[e.STARKNET_EVENT=15]="STARKNET_EVENT",e[e.BTC_TRANSACTION=16]="BTC_TRANSACTION",e[e.BTC_BLOCK=18]="BTC_BLOCK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ve||(ve={}));function QN(e){switch(e){case 0:case"UNKNOWN":return ve.UNKNOWN;case 1:case"ETH_LOG":return ve.ETH_LOG;case 2:case"ETH_BLOCK":return ve.ETH_BLOCK;case 5:case"ETH_TRACE":return ve.ETH_TRACE;case 11:case"ETH_TRANSACTION":return ve.ETH_TRANSACTION;case 4:case"SOL_INSTRUCTION":return ve.SOL_INSTRUCTION;case 6:case"APT_EVENT":return ve.APT_EVENT;case 7:case"APT_CALL":return ve.APT_CALL;case 8:case"APT_RESOURCE":return ve.APT_RESOURCE;case 3:case"SUI_EVENT":return ve.SUI_EVENT;case 9:case"SUI_CALL":return ve.SUI_CALL;case 10:case"SUI_OBJECT":return ve.SUI_OBJECT;case 12:case"SUI_OBJECT_CHANGE":return ve.SUI_OBJECT_CHANGE;case 13:case"FUEL_CALL":return ve.FUEL_CALL;case 17:case"FUEL_BLOCK":return ve.FUEL_BLOCK;case 14:case"COSMOS_CALL":return ve.COSMOS_CALL;case 15:case"STARKNET_EVENT":return ve.STARKNET_EVENT;case 16:case"BTC_TRANSACTION":return ve.BTC_TRANSACTION;case 18:case"BTC_BLOCK":return ve.BTC_BLOCK;case-1:case"UNRECOGNIZED":default:return ve.UNRECOGNIZED}}function qN(e){switch(e){case ve.UNKNOWN:return"UNKNOWN";case ve.ETH_LOG:return"ETH_LOG";case ve.ETH_BLOCK:return"ETH_BLOCK";case ve.ETH_TRACE:return"ETH_TRACE";case ve.ETH_TRANSACTION:return"ETH_TRANSACTION";case ve.SOL_INSTRUCTION:return"SOL_INSTRUCTION";case ve.APT_EVENT:return"APT_EVENT";case ve.APT_CALL:return"APT_CALL";case ve.APT_RESOURCE:return"APT_RESOURCE";case ve.SUI_EVENT:return"SUI_EVENT";case ve.SUI_CALL:return"SUI_CALL";case ve.SUI_OBJECT:return"SUI_OBJECT";case ve.SUI_OBJECT_CHANGE:return"SUI_OBJECT_CHANGE";case ve.FUEL_CALL:return"FUEL_CALL";case ve.FUEL_BLOCK:return"FUEL_BLOCK";case ve.COSMOS_CALL:return"COSMOS_CALL";case ve.STARKNET_EVENT:return"STARKNET_EVENT";case ve.BTC_TRANSACTION:return"BTC_TRANSACTION";case ve.BTC_BLOCK:return"BTC_BLOCK";case ve.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var kt;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR",e[e.CRITICAL=4]="CRITICAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(kt||(kt={}));function Hq(e){switch(e){case 0:case"DEBUG":return kt.DEBUG;case 1:case"INFO":return kt.INFO;case 2:case"WARNING":return kt.WARNING;case 3:case"ERROR":return kt.ERROR;case 4:case"CRITICAL":return kt.CRITICAL;case-1:case"UNRECOGNIZED":default:return kt.UNRECOGNIZED}}function Wq(e){switch(e){case kt.DEBUG:return"DEBUG";case kt.INFO:return"INFO";case kt.WARNING:return"WARNING";case kt.ERROR:return"ERROR";case kt.CRITICAL:return"CRITICAL";case kt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var ha;(function(e){e[e.AVG=0]="AVG",e[e.MEDIAN=1]="MEDIAN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ha||(ha={}));function Ose(e){switch(e){case 0:case"AVG":return ha.AVG;case 1:case"MEDIAN":return ha.MEDIAN;case-1:case"UNRECOGNIZED":default:return ha.UNRECOGNIZED}}function Pse(e){switch(e){case ha.AVG:return"AVG";case ha.MEDIAN:return"MEDIAN";case ha.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Rt;(function(e){e[e.STRING=0]="STRING",e[e.DOUBLE=1]="DOUBLE",e[e.BOOL=2]="BOOL",e[e.TIMESTAMP=3]="TIMESTAMP",e[e.BIG_INTEGER=4]="BIG_INTEGER",e[e.BIG_DECIMAL=5]="BIG_DECIMAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Rt||(Rt={}));function Zq(e){switch(e){case 0:case"STRING":return Rt.STRING;case 1:case"DOUBLE":return Rt.DOUBLE;case 2:case"BOOL":return Rt.BOOL;case 3:case"TIMESTAMP":return Rt.TIMESTAMP;case 4:case"BIG_INTEGER":return Rt.BIG_INTEGER;case 5:case"BIG_DECIMAL":return Rt.BIG_DECIMAL;case-1:case"UNRECOGNIZED":default:return Rt.UNRECOGNIZED}}function Yq(e){switch(e){case Rt.STRING:return"STRING";case Rt.DOUBLE:return"DOUBLE";case Rt.BOOL:return"BOOL";case Rt.TIMESTAMP:return"TIMESTAMP";case Rt.BIG_INTEGER:return"BIG_INTEGER";case Rt.BIG_DECIMAL:return"BIG_DECIMAL";case Rt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Ee;(function(e){e[e.EQ=0]="EQ",e[e.NE=1]="NE",e[e.GT=2]="GT",e[e.GE=3]="GE",e[e.LT=4]="LT",e[e.LE=5]="LE",e[e.IN=6]="IN",e[e.NOT_IN=7]="NOT_IN",e[e.LIKE=8]="LIKE",e[e.NOT_LIKE=9]="NOT_LIKE",e[e.HAS_ALL=10]="HAS_ALL",e[e.HAS_ANY=11]="HAS_ANY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Ee||(Ee={}));function Xq(e){switch(e){case 0:case"EQ":return Ee.EQ;case 1:case"NE":return Ee.NE;case 2:case"GT":return Ee.GT;case 3:case"GE":return Ee.GE;case 4:case"LT":return Ee.LT;case 5:case"LE":return Ee.LE;case 6:case"IN":return Ee.IN;case 7:case"NOT_IN":return Ee.NOT_IN;case 8:case"LIKE":return Ee.LIKE;case 9:case"NOT_LIKE":return Ee.NOT_LIKE;case 10:case"HAS_ALL":return Ee.HAS_ALL;case 11:case"HAS_ANY":return Ee.HAS_ANY;case-1:case"UNRECOGNIZED":default:return Ee.UNRECOGNIZED}}function $q(e){switch(e){case Ee.EQ:return"EQ";case Ee.NE:return"NE";case Ee.GT:return"GT";case Ee.GE:return"GE";case Ee.LT:return"LT";case Ee.LE:return"LE";case Ee.IN:return"IN";case Ee.NOT_IN:return"NOT_IN";case Ee.LIKE:return"LIKE";case Ee.NOT_LIKE:return"NOT_LIKE";case Ee.HAS_ALL:return"HAS_ALL";case Ee.HAS_ANY:return"HAS_ANY";case Ee.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function q1(){return{name:"",version:""}}var Fo={encode(e,t=A.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.version!==""&&t.uint32(26).string(e.version),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=q1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 3:if(a!==26)break;i.version=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",version:E(e.version)?globalThis.String(e.version):""}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.version!==""&&(t.version=e.version),t},create(e){return Fo.fromPartial(e??{})},fromPartial(e){let t=q1();return t.name=e.name??"",t.version=e.version??"",t}};function V1(){return{sequential:!1,forceExactBlockTime:!1,processBindingTimeout:0,skipStartBlockValidation:!1,rpcRetryTimes:0}}var Lo={encode(e,t=A.default.Writer.create()){return e.sequential!==!1&&t.uint32(8).bool(e.sequential),e.forceExactBlockTime!==!1&&t.uint32(16).bool(e.forceExactBlockTime),e.processBindingTimeout!==0&&t.uint32(24).int32(e.processBindingTimeout),e.skipStartBlockValidation!==!1&&t.uint32(32).bool(e.skipStartBlockValidation),e.rpcRetryTimes!==0&&t.uint32(40).int32(e.rpcRetryTimes),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=V1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.sequential=n.bool();continue;case 2:if(a!==16)break;i.forceExactBlockTime=n.bool();continue;case 3:if(a!==24)break;i.processBindingTimeout=n.int32();continue;case 4:if(a!==32)break;i.skipStartBlockValidation=n.bool();continue;case 5:if(a!==40)break;i.rpcRetryTimes=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{sequential:E(e.sequential)?globalThis.Boolean(e.sequential):!1,forceExactBlockTime:E(e.forceExactBlockTime)?globalThis.Boolean(e.forceExactBlockTime):!1,processBindingTimeout:E(e.processBindingTimeout)?globalThis.Number(e.processBindingTimeout):0,skipStartBlockValidation:E(e.skipStartBlockValidation)?globalThis.Boolean(e.skipStartBlockValidation):!1,rpcRetryTimes:E(e.rpcRetryTimes)?globalThis.Number(e.rpcRetryTimes):0}},toJSON(e){let t={};return e.sequential!==!1&&(t.sequential=e.sequential),e.forceExactBlockTime!==!1&&(t.forceExactBlockTime=e.forceExactBlockTime),e.processBindingTimeout!==0&&(t.processBindingTimeout=Math.round(e.processBindingTimeout)),e.skipStartBlockValidation!==!1&&(t.skipStartBlockValidation=e.skipStartBlockValidation),e.rpcRetryTimes!==0&&(t.rpcRetryTimes=Math.round(e.rpcRetryTimes)),t},create(e){return Lo.fromPartial(e??{})},fromPartial(e){let t=V1();return t.sequential=e.sequential??!1,t.forceExactBlockTime=e.forceExactBlockTime??!1,t.processBindingTimeout=e.processBindingTimeout??0,t.skipStartBlockValidation=e.skipStartBlockValidation??!1,t.rpcRetryTimes=e.rpcRetryTimes??0,t}};function J1(){return{}}var VN={encode(e,t=A.default.Writer.create()){return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=J1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return VN.fromPartial(e??{})},fromPartial(e){return J1()}};function z1(){return{config:void 0,executionConfig:void 0,contractConfigs:[],templateInstances:[],accountConfigs:[],metricConfigs:[],eventTrackingConfigs:[],exportConfigs:[],eventLogConfigs:[],dbSchema:void 0}}var JN={encode(e,t=A.default.Writer.create()){e.config!==void 0&&Fo.encode(e.config,t.uint32(10).fork()).ldelim(),e.executionConfig!==void 0&&Lo.encode(e.executionConfig,t.uint32(74).fork()).ldelim();for(let n of e.contractConfigs)Uo.encode(n,t.uint32(18).fork()).ldelim();for(let n of e.templateInstances)vr.encode(n,t.uint32(26).fork()).ldelim();for(let n of e.accountConfigs)Ho.encode(n,t.uint32(34).fork()).ldelim();for(let n of e.metricConfigs)jr.encode(n,t.uint32(42).fork()).ldelim();for(let n of e.eventTrackingConfigs)Jo.encode(n,t.uint32(50).fork()).ldelim();for(let n of e.exportConfigs)zo.encode(n,t.uint32(58).fork()).ldelim();for(let n of e.eventLogConfigs)Ri.encode(n,t.uint32(66).fork()).ldelim();return e.dbSchema!==void 0&&Qo.encode(e.dbSchema,t.uint32(82).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=z1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.config=Fo.decode(n,n.uint32());continue;case 9:if(a!==74)break;i.executionConfig=Lo.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.contractConfigs.push(Uo.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.templateInstances.push(vr.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.accountConfigs.push(Ho.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.metricConfigs.push(jr.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.eventTrackingConfigs.push(Jo.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.exportConfigs.push(zo.decode(n,n.uint32()));continue;case 8:if(a!==66)break;i.eventLogConfigs.push(Ri.decode(n,n.uint32()));continue;case 10:if(a!==82)break;i.dbSchema=Qo.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{config:E(e.config)?Fo.fromJSON(e.config):void 0,executionConfig:E(e.executionConfig)?Lo.fromJSON(e.executionConfig):void 0,contractConfigs:globalThis.Array.isArray(e?.contractConfigs)?e.contractConfigs.map(t=>Uo.fromJSON(t)):[],templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(t=>vr.fromJSON(t)):[],accountConfigs:globalThis.Array.isArray(e?.accountConfigs)?e.accountConfigs.map(t=>Ho.fromJSON(t)):[],metricConfigs:globalThis.Array.isArray(e?.metricConfigs)?e.metricConfigs.map(t=>jr.fromJSON(t)):[],eventTrackingConfigs:globalThis.Array.isArray(e?.eventTrackingConfigs)?e.eventTrackingConfigs.map(t=>Jo.fromJSON(t)):[],exportConfigs:globalThis.Array.isArray(e?.exportConfigs)?e.exportConfigs.map(t=>zo.fromJSON(t)):[],eventLogConfigs:globalThis.Array.isArray(e?.eventLogConfigs)?e.eventLogConfigs.map(t=>Ri.fromJSON(t)):[],dbSchema:E(e.dbSchema)?Qo.fromJSON(e.dbSchema):void 0}},toJSON(e){let t={};return e.config!==void 0&&(t.config=Fo.toJSON(e.config)),e.executionConfig!==void 0&&(t.executionConfig=Lo.toJSON(e.executionConfig)),e.contractConfigs?.length&&(t.contractConfigs=e.contractConfigs.map(n=>Uo.toJSON(n))),e.templateInstances?.length&&(t.templateInstances=e.templateInstances.map(n=>vr.toJSON(n))),e.accountConfigs?.length&&(t.accountConfigs=e.accountConfigs.map(n=>Ho.toJSON(n))),e.metricConfigs?.length&&(t.metricConfigs=e.metricConfigs.map(n=>jr.toJSON(n))),e.eventTrackingConfigs?.length&&(t.eventTrackingConfigs=e.eventTrackingConfigs.map(n=>Jo.toJSON(n))),e.exportConfigs?.length&&(t.exportConfigs=e.exportConfigs.map(n=>zo.toJSON(n))),e.eventLogConfigs?.length&&(t.eventLogConfigs=e.eventLogConfigs.map(n=>Ri.toJSON(n))),e.dbSchema!==void 0&&(t.dbSchema=Qo.toJSON(e.dbSchema)),t},create(e){return JN.fromPartial(e??{})},fromPartial(e){let t=z1();return t.config=e.config!==void 0&&e.config!==null?Fo.fromPartial(e.config):void 0,t.executionConfig=e.executionConfig!==void 0&&e.executionConfig!==null?Lo.fromPartial(e.executionConfig):void 0,t.contractConfigs=e.contractConfigs?.map(n=>Uo.fromPartial(n))||[],t.templateInstances=e.templateInstances?.map(n=>vr.fromPartial(n))||[],t.accountConfigs=e.accountConfigs?.map(n=>Ho.fromPartial(n))||[],t.metricConfigs=e.metricConfigs?.map(n=>jr.fromPartial(n))||[],t.eventTrackingConfigs=e.eventTrackingConfigs?.map(n=>Jo.fromPartial(n))||[],t.exportConfigs=e.exportConfigs?.map(n=>zo.fromPartial(n))||[],t.eventLogConfigs=e.eventLogConfigs?.map(n=>Ri.fromPartial(n))||[],t.dbSchema=e.dbSchema!==void 0&&e.dbSchema!==null?Qo.fromPartial(e.dbSchema):void 0,t}};function G1(){return{contract:void 0,intervalConfigs:[],logConfigs:[],traceConfigs:[],transactionConfig:[],moveEventConfigs:[],moveCallConfigs:[],moveResourceChangeConfigs:[],fuelCallConfigs:[],assetConfigs:[],fuelLogConfigs:[],cosmosLogConfigs:[],starknetEventConfigs:[],btcTransactionConfigs:[],instructionConfig:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),processorType:""}}var Uo={encode(e,t=A.default.Writer.create()){e.contract!==void 0&&br.encode(e.contract,t.uint32(10).fork()).ldelim();for(let n of e.intervalConfigs)ft.encode(n,t.uint32(90).fork()).ldelim();for(let n of e.logConfigs)wr.encode(n,t.uint32(26).fork()).ldelim();for(let n of e.traceConfigs)Zo.encode(n,t.uint32(18).fork()).ldelim();for(let n of e.transactionConfig)Yo.encode(n,t.uint32(58).fork()).ldelim();for(let n of e.moveEventConfigs)ic.encode(n,t.uint32(74).fork()).ldelim();for(let n of e.moveCallConfigs)Cr.encode(n,t.uint32(82).fork()).ldelim();for(let n of e.moveResourceChangeConfigs)Ir.encode(n,t.uint32(98).fork()).ldelim();for(let n of e.fuelCallConfigs)hc.encode(n,t.uint32(106).fork()).ldelim();for(let n of e.assetConfigs)Xo.encode(n,t.uint32(114).fork()).ldelim();for(let n of e.fuelLogConfigs)Ko.encode(n,t.uint32(122).fork()).ldelim();for(let n of e.cosmosLogConfigs)jo.encode(n,t.uint32(130).fork()).ldelim();for(let n of e.starknetEventConfigs)cc.encode(n,t.uint32(138).fork()).ldelim();for(let n of e.btcTransactionConfigs)uc.encode(n,t.uint32(146).fork()).ldelim();if(e.instructionConfig!==void 0&&tc.encode(e.instructionConfig,t.uint32(50).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");t.uint32(32).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");t.uint32(40).uint64(e.endBlock.toString())}return e.processorType!==""&&t.uint32(66).string(e.processorType),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=G1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.contract=br.decode(n,n.uint32());continue;case 11:if(a!==90)break;i.intervalConfigs.push(ft.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.logConfigs.push(wr.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.traceConfigs.push(Zo.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.transactionConfig.push(Yo.decode(n,n.uint32()));continue;case 9:if(a!==74)break;i.moveEventConfigs.push(ic.decode(n,n.uint32()));continue;case 10:if(a!==82)break;i.moveCallConfigs.push(Cr.decode(n,n.uint32()));continue;case 12:if(a!==98)break;i.moveResourceChangeConfigs.push(Ir.decode(n,n.uint32()));continue;case 13:if(a!==106)break;i.fuelCallConfigs.push(hc.decode(n,n.uint32()));continue;case 14:if(a!==114)break;i.assetConfigs.push(Xo.decode(n,n.uint32()));continue;case 15:if(a!==122)break;i.fuelLogConfigs.push(Ko.decode(n,n.uint32()));continue;case 16:if(a!==130)break;i.cosmosLogConfigs.push(jo.decode(n,n.uint32()));continue;case 17:if(a!==138)break;i.starknetEventConfigs.push(cc.decode(n,n.uint32()));continue;case 18:if(a!==146)break;i.btcTransactionConfigs.push(uc.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.instructionConfig=tc.decode(n,n.uint32());continue;case 4:if(a!==32)break;i.startBlock=$t(n.uint64());continue;case 5:if(a!==40)break;i.endBlock=$t(n.uint64());continue;case 8:if(a!==66)break;i.processorType=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{contract:E(e.contract)?br.fromJSON(e.contract):void 0,intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(t=>ft.fromJSON(t)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(t=>wr.fromJSON(t)):[],traceConfigs:globalThis.Array.isArray(e?.traceConfigs)?e.traceConfigs.map(t=>Zo.fromJSON(t)):[],transactionConfig:globalThis.Array.isArray(e?.transactionConfig)?e.transactionConfig.map(t=>Yo.fromJSON(t)):[],moveEventConfigs:globalThis.Array.isArray(e?.moveEventConfigs)?e.moveEventConfigs.map(t=>ic.fromJSON(t)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(t=>Cr.fromJSON(t)):[],moveResourceChangeConfigs:globalThis.Array.isArray(e?.moveResourceChangeConfigs)?e.moveResourceChangeConfigs.map(t=>Ir.fromJSON(t)):[],fuelCallConfigs:globalThis.Array.isArray(e?.fuelCallConfigs)?e.fuelCallConfigs.map(t=>hc.fromJSON(t)):[],assetConfigs:globalThis.Array.isArray(e?.assetConfigs)?e.assetConfigs.map(t=>Xo.fromJSON(t)):[],fuelLogConfigs:globalThis.Array.isArray(e?.fuelLogConfigs)?e.fuelLogConfigs.map(t=>Ko.fromJSON(t)):[],cosmosLogConfigs:globalThis.Array.isArray(e?.cosmosLogConfigs)?e.cosmosLogConfigs.map(t=>jo.fromJSON(t)):[],starknetEventConfigs:globalThis.Array.isArray(e?.starknetEventConfigs)?e.starknetEventConfigs.map(t=>cc.fromJSON(t)):[],btcTransactionConfigs:globalThis.Array.isArray(e?.btcTransactionConfigs)?e.btcTransactionConfigs.map(t=>uc.fromJSON(t)):[],instructionConfig:E(e.instructionConfig)?tc.fromJSON(e.instructionConfig):void 0,startBlock:E(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:E(e.endBlock)?BigInt(e.endBlock):BigInt("0"),processorType:E(e.processorType)?globalThis.String(e.processorType):""}},toJSON(e){let t={};return e.contract!==void 0&&(t.contract=br.toJSON(e.contract)),e.intervalConfigs?.length&&(t.intervalConfigs=e.intervalConfigs.map(n=>ft.toJSON(n))),e.logConfigs?.length&&(t.logConfigs=e.logConfigs.map(n=>wr.toJSON(n))),e.traceConfigs?.length&&(t.traceConfigs=e.traceConfigs.map(n=>Zo.toJSON(n))),e.transactionConfig?.length&&(t.transactionConfig=e.transactionConfig.map(n=>Yo.toJSON(n))),e.moveEventConfigs?.length&&(t.moveEventConfigs=e.moveEventConfigs.map(n=>ic.toJSON(n))),e.moveCallConfigs?.length&&(t.moveCallConfigs=e.moveCallConfigs.map(n=>Cr.toJSON(n))),e.moveResourceChangeConfigs?.length&&(t.moveResourceChangeConfigs=e.moveResourceChangeConfigs.map(n=>Ir.toJSON(n))),e.fuelCallConfigs?.length&&(t.fuelCallConfigs=e.fuelCallConfigs.map(n=>hc.toJSON(n))),e.assetConfigs?.length&&(t.assetConfigs=e.assetConfigs.map(n=>Xo.toJSON(n))),e.fuelLogConfigs?.length&&(t.fuelLogConfigs=e.fuelLogConfigs.map(n=>Ko.toJSON(n))),e.cosmosLogConfigs?.length&&(t.cosmosLogConfigs=e.cosmosLogConfigs.map(n=>jo.toJSON(n))),e.starknetEventConfigs?.length&&(t.starknetEventConfigs=e.starknetEventConfigs.map(n=>cc.toJSON(n))),e.btcTransactionConfigs?.length&&(t.btcTransactionConfigs=e.btcTransactionConfigs.map(n=>uc.toJSON(n))),e.instructionConfig!==void 0&&(t.instructionConfig=tc.toJSON(e.instructionConfig)),e.startBlock!==BigInt("0")&&(t.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(t.endBlock=e.endBlock.toString()),e.processorType!==""&&(t.processorType=e.processorType),t},create(e){return Uo.fromPartial(e??{})},fromPartial(e){let t=G1();return t.contract=e.contract!==void 0&&e.contract!==null?br.fromPartial(e.contract):void 0,t.intervalConfigs=e.intervalConfigs?.map(n=>ft.fromPartial(n))||[],t.logConfigs=e.logConfigs?.map(n=>wr.fromPartial(n))||[],t.traceConfigs=e.traceConfigs?.map(n=>Zo.fromPartial(n))||[],t.transactionConfig=e.transactionConfig?.map(n=>Yo.fromPartial(n))||[],t.moveEventConfigs=e.moveEventConfigs?.map(n=>ic.fromPartial(n))||[],t.moveCallConfigs=e.moveCallConfigs?.map(n=>Cr.fromPartial(n))||[],t.moveResourceChangeConfigs=e.moveResourceChangeConfigs?.map(n=>Ir.fromPartial(n))||[],t.fuelCallConfigs=e.fuelCallConfigs?.map(n=>hc.fromPartial(n))||[],t.assetConfigs=e.assetConfigs?.map(n=>Xo.fromPartial(n))||[],t.fuelLogConfigs=e.fuelLogConfigs?.map(n=>Ko.fromPartial(n))||[],t.cosmosLogConfigs=e.cosmosLogConfigs?.map(n=>jo.fromPartial(n))||[],t.starknetEventConfigs=e.starknetEventConfigs?.map(n=>cc.fromPartial(n))||[],t.btcTransactionConfigs=e.btcTransactionConfigs?.map(n=>uc.fromPartial(n))||[],t.instructionConfig=e.instructionConfig!==void 0&&e.instructionConfig!==null?tc.fromPartial(e.instructionConfig):void 0,t.startBlock=e.startBlock??BigInt("0"),t.endBlock=e.endBlock??BigInt("0"),t.processorType=e.processorType??"",t}};function H1(){return{gqlSchema:""}}var Qo={encode(e,t=A.default.Writer.create()){return e.gqlSchema!==""&&t.uint32(10).string(e.gqlSchema),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=H1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.gqlSchema=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{gqlSchema:E(e.gqlSchema)?globalThis.String(e.gqlSchema):""}},toJSON(e){let t={};return e.gqlSchema!==""&&(t.gqlSchema=e.gqlSchema),t},create(e){return Qo.fromPartial(e??{})},fromPartial(e){let t=H1();return t.gqlSchema=e.gqlSchema??"",t}};function W1(){return{}}var qo={encode(e,t=A.default.Writer.create()){return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=W1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return qo.fromPartial(e??{})},fromPartial(e){return W1()}};function Z1(){return{retentionEventName:"",days:0}}var Vo={encode(e,t=A.default.Writer.create()){return e.retentionEventName!==""&&t.uint32(18).string(e.retentionEventName),e.days!==0&&t.uint32(24).int32(e.days),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Z1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.retentionEventName=n.string();continue;case 3:if(a!==24)break;i.days=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{retentionEventName:E(e.retentionEventName)?globalThis.String(e.retentionEventName):"",days:E(e.days)?globalThis.Number(e.days):0}},toJSON(e){let t={};return e.retentionEventName!==""&&(t.retentionEventName=e.retentionEventName),e.days!==0&&(t.days=Math.round(e.days)),t},create(e){return Vo.fromPartial(e??{})},fromPartial(e){let t=Z1();return t.retentionEventName=e.retentionEventName??"",t.days=e.days??0,t}};function Y1(){return{eventName:"",totalByDay:!1,unique:!1,totalPerEntity:void 0,distinctAggregationByDays:[],retentionConfig:void 0}}var Jo={encode(e,t=A.default.Writer.create()){e.eventName!==""&&t.uint32(10).string(e.eventName),e.totalByDay!==!1&&t.uint32(16).bool(e.totalByDay),e.unique!==!1&&t.uint32(24).bool(e.unique),e.totalPerEntity!==void 0&&qo.encode(e.totalPerEntity,t.uint32(34).fork()).ldelim(),t.uint32(42).fork();for(let n of e.distinctAggregationByDays)t.int32(n);return t.ldelim(),e.retentionConfig!==void 0&&Vo.encode(e.retentionConfig,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Y1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.eventName=n.string();continue;case 2:if(a!==16)break;i.totalByDay=n.bool();continue;case 3:if(a!==24)break;i.unique=n.bool();continue;case 4:if(a!==34)break;i.totalPerEntity=qo.decode(n,n.uint32());continue;case 5:if(a===40){i.distinctAggregationByDays.push(n.int32());continue}if(a===42){let s=n.uint32()+n.pos;for(;n.pos<s;)i.distinctAggregationByDays.push(n.int32());continue}break;case 6:if(a!==50)break;i.retentionConfig=Vo.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{eventName:E(e.eventName)?globalThis.String(e.eventName):"",totalByDay:E(e.totalByDay)?globalThis.Boolean(e.totalByDay):!1,unique:E(e.unique)?globalThis.Boolean(e.unique):!1,totalPerEntity:E(e.totalPerEntity)?qo.fromJSON(e.totalPerEntity):void 0,distinctAggregationByDays:globalThis.Array.isArray(e?.distinctAggregationByDays)?e.distinctAggregationByDays.map(t=>globalThis.Number(t)):[],retentionConfig:E(e.retentionConfig)?Vo.fromJSON(e.retentionConfig):void 0}},toJSON(e){let t={};return e.eventName!==""&&(t.eventName=e.eventName),e.totalByDay!==!1&&(t.totalByDay=e.totalByDay),e.unique!==!1&&(t.unique=e.unique),e.totalPerEntity!==void 0&&(t.totalPerEntity=qo.toJSON(e.totalPerEntity)),e.distinctAggregationByDays?.length&&(t.distinctAggregationByDays=e.distinctAggregationByDays.map(n=>Math.round(n))),e.retentionConfig!==void 0&&(t.retentionConfig=Vo.toJSON(e.retentionConfig)),t},create(e){return Jo.fromPartial(e??{})},fromPartial(e){let t=Y1();return t.eventName=e.eventName??"",t.totalByDay=e.totalByDay??!1,t.unique=e.unique??!1,t.totalPerEntity=e.totalPerEntity!==void 0&&e.totalPerEntity!==null?qo.fromPartial(e.totalPerEntity):void 0,t.distinctAggregationByDays=e.distinctAggregationByDays?.map(n=>n)||[],t.retentionConfig=e.retentionConfig!==void 0&&e.retentionConfig!==null?Vo.fromPartial(e.retentionConfig):void 0,t}};function X1(){return{name:"",channel:""}}var zo={encode(e,t=A.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.channel!==""&&t.uint32(18).string(e.channel),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=X1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==18)break;i.channel=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",channel:E(e.channel)?globalThis.String(e.channel):""}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.channel!==""&&(t.channel=e.channel),t},create(e){return zo.fromPartial(e??{})},fromPartial(e){let t=X1();return t.name=e.name??"",t.channel=e.channel??"",t}};function $1(){return{name:"",description:"",unit:"",sparse:!1,persistentBetweenVersion:!1,type:0,aggregationConfig:void 0}}var jr={encode(e,t=A.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.description!==""&&t.uint32(26).string(e.description),e.unit!==""&&t.uint32(18).string(e.unit),e.sparse!==!1&&t.uint32(32).bool(e.sparse),e.persistentBetweenVersion!==!1&&t.uint32(40).bool(e.persistentBetweenVersion),e.type!==0&&t.uint32(56).int32(e.type),e.aggregationConfig!==void 0&&Go.encode(e.aggregationConfig,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=$1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 3:if(a!==26)break;i.description=n.string();continue;case 2:if(a!==18)break;i.unit=n.string();continue;case 4:if(a!==32)break;i.sparse=n.bool();continue;case 5:if(a!==40)break;i.persistentBetweenVersion=n.bool();continue;case 7:if(a!==56)break;i.type=n.int32();continue;case 6:if(a!==50)break;i.aggregationConfig=Go.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",description:E(e.description)?globalThis.String(e.description):"",unit:E(e.unit)?globalThis.String(e.unit):"",sparse:E(e.sparse)?globalThis.Boolean(e.sparse):!1,persistentBetweenVersion:E(e.persistentBetweenVersion)?globalThis.Boolean(e.persistentBetweenVersion):!1,type:E(e.type)?Lq(e.type):0,aggregationConfig:E(e.aggregationConfig)?Go.fromJSON(e.aggregationConfig):void 0}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.description!==""&&(t.description=e.description),e.unit!==""&&(t.unit=e.unit),e.sparse!==!1&&(t.sparse=e.sparse),e.persistentBetweenVersion!==!1&&(t.persistentBetweenVersion=e.persistentBetweenVersion),e.type!==0&&(t.type=Uq(e.type)),e.aggregationConfig!==void 0&&(t.aggregationConfig=Go.toJSON(e.aggregationConfig)),t},create(e){return jr.fromPartial(e??{})},fromPartial(e){let t=$1();return t.name=e.name??"",t.description=e.description??"",t.unit=e.unit??"",t.sparse=e.sparse??!1,t.persistentBetweenVersion=e.persistentBetweenVersion??!1,t.type=e.type??0,t.aggregationConfig=e.aggregationConfig!==void 0&&e.aggregationConfig!==null?Go.fromPartial(e.aggregationConfig):void 0,t}};function K1(){return{name:"",fields:[]}}var Ri={encode(e,t=A.default.Writer.create()){e.name!==""&&t.uint32(10).string(e.name);for(let n of e.fields)yr.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=K1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==18)break;i.fields.push(yr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",fields:globalThis.Array.isArray(e?.fields)?e.fields.map(t=>yr.fromJSON(t)):[]}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.fields?.length&&(t.fields=e.fields.map(n=>yr.toJSON(n))),t},create(e){return Ri.fromPartial(e??{})},fromPartial(e){let t=K1();return t.name=e.name??"",t.fields=e.fields?.map(n=>yr.fromPartial(n))||[],t}};function j1(){return{fields:[]}}var pa={encode(e,t=A.default.Writer.create()){for(let n of e.fields)yr.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=j1();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.fields.push(yr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{fields:globalThis.Array.isArray(e?.fields)?e.fields.map(t=>yr.fromJSON(t)):[]}},toJSON(e){let t={};return e.fields?.length&&(t.fields=e.fields.map(n=>yr.toJSON(n))),t},create(e){return pa.fromPartial(e??{})},fromPartial(e){let t=j1();return t.fields=e.fields?.map(n=>yr.fromPartial(n))||[],t}};function e2(){return{name:"",basicType:void 0,coinType:void 0,structType:void 0}}var yr={encode(e,t=A.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.basicType!==void 0&&t.uint32(16).int32(e.basicType),e.coinType!==void 0&&da.encode(e.coinType,t.uint32(26).fork()).ldelim(),e.structType!==void 0&&pa.encode(e.structType,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=e2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==16)break;i.basicType=n.int32();continue;case 3:if(a!==26)break;i.coinType=da.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.structType=pa.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",basicType:E(e.basicType)?Zq(e.basicType):void 0,coinType:E(e.coinType)?da.fromJSON(e.coinType):void 0,structType:E(e.structType)?pa.fromJSON(e.structType):void 0}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.basicType!==void 0&&(t.basicType=Yq(e.basicType)),e.coinType!==void 0&&(t.coinType=da.toJSON(e.coinType)),e.structType!==void 0&&(t.structType=pa.toJSON(e.structType)),t},create(e){return yr.fromPartial(e??{})},fromPartial(e){let t=e2();return t.name=e.name??"",t.basicType=e.basicType??void 0,t.coinType=e.coinType!==void 0&&e.coinType!==null?da.fromPartial(e.coinType):void 0,t.structType=e.structType!==void 0&&e.structType!==null?pa.fromPartial(e.structType):void 0,t}};function t2(){return{intervalInMinutes:[],types:[],discardOrigin:!1}}var Go={encode(e,t=A.default.Writer.create()){t.uint32(10).fork();for(let n of e.intervalInMinutes)t.int32(n);t.ldelim(),t.uint32(18).fork();for(let n of e.types)t.int32(n);return t.ldelim(),e.discardOrigin!==!1&&t.uint32(24).bool(e.discardOrigin),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=t2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a===8){i.intervalInMinutes.push(n.int32());continue}if(a===10){let s=n.uint32()+n.pos;for(;n.pos<s;)i.intervalInMinutes.push(n.int32());continue}break;case 2:if(a===16){i.types.push(n.int32());continue}if(a===18){let s=n.uint32()+n.pos;for(;n.pos<s;)i.types.push(n.int32());continue}break;case 3:if(a!==24)break;i.discardOrigin=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{intervalInMinutes:globalThis.Array.isArray(e?.intervalInMinutes)?e.intervalInMinutes.map(t=>globalThis.Number(t)):[],types:globalThis.Array.isArray(e?.types)?e.types.map(t=>Qq(t)):[],discardOrigin:E(e.discardOrigin)?globalThis.Boolean(e.discardOrigin):!1}},toJSON(e){let t={};return e.intervalInMinutes?.length&&(t.intervalInMinutes=e.intervalInMinutes.map(n=>Math.round(n))),e.types?.length&&(t.types=e.types.map(n=>qq(n))),e.discardOrigin!==!1&&(t.discardOrigin=e.discardOrigin),t},create(e){return Go.fromPartial(e??{})},fromPartial(e){let t=t2();return t.intervalInMinutes=e.intervalInMinutes?.map(n=>n)||[],t.types=e.types?.map(n=>n)||[],t.discardOrigin=e.discardOrigin??!1,t}};function n2(){return{chainId:"",address:"",startBlock:BigInt("0"),intervalConfigs:[],moveIntervalConfigs:[],moveCallConfigs:[],moveResourceChangeConfigs:[],logConfigs:[]}}var Ho={encode(e,t=A.default.Writer.create()){if(e.chainId!==""&&t.uint32(10).string(e.chainId),e.address!==""&&t.uint32(18).string(e.address),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");t.uint32(24).uint64(e.startBlock.toString())}for(let n of e.intervalConfigs)ft.encode(n,t.uint32(34).fork()).ldelim();for(let n of e.moveIntervalConfigs)Wo.encode(n,t.uint32(58).fork()).ldelim();for(let n of e.moveCallConfigs)Cr.encode(n,t.uint32(66).fork()).ldelim();for(let n of e.moveResourceChangeConfigs)Ir.encode(n,t.uint32(74).fork()).ldelim();for(let n of e.logConfigs)wr.encode(n,t.uint32(50).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=n2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.chainId=n.string();continue;case 2:if(a!==18)break;i.address=n.string();continue;case 3:if(a!==24)break;i.startBlock=$t(n.uint64());continue;case 4:if(a!==34)break;i.intervalConfigs.push(ft.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.moveIntervalConfigs.push(Wo.decode(n,n.uint32()));continue;case 8:if(a!==66)break;i.moveCallConfigs.push(Cr.decode(n,n.uint32()));continue;case 9:if(a!==74)break;i.moveResourceChangeConfigs.push(Ir.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.logConfigs.push(wr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{chainId:E(e.chainId)?globalThis.String(e.chainId):"",address:E(e.address)?globalThis.String(e.address):"",startBlock:E(e.startBlock)?BigInt(e.startBlock):BigInt("0"),intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(t=>ft.fromJSON(t)):[],moveIntervalConfigs:globalThis.Array.isArray(e?.moveIntervalConfigs)?e.moveIntervalConfigs.map(t=>Wo.fromJSON(t)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(t=>Cr.fromJSON(t)):[],moveResourceChangeConfigs:globalThis.Array.isArray(e?.moveResourceChangeConfigs)?e.moveResourceChangeConfigs.map(t=>Ir.fromJSON(t)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(t=>wr.fromJSON(t)):[]}},toJSON(e){let t={};return e.chainId!==""&&(t.chainId=e.chainId),e.address!==""&&(t.address=e.address),e.startBlock!==BigInt("0")&&(t.startBlock=e.startBlock.toString()),e.intervalConfigs?.length&&(t.intervalConfigs=e.intervalConfigs.map(n=>ft.toJSON(n))),e.moveIntervalConfigs?.length&&(t.moveIntervalConfigs=e.moveIntervalConfigs.map(n=>Wo.toJSON(n))),e.moveCallConfigs?.length&&(t.moveCallConfigs=e.moveCallConfigs.map(n=>Cr.toJSON(n))),e.moveResourceChangeConfigs?.length&&(t.moveResourceChangeConfigs=e.moveResourceChangeConfigs.map(n=>Ir.toJSON(n))),e.logConfigs?.length&&(t.logConfigs=e.logConfigs.map(n=>wr.toJSON(n))),t},create(e){return Ho.fromPartial(e??{})},fromPartial(e){let t=n2();return t.chainId=e.chainId??"",t.address=e.address??"",t.startBlock=e.startBlock??BigInt("0"),t.intervalConfigs=e.intervalConfigs?.map(n=>ft.fromPartial(n))||[],t.moveIntervalConfigs=e.moveIntervalConfigs?.map(n=>Wo.fromPartial(n))||[],t.moveCallConfigs=e.moveCallConfigs?.map(n=>Cr.fromPartial(n))||[],t.moveResourceChangeConfigs=e.moveResourceChangeConfigs?.map(n=>Ir.fromPartial(n))||[],t.logConfigs=e.logConfigs?.map(n=>wr.fromPartial(n))||[],t}};function r2(){return{recentInterval:0,backfillInterval:0}}var Ar={encode(e,t=A.default.Writer.create()){return e.recentInterval!==0&&t.uint32(8).int32(e.recentInterval),e.backfillInterval!==0&&t.uint32(16).int32(e.backfillInterval),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=r2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.recentInterval=n.int32();continue;case 2:if(a!==16)break;i.backfillInterval=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{recentInterval:E(e.recentInterval)?globalThis.Number(e.recentInterval):0,backfillInterval:E(e.backfillInterval)?globalThis.Number(e.backfillInterval):0}},toJSON(e){let t={};return e.recentInterval!==0&&(t.recentInterval=Math.round(e.recentInterval)),e.backfillInterval!==0&&(t.backfillInterval=Math.round(e.backfillInterval)),t},create(e){return Ar.fromPartial(e??{})},fromPartial(e){let t=r2();return t.recentInterval=e.recentInterval??0,t.backfillInterval=e.backfillInterval??0,t}};function i2(){return{handlerId:0,minutes:0,minutesInterval:void 0,slot:0,slotInterval:void 0,fetchConfig:void 0}}var ft={encode(e,t=A.default.Writer.create()){return e.handlerId!==0&&t.uint32(8).int32(e.handlerId),e.minutes!==0&&t.uint32(16).int32(e.minutes),e.minutesInterval!==void 0&&Ar.encode(e.minutesInterval,t.uint32(34).fork()).ldelim(),e.slot!==0&&t.uint32(24).int32(e.slot),e.slotInterval!==void 0&&Ar.encode(e.slotInterval,t.uint32(42).fork()).ldelim(),e.fetchConfig!==void 0&&pt.encode(e.fetchConfig,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=i2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.handlerId=n.int32();continue;case 2:if(a!==16)break;i.minutes=n.int32();continue;case 4:if(a!==34)break;i.minutesInterval=Ar.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.slot=n.int32();continue;case 5:if(a!==42)break;i.slotInterval=Ar.decode(n,n.uint32());continue;case 6:if(a!==50)break;i.fetchConfig=pt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,minutes:E(e.minutes)?globalThis.Number(e.minutes):0,minutesInterval:E(e.minutesInterval)?Ar.fromJSON(e.minutesInterval):void 0,slot:E(e.slot)?globalThis.Number(e.slot):0,slotInterval:E(e.slotInterval)?Ar.fromJSON(e.slotInterval):void 0,fetchConfig:E(e.fetchConfig)?pt.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.minutes!==0&&(t.minutes=Math.round(e.minutes)),e.minutesInterval!==void 0&&(t.minutesInterval=Ar.toJSON(e.minutesInterval)),e.slot!==0&&(t.slot=Math.round(e.slot)),e.slotInterval!==void 0&&(t.slotInterval=Ar.toJSON(e.slotInterval)),e.fetchConfig!==void 0&&(t.fetchConfig=pt.toJSON(e.fetchConfig)),t},create(e){return ft.fromPartial(e??{})},fromPartial(e){let t=i2();return t.handlerId=e.handlerId??0,t.minutes=e.minutes??0,t.minutesInterval=e.minutesInterval!==void 0&&e.minutesInterval!==null?Ar.fromPartial(e.minutesInterval):void 0,t.slot=e.slot??0,t.slotInterval=e.slotInterval!==void 0&&e.slotInterval!==null?Ar.fromPartial(e.slotInterval):void 0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?pt.fromPartial(e.fetchConfig):void 0,t}};function a2(){return{intervalConfig:void 0,type:""}}var Kq={encode(e,t=A.default.Writer.create()){return e.intervalConfig!==void 0&&ft.encode(e.intervalConfig,t.uint32(10).fork()).ldelim(),e.type!==""&&t.uint32(18).string(e.type),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=a2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.intervalConfig=ft.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.type=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{intervalConfig:E(e.intervalConfig)?ft.fromJSON(e.intervalConfig):void 0,type:E(e.type)?globalThis.String(e.type):""}},toJSON(e){let t={};return e.intervalConfig!==void 0&&(t.intervalConfig=ft.toJSON(e.intervalConfig)),e.type!==""&&(t.type=e.type),t},create(e){return Kq.fromPartial(e??{})},fromPartial(e){let t=a2();return t.intervalConfig=e.intervalConfig!==void 0&&e.intervalConfig!==null?ft.fromPartial(e.intervalConfig):void 0,t.type=e.type??"",t}};function s2(){return{intervalConfig:void 0,type:"",ownerType:0,fetchConfig:void 0}}var Wo={encode(e,t=A.default.Writer.create()){return e.intervalConfig!==void 0&&ft.encode(e.intervalConfig,t.uint32(10).fork()).ldelim(),e.type!==""&&t.uint32(18).string(e.type),e.ownerType!==0&&t.uint32(24).int32(e.ownerType),e.fetchConfig!==void 0&&rc.encode(e.fetchConfig,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=s2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.intervalConfig=ft.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.type=n.string();continue;case 3:if(a!==24)break;i.ownerType=n.int32();continue;case 4:if(a!==34)break;i.fetchConfig=rc.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{intervalConfig:E(e.intervalConfig)?ft.fromJSON(e.intervalConfig):void 0,type:E(e.type)?globalThis.String(e.type):"",ownerType:E(e.ownerType)?Vq(e.ownerType):0,fetchConfig:E(e.fetchConfig)?rc.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.intervalConfig!==void 0&&(t.intervalConfig=ft.toJSON(e.intervalConfig)),e.type!==""&&(t.type=e.type),e.ownerType!==0&&(t.ownerType=Jq(e.ownerType)),e.fetchConfig!==void 0&&(t.fetchConfig=rc.toJSON(e.fetchConfig)),t},create(e){return Wo.fromPartial(e??{})},fromPartial(e){let t=s2();return t.intervalConfig=e.intervalConfig!==void 0&&e.intervalConfig!==null?ft.fromPartial(e.intervalConfig):void 0,t.type=e.type??"",t.ownerType=e.ownerType??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?rc.fromPartial(e.fetchConfig):void 0,t}};function o2(){return{name:"",chainId:"",address:"",abi:""}}var br={encode(e,t=A.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.chainId!==""&&t.uint32(18).string(e.chainId),e.address!==""&&t.uint32(26).string(e.address),e.abi!==""&&t.uint32(34).string(e.abi),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=o2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==18)break;i.chainId=n.string();continue;case 3:if(a!==26)break;i.address=n.string();continue;case 4:if(a!==34)break;i.abi=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",chainId:E(e.chainId)?globalThis.String(e.chainId):"",address:E(e.address)?globalThis.String(e.address):"",abi:E(e.abi)?globalThis.String(e.abi):""}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.chainId!==""&&(t.chainId=e.chainId),e.address!==""&&(t.address=e.address),e.abi!==""&&(t.abi=e.abi),t},create(e){return br.fromPartial(e??{})},fromPartial(e){let t=o2();return t.name=e.name??"",t.chainId=e.chainId??"",t.address=e.address??"",t.abi=e.abi??"",t}};function c2(){return{contract:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),templateId:0,baseLabels:void 0}}var vr={encode(e,t=A.default.Writer.create()){if(e.contract!==void 0&&br.encode(e.contract,t.uint32(10).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");t.uint32(16).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");t.uint32(24).uint64(e.endBlock.toString())}return e.templateId!==0&&t.uint32(32).int32(e.templateId),e.baseLabels!==void 0&&P.encode(P.wrap(e.baseLabels),t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=c2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.contract=br.decode(n,n.uint32());continue;case 2:if(a!==16)break;i.startBlock=$t(n.uint64());continue;case 3:if(a!==24)break;i.endBlock=$t(n.uint64());continue;case 4:if(a!==32)break;i.templateId=n.int32();continue;case 5:if(a!==42)break;i.baseLabels=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{contract:E(e.contract)?br.fromJSON(e.contract):void 0,startBlock:E(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:E(e.endBlock)?BigInt(e.endBlock):BigInt("0"),templateId:E(e.templateId)?globalThis.Number(e.templateId):0,baseLabels:qe(e.baseLabels)?e.baseLabels:void 0}},toJSON(e){let t={};return e.contract!==void 0&&(t.contract=br.toJSON(e.contract)),e.startBlock!==BigInt("0")&&(t.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(t.endBlock=e.endBlock.toString()),e.templateId!==0&&(t.templateId=Math.round(e.templateId)),e.baseLabels!==void 0&&(t.baseLabels=e.baseLabels),t},create(e){return vr.fromPartial(e??{})},fromPartial(e){let t=c2();return t.contract=e.contract!==void 0&&e.contract!==null?br.fromPartial(e.contract):void 0,t.startBlock=e.startBlock??BigInt("0"),t.endBlock=e.endBlock??BigInt("0"),t.templateId=e.templateId??0,t.baseLabels=e.baseLabels??void 0,t}};function u2(){return{templateInstances:[]}}var zN={encode(e,t=A.default.Writer.create()){for(let n of e.templateInstances)vr.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=u2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.templateInstances.push(vr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(t=>vr.fromJSON(t)):[]}},toJSON(e){let t={};return e.templateInstances?.length&&(t.templateInstances=e.templateInstances.map(n=>vr.toJSON(n))),t},create(e){return zN.fromPartial(e??{})},fromPartial(e){let t=u2();return t.templateInstances=e.templateInstances?.map(n=>vr.fromPartial(n))||[],t}};function l2(){return{handlerId:0}}var jq={encode(e,t=A.default.Writer.create()){return e.handlerId!==0&&t.uint32(8).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=l2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return jq.fromPartial(e??{})},fromPartial(e){let t=l2();return t.handlerId=e.handlerId??0,t}};function d2(){return{transaction:!1,transactionReceipt:!1,transactionReceiptLogs:!1,block:!1,trace:!1}}var pt={encode(e,t=A.default.Writer.create()){return e.transaction!==!1&&t.uint32(8).bool(e.transaction),e.transactionReceipt!==!1&&t.uint32(16).bool(e.transactionReceipt),e.transactionReceiptLogs!==!1&&t.uint32(40).bool(e.transactionReceiptLogs),e.block!==!1&&t.uint32(24).bool(e.block),e.trace!==!1&&t.uint32(32).bool(e.trace),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=d2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.transaction=n.bool();continue;case 2:if(a!==16)break;i.transactionReceipt=n.bool();continue;case 5:if(a!==40)break;i.transactionReceiptLogs=n.bool();continue;case 3:if(a!==24)break;i.block=n.bool();continue;case 4:if(a!==32)break;i.trace=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:E(e.transaction)?globalThis.Boolean(e.transaction):!1,transactionReceipt:E(e.transactionReceipt)?globalThis.Boolean(e.transactionReceipt):!1,transactionReceiptLogs:E(e.transactionReceiptLogs)?globalThis.Boolean(e.transactionReceiptLogs):!1,block:E(e.block)?globalThis.Boolean(e.block):!1,trace:E(e.trace)?globalThis.Boolean(e.trace):!1}},toJSON(e){let t={};return e.transaction!==!1&&(t.transaction=e.transaction),e.transactionReceipt!==!1&&(t.transactionReceipt=e.transactionReceipt),e.transactionReceiptLogs!==!1&&(t.transactionReceiptLogs=e.transactionReceiptLogs),e.block!==!1&&(t.block=e.block),e.trace!==!1&&(t.trace=e.trace),t},create(e){return pt.fromPartial(e??{})},fromPartial(e){let t=d2();return t.transaction=e.transaction??!1,t.transactionReceipt=e.transactionReceipt??!1,t.transactionReceiptLogs=e.transactionReceiptLogs??!1,t.block=e.block??!1,t.trace=e.trace??!1,t}};function f2(){return{signature:"",handlerId:0,fetchConfig:void 0}}var Zo={encode(e,t=A.default.Writer.create()){return e.signature!==""&&t.uint32(10).string(e.signature),e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&pt.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=f2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.signature=n.string();continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=pt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{signature:E(e.signature)?globalThis.String(e.signature):"",handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?pt.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.signature!==""&&(t.signature=e.signature),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=pt.toJSON(e.fetchConfig)),t},create(e){return Zo.fromPartial(e??{})},fromPartial(e){let t=f2();return t.signature=e.signature??"",t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?pt.fromPartial(e.fetchConfig):void 0,t}};function p2(){return{handlerId:0,fetchConfig:void 0}}var Yo={encode(e,t=A.default.Writer.create()){return e.handlerId!==0&&t.uint32(8).int32(e.handlerId),e.fetchConfig!==void 0&&pt.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=p2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=pt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?pt.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=pt.toJSON(e.fetchConfig)),t},create(e){return Yo.fromPartial(e??{})},fromPartial(e){let t=p2();return t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?pt.fromPartial(e.fetchConfig):void 0,t}};function h2(){return{filters:[],handlerId:0,fetchConfig:void 0}}var wr={encode(e,t=A.default.Writer.create()){for(let n of e.filters)ec.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&pt.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=h2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(ec.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=pt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>ec.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?pt.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>ec.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=pt.toJSON(e.fetchConfig)),t},create(e){return wr.fromPartial(e??{})},fromPartial(e){let t=h2();return t.filters=e.filters?.map(n=>ec.fromPartial(n))||[],t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?pt.fromPartial(e.fetchConfig):void 0,t}};function m2(){return{filters:[],handlerId:0}}var Xo={encode(e,t=A.default.Writer.create()){for(let n of e.filters)$o.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=m2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push($o.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>$o.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>$o.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Xo.fromPartial(e??{})},fromPartial(e){let t=m2();return t.filters=e.filters?.map(n=>$o.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function g2(){return{assetId:void 0,fromAddress:void 0,toAddress:void 0}}var $o={encode(e,t=A.default.Writer.create()){return e.assetId!==void 0&&t.uint32(10).string(e.assetId),e.fromAddress!==void 0&&t.uint32(18).string(e.fromAddress),e.toAddress!==void 0&&t.uint32(26).string(e.toAddress),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=g2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.assetId=n.string();continue;case 2:if(a!==18)break;i.fromAddress=n.string();continue;case 3:if(a!==26)break;i.toAddress=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{assetId:E(e.assetId)?globalThis.String(e.assetId):void 0,fromAddress:E(e.fromAddress)?globalThis.String(e.fromAddress):void 0,toAddress:E(e.toAddress)?globalThis.String(e.toAddress):void 0}},toJSON(e){let t={};return e.assetId!==void 0&&(t.assetId=e.assetId),e.fromAddress!==void 0&&(t.fromAddress=e.fromAddress),e.toAddress!==void 0&&(t.toAddress=e.toAddress),t},create(e){return $o.fromPartial(e??{})},fromPartial(e){let t=g2();return t.assetId=e.assetId??void 0,t.fromAddress=e.fromAddress??void 0,t.toAddress=e.toAddress??void 0,t}};function _2(){return{logIds:[],handlerId:0}}var Ko={encode(e,t=A.default.Writer.create()){for(let n of e.logIds)t.uint32(10).string(n);return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=_2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.logIds.push(n.string());continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{logIds:globalThis.Array.isArray(e?.logIds)?e.logIds.map(t=>globalThis.String(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.logIds?.length&&(t.logIds=e.logIds),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Ko.fromPartial(e??{})},fromPartial(e){let t=_2();return t.logIds=e.logIds?.map(n=>n)||[],t.handlerId=e.handlerId??0,t}};function A2(){return{logFilters:[],handlerId:0}}var jo={encode(e,t=A.default.Writer.create()){for(let n of e.logFilters)t.uint32(10).string(n);return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=A2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.logFilters.push(n.string());continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{logFilters:globalThis.Array.isArray(e?.logFilters)?e.logFilters.map(t=>globalThis.String(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.logFilters?.length&&(t.logFilters=e.logFilters),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return jo.fromPartial(e??{})},fromPartial(e){let t=A2();return t.logFilters=e.logFilters?.map(n=>n)||[],t.handlerId=e.handlerId??0,t}};function y2(){return{topics:[],address:void 0,addressType:void 0}}var ec={encode(e,t=A.default.Writer.create()){for(let n of e.topics)mc.encode(n,t.uint32(10).fork()).ldelim();return e.address!==void 0&&t.uint32(18).string(e.address),e.addressType!==void 0&&t.uint32(24).int32(e.addressType),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=y2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.topics.push(mc.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.address=n.string();continue;case 3:if(a!==24)break;i.addressType=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{topics:globalThis.Array.isArray(e?.topics)?e.topics.map(t=>mc.fromJSON(t)):[],address:E(e.address)?globalThis.String(e.address):void 0,addressType:E(e.addressType)?zq(e.addressType):void 0}},toJSON(e){let t={};return e.topics?.length&&(t.topics=e.topics.map(n=>mc.toJSON(n))),e.address!==void 0&&(t.address=e.address),e.addressType!==void 0&&(t.addressType=Gq(e.addressType)),t},create(e){return ec.fromPartial(e??{})},fromPartial(e){let t=y2();return t.topics=e.topics?.map(n=>mc.fromPartial(n))||[],t.address=e.address??void 0,t.addressType=e.addressType??void 0,t}};function b2(){return{innerInstruction:!1,parsedInstruction:!1,rawDataInstruction:!1}}var tc={encode(e,t=A.default.Writer.create()){return e.innerInstruction!==!1&&t.uint32(8).bool(e.innerInstruction),e.parsedInstruction!==!1&&t.uint32(16).bool(e.parsedInstruction),e.rawDataInstruction!==!1&&t.uint32(24).bool(e.rawDataInstruction),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=b2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.innerInstruction=n.bool();continue;case 2:if(a!==16)break;i.parsedInstruction=n.bool();continue;case 3:if(a!==24)break;i.rawDataInstruction=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{innerInstruction:E(e.innerInstruction)?globalThis.Boolean(e.innerInstruction):!1,parsedInstruction:E(e.parsedInstruction)?globalThis.Boolean(e.parsedInstruction):!1,rawDataInstruction:E(e.rawDataInstruction)?globalThis.Boolean(e.rawDataInstruction):!1}},toJSON(e){let t={};return e.innerInstruction!==!1&&(t.innerInstruction=e.innerInstruction),e.parsedInstruction!==!1&&(t.parsedInstruction=e.parsedInstruction),e.rawDataInstruction!==!1&&(t.rawDataInstruction=e.rawDataInstruction),t},create(e){return tc.fromPartial(e??{})},fromPartial(e){let t=b2();return t.innerInstruction=e.innerInstruction??!1,t.parsedInstruction=e.parsedInstruction??!1,t.rawDataInstruction=e.rawDataInstruction??!1,t}};function v2(){return{moveTypePrefix:""}}var nc={encode(e,t=A.default.Writer.create()){return e.moveTypePrefix!==""&&t.uint32(10).string(e.moveTypePrefix),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=v2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.moveTypePrefix=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{moveTypePrefix:E(e.moveTypePrefix)?globalThis.String(e.moveTypePrefix):""}},toJSON(e){let t={};return e.moveTypePrefix!==""&&(t.moveTypePrefix=e.moveTypePrefix),t},create(e){return nc.fromPartial(e??{})},fromPartial(e){let t=v2();return t.moveTypePrefix=e.moveTypePrefix??"",t}};function w2(){return{resourceChanges:!1,allEvents:!1,inputs:!1,resourceConfig:void 0,supportMultisigFunc:void 0}}var Er={encode(e,t=A.default.Writer.create()){return e.resourceChanges!==!1&&t.uint32(8).bool(e.resourceChanges),e.allEvents!==!1&&t.uint32(16).bool(e.allEvents),e.inputs!==!1&&t.uint32(32).bool(e.inputs),e.resourceConfig!==void 0&&nc.encode(e.resourceConfig,t.uint32(26).fork()).ldelim(),e.supportMultisigFunc!==void 0&&t.uint32(40).bool(e.supportMultisigFunc),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=w2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.resourceChanges=n.bool();continue;case 2:if(a!==16)break;i.allEvents=n.bool();continue;case 4:if(a!==32)break;i.inputs=n.bool();continue;case 3:if(a!==26)break;i.resourceConfig=nc.decode(n,n.uint32());continue;case 5:if(a!==40)break;i.supportMultisigFunc=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{resourceChanges:E(e.resourceChanges)?globalThis.Boolean(e.resourceChanges):!1,allEvents:E(e.allEvents)?globalThis.Boolean(e.allEvents):!1,inputs:E(e.inputs)?globalThis.Boolean(e.inputs):!1,resourceConfig:E(e.resourceConfig)?nc.fromJSON(e.resourceConfig):void 0,supportMultisigFunc:E(e.supportMultisigFunc)?globalThis.Boolean(e.supportMultisigFunc):void 0}},toJSON(e){let t={};return e.resourceChanges!==!1&&(t.resourceChanges=e.resourceChanges),e.allEvents!==!1&&(t.allEvents=e.allEvents),e.inputs!==!1&&(t.inputs=e.inputs),e.resourceConfig!==void 0&&(t.resourceConfig=nc.toJSON(e.resourceConfig)),e.supportMultisigFunc!==void 0&&(t.supportMultisigFunc=e.supportMultisigFunc),t},create(e){return Er.fromPartial(e??{})},fromPartial(e){let t=w2();return t.resourceChanges=e.resourceChanges??!1,t.allEvents=e.allEvents??!1,t.inputs=e.inputs??!1,t.resourceConfig=e.resourceConfig!==void 0&&e.resourceConfig!==null?nc.fromPartial(e.resourceConfig):void 0,t.supportMultisigFunc=e.supportMultisigFunc??void 0,t}};function E2(){return{owned:!1}}var rc={encode(e,t=A.default.Writer.create()){return e.owned!==!1&&t.uint32(8).bool(e.owned),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=E2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.owned=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{owned:E(e.owned)?globalThis.Boolean(e.owned):!1}},toJSON(e){let t={};return e.owned!==!1&&(t.owned=e.owned),t},create(e){return rc.fromPartial(e??{})},fromPartial(e){let t=E2();return t.owned=e.owned??!1,t}};function C2(){return{filters:[],handlerId:0,fetchConfig:void 0}}var ic={encode(e,t=A.default.Writer.create()){for(let n of e.filters)ac.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&Er.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=C2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(ac.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=Er.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>ac.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?Er.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>ac.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=Er.toJSON(e.fetchConfig)),t},create(e){return ic.fromPartial(e??{})},fromPartial(e){let t=C2();return t.filters=e.filters?.map(n=>ac.fromPartial(n))||[],t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Er.fromPartial(e.fetchConfig):void 0,t}};function I2(){return{type:"",account:""}}var ac={encode(e,t=A.default.Writer.create()){return e.type!==""&&t.uint32(10).string(e.type),e.account!==""&&t.uint32(18).string(e.account),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=I2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.type=n.string();continue;case 2:if(a!==18)break;i.account=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{type:E(e.type)?globalThis.String(e.type):"",account:E(e.account)?globalThis.String(e.account):""}},toJSON(e){let t={};return e.type!==""&&(t.type=e.type),e.account!==""&&(t.account=e.account),t},create(e){return ac.fromPartial(e??{})},fromPartial(e){let t=I2();return t.type=e.type??"",t.account=e.account??"",t}};function S2(){return{filters:[],handlerId:0,fetchConfig:void 0}}var Cr={encode(e,t=A.default.Writer.create()){for(let n of e.filters)sc.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&Er.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=S2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(sc.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=Er.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>sc.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?Er.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>sc.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=Er.toJSON(e.fetchConfig)),t},create(e){return Cr.fromPartial(e??{})},fromPartial(e){let t=S2();return t.filters=e.filters?.map(n=>sc.fromPartial(n))||[],t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Er.fromPartial(e.fetchConfig):void 0,t}};function x2(){return{type:"",handlerId:0}}var Ir={encode(e,t=A.default.Writer.create()){return e.type!==""&&t.uint32(10).string(e.type),e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=x2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.type=n.string();continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{type:E(e.type)?globalThis.String(e.type):"",handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.type!==""&&(t.type=e.type),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Ir.fromPartial(e??{})},fromPartial(e){let t=x2();return t.type=e.type??"",t.handlerId=e.handlerId??0,t}};function T2(){return{function:"",typeArguments:[],withTypeArguments:!1,includeFailed:!1,publicKeyPrefix:"",fromAndToAddress:void 0}}var sc={encode(e,t=A.default.Writer.create()){e.function!==""&&t.uint32(10).string(e.function);for(let n of e.typeArguments)t.uint32(18).string(n);return e.withTypeArguments!==!1&&t.uint32(24).bool(e.withTypeArguments),e.includeFailed!==!1&&t.uint32(32).bool(e.includeFailed),e.publicKeyPrefix!==""&&t.uint32(42).string(e.publicKeyPrefix),e.fromAndToAddress!==void 0&&oc.encode(e.fromAndToAddress,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=T2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.function=n.string();continue;case 2:if(a!==18)break;i.typeArguments.push(n.string());continue;case 3:if(a!==24)break;i.withTypeArguments=n.bool();continue;case 4:if(a!==32)break;i.includeFailed=n.bool();continue;case 5:if(a!==42)break;i.publicKeyPrefix=n.string();continue;case 6:if(a!==50)break;i.fromAndToAddress=oc.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{function:E(e.function)?globalThis.String(e.function):"",typeArguments:globalThis.Array.isArray(e?.typeArguments)?e.typeArguments.map(t=>globalThis.String(t)):[],withTypeArguments:E(e.withTypeArguments)?globalThis.Boolean(e.withTypeArguments):!1,includeFailed:E(e.includeFailed)?globalThis.Boolean(e.includeFailed):!1,publicKeyPrefix:E(e.publicKeyPrefix)?globalThis.String(e.publicKeyPrefix):"",fromAndToAddress:E(e.fromAndToAddress)?oc.fromJSON(e.fromAndToAddress):void 0}},toJSON(e){let t={};return e.function!==""&&(t.function=e.function),e.typeArguments?.length&&(t.typeArguments=e.typeArguments),e.withTypeArguments!==!1&&(t.withTypeArguments=e.withTypeArguments),e.includeFailed!==!1&&(t.includeFailed=e.includeFailed),e.publicKeyPrefix!==""&&(t.publicKeyPrefix=e.publicKeyPrefix),e.fromAndToAddress!==void 0&&(t.fromAndToAddress=oc.toJSON(e.fromAndToAddress)),t},create(e){return sc.fromPartial(e??{})},fromPartial(e){let t=T2();return t.function=e.function??"",t.typeArguments=e.typeArguments?.map(n=>n)||[],t.withTypeArguments=e.withTypeArguments??!1,t.includeFailed=e.includeFailed??!1,t.publicKeyPrefix=e.publicKeyPrefix??"",t.fromAndToAddress=e.fromAndToAddress!==void 0&&e.fromAndToAddress!==null?oc.fromPartial(e.fromAndToAddress):void 0,t}};function N2(){return{from:"",to:""}}var oc={encode(e,t=A.default.Writer.create()){return e.from!==""&&t.uint32(10).string(e.from),e.to!==""&&t.uint32(18).string(e.to),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=N2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.from=n.string();continue;case 2:if(a!==18)break;i.to=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{from:E(e.from)?globalThis.String(e.from):"",to:E(e.to)?globalThis.String(e.to):""}},toJSON(e){let t={};return e.from!==""&&(t.from=e.from),e.to!==""&&(t.to=e.to),t},create(e){return oc.fromPartial(e??{})},fromPartial(e){let t=N2();return t.from=e.from??"",t.to=e.to??"",t}};function R2(){return{filters:[],handlerId:0}}var cc={encode(e,t=A.default.Writer.create()){for(let n of e.filters)fc.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=R2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(fc.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>fc.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>fc.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return cc.fromPartial(e??{})},fromPartial(e){let t=R2();return t.filters=e.filters?.map(n=>fc.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function k2(){return{filters:[],handlerId:0}}var uc={encode(e,t=A.default.Writer.create()){for(let n of e.filters)Sr.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=k2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(Sr.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Sr.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>Sr.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return uc.fromPartial(e??{})},fromPartial(e){let t=k2();return t.filters=e.filters?.map(n=>Sr.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function B2(){return{inputFilter:void 0,outputFilter:void 0,filter:[]}}var Sr={encode(e,t=A.default.Writer.create()){e.inputFilter!==void 0&&lc.encode(e.inputFilter,t.uint32(10).fork()).ldelim(),e.outputFilter!==void 0&&dc.encode(e.outputFilter,t.uint32(18).fork()).ldelim();for(let n of e.filter)Yt.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=B2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.inputFilter=lc.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.outputFilter=dc.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.filter.push(Yt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{inputFilter:E(e.inputFilter)?lc.fromJSON(e.inputFilter):void 0,outputFilter:E(e.outputFilter)?dc.fromJSON(e.outputFilter):void 0,filter:globalThis.Array.isArray(e?.filter)?e.filter.map(t=>Yt.fromJSON(t)):[]}},toJSON(e){let t={};return e.inputFilter!==void 0&&(t.inputFilter=lc.toJSON(e.inputFilter)),e.outputFilter!==void 0&&(t.outputFilter=dc.toJSON(e.outputFilter)),e.filter?.length&&(t.filter=e.filter.map(n=>Yt.toJSON(n))),t},create(e){return Sr.fromPartial(e??{})},fromPartial(e){let t=B2();return t.inputFilter=e.inputFilter!==void 0&&e.inputFilter!==null?lc.fromPartial(e.inputFilter):void 0,t.outputFilter=e.outputFilter!==void 0&&e.outputFilter!==null?dc.fromPartial(e.outputFilter):void 0,t.filter=e.filter?.map(n=>Yt.fromPartial(n))||[],t}};function O2(){return{eq:void 0,gt:void 0,gte:void 0,lt:void 0,lte:void 0,ne:void 0,prefix:void 0,contains:void 0,notContains:void 0,lengthEq:void 0,lengthGt:void 0,lengthLt:void 0,hasAny:void 0,hasAll:void 0,in:void 0}}var ki={encode(e,t=A.default.Writer.create()){return e.eq!==void 0&&me.encode(e.eq,t.uint32(10).fork()).ldelim(),e.gt!==void 0&&me.encode(e.gt,t.uint32(18).fork()).ldelim(),e.gte!==void 0&&me.encode(e.gte,t.uint32(26).fork()).ldelim(),e.lt!==void 0&&me.encode(e.lt,t.uint32(34).fork()).ldelim(),e.lte!==void 0&&me.encode(e.lte,t.uint32(42).fork()).ldelim(),e.ne!==void 0&&me.encode(e.ne,t.uint32(50).fork()).ldelim(),e.prefix!==void 0&&t.uint32(58).string(e.prefix),e.contains!==void 0&&t.uint32(66).string(e.contains),e.notContains!==void 0&&t.uint32(74).string(e.notContains),e.lengthEq!==void 0&&t.uint32(80).int32(e.lengthEq),e.lengthGt!==void 0&&t.uint32(88).int32(e.lengthGt),e.lengthLt!==void 0&&t.uint32(96).int32(e.lengthLt),e.hasAny!==void 0&&Ge.encode(e.hasAny,t.uint32(106).fork()).ldelim(),e.hasAll!==void 0&&Ge.encode(e.hasAll,t.uint32(114).fork()).ldelim(),e.in!==void 0&&Ge.encode(e.in,t.uint32(122).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=O2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.eq=me.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.gt=me.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.gte=me.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.lt=me.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.lte=me.decode(n,n.uint32());continue;case 6:if(a!==50)break;i.ne=me.decode(n,n.uint32());continue;case 7:if(a!==58)break;i.prefix=n.string();continue;case 8:if(a!==66)break;i.contains=n.string();continue;case 9:if(a!==74)break;i.notContains=n.string();continue;case 10:if(a!==80)break;i.lengthEq=n.int32();continue;case 11:if(a!==88)break;i.lengthGt=n.int32();continue;case 12:if(a!==96)break;i.lengthLt=n.int32();continue;case 13:if(a!==106)break;i.hasAny=Ge.decode(n,n.uint32());continue;case 14:if(a!==114)break;i.hasAll=Ge.decode(n,n.uint32());continue;case 15:if(a!==122)break;i.in=Ge.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{eq:E(e.eq)?me.fromJSON(e.eq):void 0,gt:E(e.gt)?me.fromJSON(e.gt):void 0,gte:E(e.gte)?me.fromJSON(e.gte):void 0,lt:E(e.lt)?me.fromJSON(e.lt):void 0,lte:E(e.lte)?me.fromJSON(e.lte):void 0,ne:E(e.ne)?me.fromJSON(e.ne):void 0,prefix:E(e.prefix)?globalThis.String(e.prefix):void 0,contains:E(e.contains)?globalThis.String(e.contains):void 0,notContains:E(e.notContains)?globalThis.String(e.notContains):void 0,lengthEq:E(e.lengthEq)?globalThis.Number(e.lengthEq):void 0,lengthGt:E(e.lengthGt)?globalThis.Number(e.lengthGt):void 0,lengthLt:E(e.lengthLt)?globalThis.Number(e.lengthLt):void 0,hasAny:E(e.hasAny)?Ge.fromJSON(e.hasAny):void 0,hasAll:E(e.hasAll)?Ge.fromJSON(e.hasAll):void 0,in:E(e.in)?Ge.fromJSON(e.in):void 0}},toJSON(e){let t={};return e.eq!==void 0&&(t.eq=me.toJSON(e.eq)),e.gt!==void 0&&(t.gt=me.toJSON(e.gt)),e.gte!==void 0&&(t.gte=me.toJSON(e.gte)),e.lt!==void 0&&(t.lt=me.toJSON(e.lt)),e.lte!==void 0&&(t.lte=me.toJSON(e.lte)),e.ne!==void 0&&(t.ne=me.toJSON(e.ne)),e.prefix!==void 0&&(t.prefix=e.prefix),e.contains!==void 0&&(t.contains=e.contains),e.notContains!==void 0&&(t.notContains=e.notContains),e.lengthEq!==void 0&&(t.lengthEq=Math.round(e.lengthEq)),e.lengthGt!==void 0&&(t.lengthGt=Math.round(e.lengthGt)),e.lengthLt!==void 0&&(t.lengthLt=Math.round(e.lengthLt)),e.hasAny!==void 0&&(t.hasAny=Ge.toJSON(e.hasAny)),e.hasAll!==void 0&&(t.hasAll=Ge.toJSON(e.hasAll)),e.in!==void 0&&(t.in=Ge.toJSON(e.in)),t},create(e){return ki.fromPartial(e??{})},fromPartial(e){let t=O2();return t.eq=e.eq!==void 0&&e.eq!==null?me.fromPartial(e.eq):void 0,t.gt=e.gt!==void 0&&e.gt!==null?me.fromPartial(e.gt):void 0,t.gte=e.gte!==void 0&&e.gte!==null?me.fromPartial(e.gte):void 0,t.lt=e.lt!==void 0&&e.lt!==null?me.fromPartial(e.lt):void 0,t.lte=e.lte!==void 0&&e.lte!==null?me.fromPartial(e.lte):void 0,t.ne=e.ne!==void 0&&e.ne!==null?me.fromPartial(e.ne):void 0,t.prefix=e.prefix??void 0,t.contains=e.contains??void 0,t.notContains=e.notContains??void 0,t.lengthEq=e.lengthEq??void 0,t.lengthGt=e.lengthGt??void 0,t.lengthLt=e.lengthLt??void 0,t.hasAny=e.hasAny!==void 0&&e.hasAny!==null?Ge.fromPartial(e.hasAny):void 0,t.hasAll=e.hasAll!==void 0&&e.hasAll!==null?Ge.fromPartial(e.hasAll):void 0,t.in=e.in!==void 0&&e.in!==null?Ge.fromPartial(e.in):void 0,t}};function P2(){return{conditions:{}}}var Yt={encode(e,t=A.default.Writer.create()){return Object.entries(e.conditions).forEach(([n,r])=>{fy.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=P2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=fy.decode(n,n.uint32());s.value!==void 0&&(i.conditions[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{conditions:qe(e.conditions)?Object.entries(e.conditions).reduce((t,[n,r])=>(t[n]=ki.fromJSON(r),t),{}):{}}},toJSON(e){let t={};if(e.conditions){let n=Object.entries(e.conditions);n.length>0&&(t.conditions={},n.forEach(([r,i])=>{t.conditions[r]=ki.toJSON(i)}))}return t},create(e){return Yt.fromPartial(e??{})},fromPartial(e){let t=P2();return t.conditions=Object.entries(e.conditions??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=ki.fromPartial(i)),n),{}),t}};function D2(){return{key:"",value:void 0}}var fy={encode(e,t=A.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&ki.encode(e.value,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=D2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=ki.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:E(e.key)?globalThis.String(e.key):"",value:E(e.value)?ki.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==void 0&&(t.value=ki.toJSON(e.value)),t},create(e){return fy.fromPartial(e??{})},fromPartial(e){let t=D2();return t.key=e.key??"",t.value=e.value!==void 0&&e.value!==null?ki.fromPartial(e.value):void 0,t}};function M2(){return{filters:[]}}var xr={encode(e,t=A.default.Writer.create()){for(let n of e.filters)Yt.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=M2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(Yt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Yt.fromJSON(t)):[]}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>Yt.toJSON(n))),t},create(e){return xr.fromPartial(e??{})},fromPartial(e){let t=M2();return t.filters=e.filters?.map(n=>Yt.fromPartial(n))||[],t}};function F2(){return{filters:void 0,preVOut:void 0,preTransaction:void 0}}var lc={encode(e,t=A.default.Writer.create()){return e.filters!==void 0&&xr.encode(e.filters,t.uint32(10).fork()).ldelim(),e.preVOut!==void 0&&Yt.encode(e.preVOut,t.uint32(18).fork()).ldelim(),e.preTransaction!==void 0&&Sr.encode(e.preTransaction,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=F2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters=xr.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.preVOut=Yt.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.preTransaction=Sr.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:E(e.filters)?xr.fromJSON(e.filters):void 0,preVOut:E(e.preVOut)?Yt.fromJSON(e.preVOut):void 0,preTransaction:E(e.preTransaction)?Sr.fromJSON(e.preTransaction):void 0}},toJSON(e){let t={};return e.filters!==void 0&&(t.filters=xr.toJSON(e.filters)),e.preVOut!==void 0&&(t.preVOut=Yt.toJSON(e.preVOut)),e.preTransaction!==void 0&&(t.preTransaction=Sr.toJSON(e.preTransaction)),t},create(e){return lc.fromPartial(e??{})},fromPartial(e){let t=F2();return t.filters=e.filters!==void 0&&e.filters!==null?xr.fromPartial(e.filters):void 0,t.preVOut=e.preVOut!==void 0&&e.preVOut!==null?Yt.fromPartial(e.preVOut):void 0,t.preTransaction=e.preTransaction!==void 0&&e.preTransaction!==null?Sr.fromPartial(e.preTransaction):void 0,t}};function L2(){return{filters:void 0}}var dc={encode(e,t=A.default.Writer.create()){return e.filters!==void 0&&xr.encode(e.filters,t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=L2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters=xr.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:E(e.filters)?xr.fromJSON(e.filters):void 0}},toJSON(e){let t={};return e.filters!==void 0&&(t.filters=xr.toJSON(e.filters)),t},create(e){return dc.fromPartial(e??{})},fromPartial(e){let t=L2();return t.filters=e.filters!==void 0&&e.filters!==null?xr.fromPartial(e.filters):void 0,t}};function U2(){return{address:"",keys:[]}}var fc={encode(e,t=A.default.Writer.create()){e.address!==""&&t.uint32(10).string(e.address);for(let n of e.keys)t.uint32(18).string(n);return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=U2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.address=n.string();continue;case 2:if(a!==18)break;i.keys.push(n.string());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{address:E(e.address)?globalThis.String(e.address):"",keys:globalThis.Array.isArray(e?.keys)?e.keys.map(t=>globalThis.String(t)):[]}},toJSON(e){let t={};return e.address!==""&&(t.address=e.address),e.keys?.length&&(t.keys=e.keys),t},create(e){return fc.fromPartial(e??{})},fromPartial(e){let t=U2();return t.address=e.address??"",t.keys=e.keys?.map(n=>n)||[],t}};function Q2(){return{function:"",includeFailed:!1}}var pc={encode(e,t=A.default.Writer.create()){return e.function!==""&&t.uint32(10).string(e.function),e.includeFailed!==!1&&t.uint32(16).bool(e.includeFailed),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Q2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.function=n.string();continue;case 2:if(a!==16)break;i.includeFailed=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{function:E(e.function)?globalThis.String(e.function):"",includeFailed:E(e.includeFailed)?globalThis.Boolean(e.includeFailed):!1}},toJSON(e){let t={};return e.function!==""&&(t.function=e.function),e.includeFailed!==!1&&(t.includeFailed=e.includeFailed),t},create(e){return pc.fromPartial(e??{})},fromPartial(e){let t=Q2();return t.function=e.function??"",t.includeFailed=e.includeFailed??!1,t}};function q2(){return{filters:[],handlerId:0}}var hc={encode(e,t=A.default.Writer.create()){for(let n of e.filters)pc.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=q2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(pc.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>pc.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>pc.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return hc.fromPartial(e??{})},fromPartial(e){let t=q2();return t.filters=e.filters?.map(n=>pc.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function V2(){return{hashes:[]}}var mc={encode(e,t=A.default.Writer.create()){for(let n of e.hashes)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=V2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.hashes.push(n.string());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{hashes:globalThis.Array.isArray(e?.hashes)?e.hashes.map(t=>globalThis.String(t)):[]}},toJSON(e){let t={};return e.hashes?.length&&(t.hashes=e.hashes),t},create(e){return mc.fromPartial(e??{})},fromPartial(e){let t=V2();return t.hashes=e.hashes?.map(n=>n)||[],t}};function J2(){return{bindings:[]}}var GN={encode(e,t=A.default.Writer.create()){for(let n of e.bindings)Xt.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=J2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.bindings.push(Xt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{bindings:globalThis.Array.isArray(e?.bindings)?e.bindings.map(t=>Xt.fromJSON(t)):[]}},toJSON(e){let t={};return e.bindings?.length&&(t.bindings=e.bindings.map(n=>Xt.toJSON(n))),t},create(e){return GN.fromPartial(e??{})},fromPartial(e){let t=J2();return t.bindings=e.bindings?.map(n=>Xt.fromPartial(n))||[],t}};function z2(){return{result:void 0}}var HN={encode(e,t=A.default.Writer.create()){return e.result!==void 0&&kn.encode(e.result,t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=z2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.result=kn.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{result:E(e.result)?kn.fromJSON(e.result):void 0}},toJSON(e){let t={};return e.result!==void 0&&(t.result=kn.toJSON(e.result)),t},create(e){return HN.fromPartial(e??{})},fromPartial(e){let t=z2();return t.result=e.result!==void 0&&e.result!==null?kn.fromPartial(e.result):void 0,t}};function G2(){return{processId:0,binding:void 0,dbResult:void 0}}var WN={encode(e,t=A.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.binding!==void 0&&Xt.encode(e.binding,t.uint32(18).fork()).ldelim(),e.dbResult!==void 0&&Tr.encode(e.dbResult,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=G2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.binding=Xt.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.dbResult=Tr.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,binding:E(e.binding)?Xt.fromJSON(e.binding):void 0,dbResult:E(e.dbResult)?Tr.fromJSON(e.dbResult):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.binding!==void 0&&(t.binding=Xt.toJSON(e.binding)),e.dbResult!==void 0&&(t.dbResult=Tr.toJSON(e.dbResult)),t},create(e){return WN.fromPartial(e??{})},fromPartial(e){let t=G2();return t.processId=e.processId??0,t.binding=e.binding!==void 0&&e.binding!==null?Xt.fromPartial(e.binding):void 0,t.dbResult=e.dbResult!==void 0&&e.dbResult!==null?Tr.fromPartial(e.dbResult):void 0,t}};function H2(){return{processId:0,dbRequest:void 0,result:void 0}}var ZN={encode(e,t=A.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.dbRequest!==void 0&&Nr.encode(e.dbRequest,t.uint32(18).fork()).ldelim(),e.result!==void 0&&kn.encode(e.result,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=H2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.dbRequest=Nr.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.result=kn.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,dbRequest:E(e.dbRequest)?Nr.fromJSON(e.dbRequest):void 0,result:E(e.result)?kn.fromJSON(e.result):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.dbRequest!==void 0&&(t.dbRequest=Nr.toJSON(e.dbRequest)),e.result!==void 0&&(t.result=kn.toJSON(e.result)),t},create(e){return ZN.fromPartial(e??{})},fromPartial(e){let t=H2();return t.processId=e.processId??0,t.dbRequest=e.dbRequest!==void 0&&e.dbRequest!==null?Nr.fromPartial(e.dbRequest):void 0,t.result=e.result!==void 0&&e.result!==null?kn.fromPartial(e.result):void 0,t}};function W2(){return{processId:0,bindings:void 0,dbResult:void 0}}var YN={encode(e,t=A.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.bindings!==void 0&&gc.encode(e.bindings,t.uint32(18).fork()).ldelim(),e.dbResult!==void 0&&Tr.encode(e.dbResult,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=W2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.bindings=gc.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.dbResult=Tr.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,bindings:E(e.bindings)?gc.fromJSON(e.bindings):void 0,dbResult:E(e.dbResult)?Tr.fromJSON(e.dbResult):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.bindings!==void 0&&(t.bindings=gc.toJSON(e.bindings)),e.dbResult!==void 0&&(t.dbResult=Tr.toJSON(e.dbResult)),t},create(e){return YN.fromPartial(e??{})},fromPartial(e){let t=W2();return t.processId=e.processId??0,t.bindings=e.bindings!==void 0&&e.bindings!==null?gc.fromPartial(e.bindings):void 0,t.dbResult=e.dbResult!==void 0&&e.dbResult!==null?Tr.fromPartial(e.dbResult):void 0,t}};function Z2(){return{bindings:[]}}var gc={encode(e,t=A.default.Writer.create()){for(let n of e.bindings)Xt.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Z2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.bindings.push(Xt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{bindings:globalThis.Array.isArray(e?.bindings)?e.bindings.map(t=>Xt.fromJSON(t)):[]}},toJSON(e){let t={};return e.bindings?.length&&(t.bindings=e.bindings.map(n=>Xt.toJSON(n))),t},create(e){return gc.fromPartial(e??{})},fromPartial(e){let t=Z2();return t.bindings=e.bindings?.map(n=>Xt.fromPartial(n))||[],t}};function Y2(){return{processId:0,dbRequest:void 0}}var XN={encode(e,t=A.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.dbRequest!==void 0&&Nr.encode(e.dbRequest,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Y2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.dbRequest=Nr.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,dbRequest:E(e.dbRequest)?Nr.fromJSON(e.dbRequest):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.dbRequest!==void 0&&(t.dbRequest=Nr.toJSON(e.dbRequest)),t},create(e){return XN.fromPartial(e??{})},fromPartial(e){let t=Y2();return t.processId=e.processId??0,t.dbRequest=e.dbRequest!==void 0&&e.dbRequest!==null?Nr.fromPartial(e.dbRequest):void 0,t}};function X2(){return{opId:BigInt("0"),data:void 0,list:void 0,error:void 0,entities:void 0,entityList:void 0,nextCursor:void 0}}var Tr={encode(e,t=A.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");t.uint32(8).uint64(e.opId.toString())}return e.data!==void 0&&P.encode(P.wrap(e.data),t.uint32(18).fork()).ldelim(),e.list!==void 0&&Kr.encode(Kr.wrap(e.list),t.uint32(34).fork()).ldelim(),e.error!==void 0&&t.uint32(26).string(e.error),e.entities!==void 0&&fa.encode(e.entities,t.uint32(50).fork()).ldelim(),e.entityList!==void 0&&Ac.encode(e.entityList,t.uint32(58).fork()).ldelim(),e.nextCursor!==void 0&&t.uint32(42).string(e.nextCursor),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=X2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.opId=$t(n.uint64());continue;case 2:if(a!==18)break;i.data=P.unwrap(P.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.list=Kr.unwrap(Kr.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.error=n.string();continue;case 6:if(a!==50)break;i.entities=fa.decode(n,n.uint32());continue;case 7:if(a!==58)break;i.entityList=Ac.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.nextCursor=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{opId:E(e.opId)?BigInt(e.opId):BigInt("0"),data:qe(e.data)?e.data:void 0,list:globalThis.Array.isArray(e.list)?[...e.list]:void 0,error:E(e.error)?globalThis.String(e.error):void 0,entities:E(e.entities)?fa.fromJSON(e.entities):void 0,entityList:E(e.entityList)?Ac.fromJSON(e.entityList):void 0,nextCursor:E(e.nextCursor)?globalThis.String(e.nextCursor):void 0}},toJSON(e){let t={};return e.opId!==BigInt("0")&&(t.opId=e.opId.toString()),e.data!==void 0&&(t.data=e.data),e.list!==void 0&&(t.list=e.list),e.error!==void 0&&(t.error=e.error),e.entities!==void 0&&(t.entities=fa.toJSON(e.entities)),e.entityList!==void 0&&(t.entityList=Ac.toJSON(e.entityList)),e.nextCursor!==void 0&&(t.nextCursor=e.nextCursor),t},create(e){return Tr.fromPartial(e??{})},fromPartial(e){let t=X2();return t.opId=e.opId??BigInt("0"),t.data=e.data??void 0,t.list=e.list??void 0,t.error=e.error??void 0,t.entities=e.entities!==void 0&&e.entities!==null?fa.fromPartial(e.entities):void 0,t.entityList=e.entityList!==void 0&&e.entityList!==null?Ac.fromPartial(e.entityList):void 0,t.nextCursor=e.nextCursor??void 0,t}};function $2(){return{entity:"",genBlockNumber:BigInt("0"),genBlockChain:"",genBlockTime:void 0,data:void 0}}var _c={encode(e,t=A.default.Writer.create()){if(e.entity!==""&&t.uint32(10).string(e.entity),e.genBlockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.genBlockNumber)!==e.genBlockNumber)throw new globalThis.Error("value provided for field message.genBlockNumber of type uint64 too large");t.uint32(16).uint64(e.genBlockNumber.toString())}return e.genBlockChain!==""&&t.uint32(26).string(e.genBlockChain),e.genBlockTime!==void 0&&ke.encode(An(e.genBlockTime),t.uint32(34).fork()).ldelim(),e.data!==void 0&&st.encode(e.data,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=$2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity=n.string();continue;case 2:if(a!==16)break;i.genBlockNumber=$t(n.uint64());continue;case 3:if(a!==26)break;i.genBlockChain=n.string();continue;case 4:if(a!==34)break;i.genBlockTime=nn(ke.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.data=st.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:E(e.entity)?globalThis.String(e.entity):"",genBlockNumber:E(e.genBlockNumber)?BigInt(e.genBlockNumber):BigInt("0"),genBlockChain:E(e.genBlockChain)?globalThis.String(e.genBlockChain):"",genBlockTime:E(e.genBlockTime)?yn(e.genBlockTime):void 0,data:E(e.data)?st.fromJSON(e.data):void 0}},toJSON(e){let t={};return e.entity!==""&&(t.entity=e.entity),e.genBlockNumber!==BigInt("0")&&(t.genBlockNumber=e.genBlockNumber.toString()),e.genBlockChain!==""&&(t.genBlockChain=e.genBlockChain),e.genBlockTime!==void 0&&(t.genBlockTime=e.genBlockTime.toISOString()),e.data!==void 0&&(t.data=st.toJSON(e.data)),t},create(e){return _c.fromPartial(e??{})},fromPartial(e){let t=$2();return t.entity=e.entity??"",t.genBlockNumber=e.genBlockNumber??BigInt("0"),t.genBlockChain=e.genBlockChain??"",t.genBlockTime=e.genBlockTime??void 0,t.data=e.data!==void 0&&e.data!==null?st.fromPartial(e.data):void 0,t}};function K2(){return{entities:[]}}var Ac={encode(e,t=A.default.Writer.create()){for(let n of e.entities)_c.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=K2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entities.push(_c.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(t=>_c.fromJSON(t)):[]}},toJSON(e){let t={};return e.entities?.length&&(t.entities=e.entities.map(n=>_c.toJSON(n))),t},create(e){return Ac.fromPartial(e??{})},fromPartial(e){let t=K2();return t.entities=e.entities?.map(n=>_c.fromPartial(n))||[],t}};function j2(){return{opId:BigInt("0"),get:void 0,upsert:void 0,delete:void 0,list:void 0}}var Nr={encode(e,t=A.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");t.uint32(8).uint64(e.opId.toString())}return e.get!==void 0&&yc.encode(e.get,t.uint32(18).fork()).ldelim(),e.upsert!==void 0&&vc.encode(e.upsert,t.uint32(26).fork()).ldelim(),e.delete!==void 0&&wc.encode(e.delete,t.uint32(34).fork()).ldelim(),e.list!==void 0&&bc.encode(e.list,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=j2();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.opId=$t(n.uint64());continue;case 2:if(a!==18)break;i.get=yc.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.upsert=vc.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.delete=wc.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.list=bc.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{opId:E(e.opId)?BigInt(e.opId):BigInt("0"),get:E(e.get)?yc.fromJSON(e.get):void 0,upsert:E(e.upsert)?vc.fromJSON(e.upsert):void 0,delete:E(e.delete)?wc.fromJSON(e.delete):void 0,list:E(e.list)?bc.fromJSON(e.list):void 0}},toJSON(e){let t={};return e.opId!==BigInt("0")&&(t.opId=e.opId.toString()),e.get!==void 0&&(t.get=yc.toJSON(e.get)),e.upsert!==void 0&&(t.upsert=vc.toJSON(e.upsert)),e.delete!==void 0&&(t.delete=wc.toJSON(e.delete)),e.list!==void 0&&(t.list=bc.toJSON(e.list)),t},create(e){return Nr.fromPartial(e??{})},fromPartial(e){let t=j2();return t.opId=e.opId??BigInt("0"),t.get=e.get!==void 0&&e.get!==null?yc.fromPartial(e.get):void 0,t.upsert=e.upsert!==void 0&&e.upsert!==null?vc.fromPartial(e.upsert):void 0,t.delete=e.delete!==void 0&&e.delete!==null?wc.fromPartial(e.delete):void 0,t.list=e.list!==void 0&&e.list!==null?bc.fromPartial(e.list):void 0,t}};function eN(){return{entity:"",id:""}}var yc={encode(e,t=A.default.Writer.create()){return e.entity!==""&&t.uint32(10).string(e.entity),e.id!==""&&t.uint32(18).string(e.id),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=eN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity=n.string();continue;case 2:if(a!==18)break;i.id=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:E(e.entity)?globalThis.String(e.entity):"",id:E(e.id)?globalThis.String(e.id):""}},toJSON(e){let t={};return e.entity!==""&&(t.entity=e.entity),e.id!==""&&(t.id=e.id),t},create(e){return yc.fromPartial(e??{})},fromPartial(e){let t=eN();return t.entity=e.entity??"",t.id=e.id??"",t}};function tN(){return{entity:"",filters:[],cursor:"",pageSize:void 0}}var bc={encode(e,t=A.default.Writer.create()){e.entity!==""&&t.uint32(10).string(e.entity);for(let n of e.filters)Ec.encode(n,t.uint32(34).fork()).ldelim();return e.cursor!==""&&t.uint32(42).string(e.cursor),e.pageSize!==void 0&&t.uint32(48).uint32(e.pageSize),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=tN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity=n.string();continue;case 4:if(a!==34)break;i.filters.push(Ec.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.cursor=n.string();continue;case 6:if(a!==48)break;i.pageSize=n.uint32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:E(e.entity)?globalThis.String(e.entity):"",filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Ec.fromJSON(t)):[],cursor:E(e.cursor)?globalThis.String(e.cursor):"",pageSize:E(e.pageSize)?globalThis.Number(e.pageSize):void 0}},toJSON(e){let t={};return e.entity!==""&&(t.entity=e.entity),e.filters?.length&&(t.filters=e.filters.map(n=>Ec.toJSON(n))),e.cursor!==""&&(t.cursor=e.cursor),e.pageSize!==void 0&&(t.pageSize=Math.round(e.pageSize)),t},create(e){return bc.fromPartial(e??{})},fromPartial(e){let t=tN();return t.entity=e.entity??"",t.filters=e.filters?.map(n=>Ec.fromPartial(n))||[],t.cursor=e.cursor??"",t.pageSize=e.pageSize??void 0,t}};function nN(){return{entity:[],id:[],data:[],entityData:[]}}var vc={encode(e,t=A.default.Writer.create()){for(let n of e.entity)t.uint32(10).string(n);for(let n of e.id)t.uint32(18).string(n);for(let n of e.data)P.encode(P.wrap(n),t.uint32(26).fork()).ldelim();for(let n of e.entityData)st.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=nN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity.push(n.string());continue;case 2:if(a!==18)break;i.id.push(n.string());continue;case 3:if(a!==26)break;i.data.push(P.unwrap(P.decode(n,n.uint32())));continue;case 4:if(a!==34)break;i.entityData.push(st.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(t=>globalThis.String(t)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(t=>globalThis.String(t)):[],data:globalThis.Array.isArray(e?.data)?[...e.data]:[],entityData:globalThis.Array.isArray(e?.entityData)?e.entityData.map(t=>st.fromJSON(t)):[]}},toJSON(e){let t={};return e.entity?.length&&(t.entity=e.entity),e.id?.length&&(t.id=e.id),e.data?.length&&(t.data=e.data),e.entityData?.length&&(t.entityData=e.entityData.map(n=>st.toJSON(n))),t},create(e){return vc.fromPartial(e??{})},fromPartial(e){let t=nN();return t.entity=e.entity?.map(n=>n)||[],t.id=e.id?.map(n=>n)||[],t.data=e.data?.map(n=>n)||[],t.entityData=e.entityData?.map(n=>st.fromPartial(n))||[],t}};function rN(){return{entity:[],id:[]}}var wc={encode(e,t=A.default.Writer.create()){for(let n of e.entity)t.uint32(10).string(n);for(let n of e.id)t.uint32(18).string(n);return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=rN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity.push(n.string());continue;case 2:if(a!==18)break;i.id.push(n.string());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(t=>globalThis.String(t)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(t=>globalThis.String(t)):[]}},toJSON(e){let t={};return e.entity?.length&&(t.entity=e.entity),e.id?.length&&(t.id=e.id),t},create(e){return wc.fromPartial(e??{})},fromPartial(e){let t=rN();return t.entity=e.entity?.map(n=>n)||[],t.id=e.id?.map(n=>n)||[],t}};function iN(){return{field:"",op:0,value:void 0}}var Ec={encode(e,t=A.default.Writer.create()){return e.field!==""&&t.uint32(10).string(e.field),e.op!==0&&t.uint32(16).int32(e.op),e.value!==void 0&&Ge.encode(e.value,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=iN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.field=n.string();continue;case 2:if(a!==16)break;i.op=n.int32();continue;case 3:if(a!==26)break;i.value=Ge.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{field:E(e.field)?globalThis.String(e.field):"",op:E(e.op)?Xq(e.op):0,value:E(e.value)?Ge.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.field!==""&&(t.field=e.field),e.op!==0&&(t.op=$q(e.op)),e.value!==void 0&&(t.value=Ge.toJSON(e.value)),t},create(e){return Ec.fromPartial(e??{})},fromPartial(e){let t=iN();return t.field=e.field??"",t.op=e.op??0,t.value=e.value!==void 0&&e.value!==null?Ge.fromPartial(e.value):void 0,t}};function aN(){return{ethLog:void 0,ethBlock:void 0,ethTransaction:void 0,ethTrace:void 0,solInstruction:void 0,aptEvent:void 0,aptCall:void 0,aptResource:void 0,suiEvent:void 0,suiCall:void 0,suiObject:void 0,suiObjectChange:void 0,fuelCall:void 0,fuelBlock:void 0,cosmosCall:void 0,starknetEvents:void 0,btcTransaction:void 0,btcBlock:void 0}}var Cc={encode(e,t=A.default.Writer.create()){return e.ethLog!==void 0&&Ic.encode(e.ethLog,t.uint32(18).fork()).ldelim(),e.ethBlock!==void 0&&Sc.encode(e.ethBlock,t.uint32(26).fork()).ldelim(),e.ethTransaction!==void 0&&xc.encode(e.ethTransaction,t.uint32(34).fork()).ldelim(),e.ethTrace!==void 0&&Tc.encode(e.ethTrace,t.uint32(42).fork()).ldelim(),e.solInstruction!==void 0&&Nc.encode(e.solInstruction,t.uint32(50).fork()).ldelim(),e.aptEvent!==void 0&&Rc.encode(e.aptEvent,t.uint32(58).fork()).ldelim(),e.aptCall!==void 0&&kc.encode(e.aptCall,t.uint32(66).fork()).ldelim(),e.aptResource!==void 0&&Bc.encode(e.aptResource,t.uint32(74).fork()).ldelim(),e.suiEvent!==void 0&&Oc.encode(e.suiEvent,t.uint32(82).fork()).ldelim(),e.suiCall!==void 0&&Pc.encode(e.suiCall,t.uint32(90).fork()).ldelim(),e.suiObject!==void 0&&Dc.encode(e.suiObject,t.uint32(98).fork()).ldelim(),e.suiObjectChange!==void 0&&Mc.encode(e.suiObjectChange,t.uint32(106).fork()).ldelim(),e.fuelCall!==void 0&&Fc.encode(e.fuelCall,t.uint32(114).fork()).ldelim(),e.fuelBlock!==void 0&&Lc.encode(e.fuelBlock,t.uint32(146).fork()).ldelim(),e.cosmosCall!==void 0&&Uc.encode(e.cosmosCall,t.uint32(122).fork()).ldelim(),e.starknetEvents!==void 0&&Qc.encode(e.starknetEvents,t.uint32(130).fork()).ldelim(),e.btcTransaction!==void 0&&qc.encode(e.btcTransaction,t.uint32(138).fork()).ldelim(),e.btcBlock!==void 0&&Vc.encode(e.btcBlock,t.uint32(154).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=aN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.ethLog=Ic.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.ethBlock=Sc.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.ethTransaction=xc.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.ethTrace=Tc.decode(n,n.uint32());continue;case 6:if(a!==50)break;i.solInstruction=Nc.decode(n,n.uint32());continue;case 7:if(a!==58)break;i.aptEvent=Rc.decode(n,n.uint32());continue;case 8:if(a!==66)break;i.aptCall=kc.decode(n,n.uint32());continue;case 9:if(a!==74)break;i.aptResource=Bc.decode(n,n.uint32());continue;case 10:if(a!==82)break;i.suiEvent=Oc.decode(n,n.uint32());continue;case 11:if(a!==90)break;i.suiCall=Pc.decode(n,n.uint32());continue;case 12:if(a!==98)break;i.suiObject=Dc.decode(n,n.uint32());continue;case 13:if(a!==106)break;i.suiObjectChange=Mc.decode(n,n.uint32());continue;case 14:if(a!==114)break;i.fuelCall=Fc.decode(n,n.uint32());continue;case 18:if(a!==146)break;i.fuelBlock=Lc.decode(n,n.uint32());continue;case 15:if(a!==122)break;i.cosmosCall=Uc.decode(n,n.uint32());continue;case 16:if(a!==130)break;i.starknetEvents=Qc.decode(n,n.uint32());continue;case 17:if(a!==138)break;i.btcTransaction=qc.decode(n,n.uint32());continue;case 19:if(a!==154)break;i.btcBlock=Vc.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{ethLog:E(e.ethLog)?Ic.fromJSON(e.ethLog):void 0,ethBlock:E(e.ethBlock)?Sc.fromJSON(e.ethBlock):void 0,ethTransaction:E(e.ethTransaction)?xc.fromJSON(e.ethTransaction):void 0,ethTrace:E(e.ethTrace)?Tc.fromJSON(e.ethTrace):void 0,solInstruction:E(e.solInstruction)?Nc.fromJSON(e.solInstruction):void 0,aptEvent:E(e.aptEvent)?Rc.fromJSON(e.aptEvent):void 0,aptCall:E(e.aptCall)?kc.fromJSON(e.aptCall):void 0,aptResource:E(e.aptResource)?Bc.fromJSON(e.aptResource):void 0,suiEvent:E(e.suiEvent)?Oc.fromJSON(e.suiEvent):void 0,suiCall:E(e.suiCall)?Pc.fromJSON(e.suiCall):void 0,suiObject:E(e.suiObject)?Dc.fromJSON(e.suiObject):void 0,suiObjectChange:E(e.suiObjectChange)?Mc.fromJSON(e.suiObjectChange):void 0,fuelCall:E(e.fuelCall)?Fc.fromJSON(e.fuelCall):void 0,fuelBlock:E(e.fuelBlock)?Lc.fromJSON(e.fuelBlock):void 0,cosmosCall:E(e.cosmosCall)?Uc.fromJSON(e.cosmosCall):void 0,starknetEvents:E(e.starknetEvents)?Qc.fromJSON(e.starknetEvents):void 0,btcTransaction:E(e.btcTransaction)?qc.fromJSON(e.btcTransaction):void 0,btcBlock:E(e.btcBlock)?Vc.fromJSON(e.btcBlock):void 0}},toJSON(e){let t={};return e.ethLog!==void 0&&(t.ethLog=Ic.toJSON(e.ethLog)),e.ethBlock!==void 0&&(t.ethBlock=Sc.toJSON(e.ethBlock)),e.ethTransaction!==void 0&&(t.ethTransaction=xc.toJSON(e.ethTransaction)),e.ethTrace!==void 0&&(t.ethTrace=Tc.toJSON(e.ethTrace)),e.solInstruction!==void 0&&(t.solInstruction=Nc.toJSON(e.solInstruction)),e.aptEvent!==void 0&&(t.aptEvent=Rc.toJSON(e.aptEvent)),e.aptCall!==void 0&&(t.aptCall=kc.toJSON(e.aptCall)),e.aptResource!==void 0&&(t.aptResource=Bc.toJSON(e.aptResource)),e.suiEvent!==void 0&&(t.suiEvent=Oc.toJSON(e.suiEvent)),e.suiCall!==void 0&&(t.suiCall=Pc.toJSON(e.suiCall)),e.suiObject!==void 0&&(t.suiObject=Dc.toJSON(e.suiObject)),e.suiObjectChange!==void 0&&(t.suiObjectChange=Mc.toJSON(e.suiObjectChange)),e.fuelCall!==void 0&&(t.fuelCall=Fc.toJSON(e.fuelCall)),e.fuelBlock!==void 0&&(t.fuelBlock=Lc.toJSON(e.fuelBlock)),e.cosmosCall!==void 0&&(t.cosmosCall=Uc.toJSON(e.cosmosCall)),e.starknetEvents!==void 0&&(t.starknetEvents=Qc.toJSON(e.starknetEvents)),e.btcTransaction!==void 0&&(t.btcTransaction=qc.toJSON(e.btcTransaction)),e.btcBlock!==void 0&&(t.btcBlock=Vc.toJSON(e.btcBlock)),t},create(e){return Cc.fromPartial(e??{})},fromPartial(e){let t=aN();return t.ethLog=e.ethLog!==void 0&&e.ethLog!==null?Ic.fromPartial(e.ethLog):void 0,t.ethBlock=e.ethBlock!==void 0&&e.ethBlock!==null?Sc.fromPartial(e.ethBlock):void 0,t.ethTransaction=e.ethTransaction!==void 0&&e.ethTransaction!==null?xc.fromPartial(e.ethTransaction):void 0,t.ethTrace=e.ethTrace!==void 0&&e.ethTrace!==null?Tc.fromPartial(e.ethTrace):void 0,t.solInstruction=e.solInstruction!==void 0&&e.solInstruction!==null?Nc.fromPartial(e.solInstruction):void 0,t.aptEvent=e.aptEvent!==void 0&&e.aptEvent!==null?Rc.fromPartial(e.aptEvent):void 0,t.aptCall=e.aptCall!==void 0&&e.aptCall!==null?kc.fromPartial(e.aptCall):void 0,t.aptResource=e.aptResource!==void 0&&e.aptResource!==null?Bc.fromPartial(e.aptResource):void 0,t.suiEvent=e.suiEvent!==void 0&&e.suiEvent!==null?Oc.fromPartial(e.suiEvent):void 0,t.suiCall=e.suiCall!==void 0&&e.suiCall!==null?Pc.fromPartial(e.suiCall):void 0,t.suiObject=e.suiObject!==void 0&&e.suiObject!==null?Dc.fromPartial(e.suiObject):void 0,t.suiObjectChange=e.suiObjectChange!==void 0&&e.suiObjectChange!==null?Mc.fromPartial(e.suiObjectChange):void 0,t.fuelCall=e.fuelCall!==void 0&&e.fuelCall!==null?Fc.fromPartial(e.fuelCall):void 0,t.fuelBlock=e.fuelBlock!==void 0&&e.fuelBlock!==null?Lc.fromPartial(e.fuelBlock):void 0,t.cosmosCall=e.cosmosCall!==void 0&&e.cosmosCall!==null?Uc.fromPartial(e.cosmosCall):void 0,t.starknetEvents=e.starknetEvents!==void 0&&e.starknetEvents!==null?Qc.fromPartial(e.starknetEvents):void 0,t.btcTransaction=e.btcTransaction!==void 0&&e.btcTransaction!==null?qc.fromPartial(e.btcTransaction):void 0,t.btcBlock=e.btcBlock!==void 0&&e.btcBlock!==null?Vc.fromPartial(e.btcBlock):void 0,t}};function sN(){return{log:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0}}var Ic={encode(e,t=A.default.Writer.create()){return e.log!==void 0&&P.encode(P.wrap(e.log),t.uint32(26).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(34).fork()).ldelim(),e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&P.encode(P.wrap(e.transactionReceipt),t.uint32(42).fork()).ldelim(),e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=sN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 3:if(a!==26)break;i.log=P.unwrap(P.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.transactionReceipt=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{log:qe(e.log)?e.log:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0,transaction:qe(e.transaction)?e.transaction:void 0,transactionReceipt:qe(e.transactionReceipt)?e.transactionReceipt:void 0,block:qe(e.block)?e.block:void 0}},toJSON(e){let t={};return e.log!==void 0&&(t.log=e.log),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(t.transaction=e.transaction),e.transactionReceipt!==void 0&&(t.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(t.block=e.block),t},create(e){return Ic.fromPartial(e??{})},fromPartial(e){let t=sN();return t.log=e.log??void 0,t.timestamp=e.timestamp??void 0,t.transaction=e.transaction??void 0,t.transactionReceipt=e.transactionReceipt??void 0,t.block=e.block??void 0,t}};function oN(){return{block:void 0}}var Sc={encode(e,t=A.default.Writer.create()){return e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=oN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{block:qe(e.block)?e.block:void 0}},toJSON(e){let t={};return e.block!==void 0&&(t.block=e.block),t},create(e){return Sc.fromPartial(e??{})},fromPartial(e){let t=oN();return t.block=e.block??void 0,t}};function cN(){return{transaction:void 0,timestamp:void 0,transactionReceipt:void 0,block:void 0,trace:void 0}}var xc={encode(e,t=A.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(42).fork()).ldelim(),e.transactionReceipt!==void 0&&P.encode(P.wrap(e.transactionReceipt),t.uint32(26).fork()).ldelim(),e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(50).fork()).ldelim(),e.trace!==void 0&&P.encode(P.wrap(e.trace),t.uint32(58).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=cN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.transactionReceipt=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.trace=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0,transactionReceipt:qe(e.transactionReceipt)?e.transactionReceipt:void 0,block:qe(e.block)?e.block:void 0,trace:qe(e.trace)?e.trace:void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.transactionReceipt!==void 0&&(t.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(t.block=e.block),e.trace!==void 0&&(t.trace=e.trace),t},create(e){return xc.fromPartial(e??{})},fromPartial(e){let t=cN();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t.transactionReceipt=e.transactionReceipt??void 0,t.block=e.block??void 0,t.trace=e.trace??void 0,t}};function uN(){return{trace:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0}}var Tc={encode(e,t=A.default.Writer.create()){return e.trace!==void 0&&P.encode(P.wrap(e.trace),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(42).fork()).ldelim(),e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&P.encode(P.wrap(e.transactionReceipt),t.uint32(26).fork()).ldelim(),e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=uN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.trace=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.transactionReceipt=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{trace:qe(e.trace)?e.trace:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0,transaction:qe(e.transaction)?e.transaction:void 0,transactionReceipt:qe(e.transactionReceipt)?e.transactionReceipt:void 0,block:qe(e.block)?e.block:void 0}},toJSON(e){let t={};return e.trace!==void 0&&(t.trace=e.trace),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(t.transaction=e.transaction),e.transactionReceipt!==void 0&&(t.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(t.block=e.block),t},create(e){return Tc.fromPartial(e??{})},fromPartial(e){let t=uN();return t.trace=e.trace??void 0,t.timestamp=e.timestamp??void 0,t.transaction=e.transaction??void 0,t.transactionReceipt=e.transactionReceipt??void 0,t.block=e.block??void 0,t}};function lN(){return{instructionData:"",slot:BigInt("0"),programAccountId:"",accounts:[],parsed:void 0}}var Nc={encode(e,t=A.default.Writer.create()){if(e.instructionData!==""&&t.uint32(10).string(e.instructionData),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(16).uint64(e.slot.toString())}e.programAccountId!==""&&t.uint32(26).string(e.programAccountId);for(let n of e.accounts)t.uint32(42).string(n);return e.parsed!==void 0&&P.encode(P.wrap(e.parsed),t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=lN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.instructionData=n.string();continue;case 2:if(a!==16)break;i.slot=$t(n.uint64());continue;case 3:if(a!==26)break;i.programAccountId=n.string();continue;case 5:if(a!==42)break;i.accounts.push(n.string());continue;case 4:if(a!==34)break;i.parsed=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{instructionData:E(e.instructionData)?globalThis.String(e.instructionData):"",slot:E(e.slot)?BigInt(e.slot):BigInt("0"),programAccountId:E(e.programAccountId)?globalThis.String(e.programAccountId):"",accounts:globalThis.Array.isArray(e?.accounts)?e.accounts.map(t=>globalThis.String(t)):[],parsed:qe(e.parsed)?e.parsed:void 0}},toJSON(e){let t={};return e.instructionData!==""&&(t.instructionData=e.instructionData),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),e.programAccountId!==""&&(t.programAccountId=e.programAccountId),e.accounts?.length&&(t.accounts=e.accounts),e.parsed!==void 0&&(t.parsed=e.parsed),t},create(e){return Nc.fromPartial(e??{})},fromPartial(e){let t=lN();return t.instructionData=e.instructionData??"",t.slot=e.slot??BigInt("0"),t.programAccountId=e.programAccountId??"",t.accounts=e.accounts?.map(n=>n)||[],t.parsed=e.parsed??void 0,t}};function dN(){return{transaction:void 0}}var Rc={encode(e,t=A.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=dN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),t},create(e){return Rc.fromPartial(e??{})},fromPartial(e){let t=dN();return t.transaction=e.transaction??void 0,t}};function fN(){return{transaction:void 0}}var kc={encode(e,t=A.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=fN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),t},create(e){return kc.fromPartial(e??{})},fromPartial(e){let t=fN();return t.transaction=e.transaction??void 0,t}};function pN(){return{resources:[],version:BigInt("0"),timestampMicros:BigInt("0")}}var Bc={encode(e,t=A.default.Writer.create()){for(let n of e.resources)P.encode(P.wrap(n),t.uint32(34).fork()).ldelim();if(e.version!==BigInt("0")){if(BigInt.asIntN(64,e.version)!==e.version)throw new globalThis.Error("value provided for field message.version of type int64 too large");t.uint32(16).int64(e.version.toString())}if(e.timestampMicros!==BigInt("0")){if(BigInt.asIntN(64,e.timestampMicros)!==e.timestampMicros)throw new globalThis.Error("value provided for field message.timestampMicros of type int64 too large");t.uint32(40).int64(e.timestampMicros.toString())}return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=pN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.resources.push(P.unwrap(P.decode(n,n.uint32())));continue;case 2:if(a!==16)break;i.version=$t(n.int64());continue;case 5:if(a!==40)break;i.timestampMicros=$t(n.int64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{resources:globalThis.Array.isArray(e?.resources)?[...e.resources]:[],version:E(e.version)?BigInt(e.version):BigInt("0"),timestampMicros:E(e.timestampMicros)?BigInt(e.timestampMicros):BigInt("0")}},toJSON(e){let t={};return e.resources?.length&&(t.resources=e.resources),e.version!==BigInt("0")&&(t.version=e.version.toString()),e.timestampMicros!==BigInt("0")&&(t.timestampMicros=e.timestampMicros.toString()),t},create(e){return Bc.fromPartial(e??{})},fromPartial(e){let t=pN();return t.resources=e.resources?.map(n=>n)||[],t.version=e.version??BigInt("0"),t.timestampMicros=e.timestampMicros??BigInt("0"),t}};function hN(){return{transaction:void 0,timestamp:void 0,slot:BigInt("0")}}var Oc={encode(e,t=A.default.Writer.create()){if(e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=hN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue;case 3:if(a!==24)break;i.slot=$t(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0,slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return Oc.fromPartial(e??{})},fromPartial(e){let t=hN();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t.slot=e.slot??BigInt("0"),t}};function mN(){return{transaction:void 0,timestamp:void 0,slot:BigInt("0")}}var Pc={encode(e,t=A.default.Writer.create()){if(e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=mN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue;case 3:if(a!==24)break;i.slot=$t(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0,slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return Pc.fromPartial(e??{})},fromPartial(e){let t=mN();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t.slot=e.slot??BigInt("0"),t}};function gN(){return{objects:[],self:void 0,timestamp:void 0,slot:BigInt("0")}}var Dc={encode(e,t=A.default.Writer.create()){for(let n of e.objects)P.encode(P.wrap(n),t.uint32(10).fork()).ldelim();if(e.self!==void 0&&P.encode(P.wrap(e.self),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=gN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.objects.push(P.unwrap(P.decode(n,n.uint32())));continue;case 4:if(a!==34)break;i.self=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue;case 3:if(a!==24)break;i.slot=$t(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{objects:globalThis.Array.isArray(e?.objects)?[...e.objects]:[],self:qe(e.self)?e.self:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0,slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.objects?.length&&(t.objects=e.objects),e.self!==void 0&&(t.self=e.self),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return Dc.fromPartial(e??{})},fromPartial(e){let t=gN();return t.objects=e.objects?.map(n=>n)||[],t.self=e.self??void 0,t.timestamp=e.timestamp??void 0,t.slot=e.slot??BigInt("0"),t}};function _N(){return{changes:[],timestamp:void 0,txDigest:"",slot:BigInt("0")}}var Mc={encode(e,t=A.default.Writer.create()){for(let n of e.changes)P.encode(P.wrap(n),t.uint32(10).fork()).ldelim();if(e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),e.txDigest!==""&&t.uint32(34).string(e.txDigest),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=_N();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.changes.push(P.unwrap(P.decode(n,n.uint32())));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.txDigest=n.string();continue;case 3:if(a!==24)break;i.slot=$t(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{changes:globalThis.Array.isArray(e?.changes)?[...e.changes]:[],timestamp:E(e.timestamp)?yn(e.timestamp):void 0,txDigest:E(e.txDigest)?globalThis.String(e.txDigest):"",slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.changes?.length&&(t.changes=e.changes),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.txDigest!==""&&(t.txDigest=e.txDigest),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return Mc.fromPartial(e??{})},fromPartial(e){let t=_N();return t.changes=e.changes?.map(n=>n)||[],t.timestamp=e.timestamp??void 0,t.txDigest=e.txDigest??"",t.slot=e.slot??BigInt("0"),t}};function AN(){return{transaction:void 0,timestamp:void 0}}var Fc={encode(e,t=A.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=AN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return Fc.fromPartial(e??{})},fromPartial(e){let t=AN();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t}};function yN(){return{block:void 0,timestamp:void 0}}var Lc={encode(e,t=A.default.Writer.create()){return e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=yN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{block:qe(e.block)?e.block:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0}},toJSON(e){let t={};return e.block!==void 0&&(t.block=e.block),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return Lc.fromPartial(e??{})},fromPartial(e){let t=yN();return t.block=e.block??void 0,t.timestamp=e.timestamp??void 0,t}};function bN(){return{transaction:void 0,timestamp:void 0}}var Uc={encode(e,t=A.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=bN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return Uc.fromPartial(e??{})},fromPartial(e){let t=bN();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t}};function vN(){return{result:void 0,timestamp:void 0}}var Qc={encode(e,t=A.default.Writer.create()){return e.result!==void 0&&P.encode(P.wrap(e.result),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=vN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.result=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{result:qe(e.result)?e.result:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0}},toJSON(e){let t={};return e.result!==void 0&&(t.result=e.result),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return Qc.fromPartial(e??{})},fromPartial(e){let t=vN();return t.result=e.result??void 0,t.timestamp=e.timestamp??void 0,t}};function wN(){return{transaction:void 0,timestamp:void 0}}var qc={encode(e,t=A.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=wN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return qc.fromPartial(e??{})},fromPartial(e){let t=wN();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t}};function EN(){return{block:void 0,timestamp:void 0}}var Vc={encode(e,t=A.default.Writer.create()){return e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&ke.encode(An(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=EN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=nn(ke.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{block:qe(e.block)?e.block:void 0,timestamp:E(e.timestamp)?yn(e.timestamp):void 0}},toJSON(e){let t={};return e.block!==void 0&&(t.block=e.block),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return Vc.fromPartial(e??{})},fromPartial(e){let t=EN();return t.block=e.block??void 0,t.timestamp=e.timestamp??void 0,t}};function CN(){return{data:void 0,handlerType:0,handlerIds:[]}}var Xt={encode(e,t=A.default.Writer.create()){e.data!==void 0&&Cc.encode(e.data,t.uint32(10).fork()).ldelim(),e.handlerType!==0&&t.uint32(24).int32(e.handlerType),t.uint32(34).fork();for(let n of e.handlerIds)t.int32(n);return t.ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=CN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.data=Cc.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.handlerType=n.int32();continue;case 4:if(a===32){i.handlerIds.push(n.int32());continue}if(a===34){let s=n.uint32()+n.pos;for(;n.pos<s;)i.handlerIds.push(n.int32());continue}break}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{data:E(e.data)?Cc.fromJSON(e.data):void 0,handlerType:E(e.handlerType)?QN(e.handlerType):0,handlerIds:globalThis.Array.isArray(e?.handlerIds)?e.handlerIds.map(t=>globalThis.Number(t)):[]}},toJSON(e){let t={};return e.data!==void 0&&(t.data=Cc.toJSON(e.data)),e.handlerType!==0&&(t.handlerType=qN(e.handlerType)),e.handlerIds?.length&&(t.handlerIds=e.handlerIds.map(n=>Math.round(n))),t},create(e){return Xt.fromPartial(e??{})},fromPartial(e){let t=CN();return t.data=e.data!==void 0&&e.data!==null?Cc.fromPartial(e.data):void 0,t.handlerType=e.handlerType??0,t.handlerIds=e.handlerIds?.map(n=>n)||[],t}};function IN(){return{configUpdated:!1,error:void 0}}var Jc={encode(e,t=A.default.Writer.create()){return e.configUpdated!==!1&&t.uint32(8).bool(e.configUpdated),e.error!==void 0&&t.uint32(18).string(e.error),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=IN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.configUpdated=n.bool();continue;case 2:if(a!==18)break;i.error=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{configUpdated:E(e.configUpdated)?globalThis.Boolean(e.configUpdated):!1,error:E(e.error)?globalThis.String(e.error):void 0}},toJSON(e){let t={};return e.configUpdated!==!1&&(t.configUpdated=e.configUpdated),e.error!==void 0&&(t.error=e.error),t},create(e){return Jc.fromPartial(e??{})},fromPartial(e){let t=IN();return t.configUpdated=e.configUpdated??!1,t.error=e.error??void 0,t}};function SN(){return{gauges:[],counters:[],events:[],exports:[],states:void 0}}var kn={encode(e,t=A.default.Writer.create()){for(let n of e.gauges)Hc.encode(n,t.uint32(10).fork()).ldelim();for(let n of e.counters)Wc.encode(n,t.uint32(18).fork()).ldelim();for(let n of e.events)Zc.encode(n,t.uint32(34).fork()).ldelim();for(let n of e.exports)Yc.encode(n,t.uint32(42).fork()).ldelim();return e.states!==void 0&&Jc.encode(e.states,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=SN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.gauges.push(Hc.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.counters.push(Wc.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.events.push(Zc.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.exports.push(Yc.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.states=Jc.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{gauges:globalThis.Array.isArray(e?.gauges)?e.gauges.map(t=>Hc.fromJSON(t)):[],counters:globalThis.Array.isArray(e?.counters)?e.counters.map(t=>Wc.fromJSON(t)):[],events:globalThis.Array.isArray(e?.events)?e.events.map(t=>Zc.fromJSON(t)):[],exports:globalThis.Array.isArray(e?.exports)?e.exports.map(t=>Yc.fromJSON(t)):[],states:E(e.states)?Jc.fromJSON(e.states):void 0}},toJSON(e){let t={};return e.gauges?.length&&(t.gauges=e.gauges.map(n=>Hc.toJSON(n))),e.counters?.length&&(t.counters=e.counters.map(n=>Wc.toJSON(n))),e.events?.length&&(t.events=e.events.map(n=>Zc.toJSON(n))),e.exports?.length&&(t.exports=e.exports.map(n=>Yc.toJSON(n))),e.states!==void 0&&(t.states=Jc.toJSON(e.states)),t},create(e){return kn.fromPartial(e??{})},fromPartial(e){let t=SN();return t.gauges=e.gauges?.map(n=>Hc.fromPartial(n))||[],t.counters=e.counters?.map(n=>Wc.fromPartial(n))||[],t.events=e.events?.map(n=>Zc.fromPartial(n))||[],t.exports=e.exports?.map(n=>Yc.fromPartial(n))||[],t.states=e.states!==void 0&&e.states!==null?Jc.fromPartial(e.states):void 0,t}};function xN(){return{context:void 0,calldata:""}}var zc={encode(e,t=A.default.Writer.create()){return e.context!==void 0&&Gc.encode(e.context,t.uint32(10).fork()).ldelim(),e.calldata!==""&&t.uint32(18).string(e.calldata),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=xN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.context=Gc.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.calldata=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{context:E(e.context)?Gc.fromJSON(e.context):void 0,calldata:E(e.calldata)?globalThis.String(e.calldata):""}},toJSON(e){let t={};return e.context!==void 0&&(t.context=Gc.toJSON(e.context)),e.calldata!==""&&(t.calldata=e.calldata),t},create(e){return zc.fromPartial(e??{})},fromPartial(e){let t=xN();return t.context=e.context!==void 0&&e.context!==null?Gc.fromPartial(e.context):void 0,t.calldata=e.calldata??"",t}};function TN(){return{chainId:"",address:"",blockTag:""}}var Gc={encode(e,t=A.default.Writer.create()){return e.chainId!==""&&t.uint32(10).string(e.chainId),e.address!==""&&t.uint32(18).string(e.address),e.blockTag!==""&&t.uint32(26).string(e.blockTag),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=TN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.chainId=n.string();continue;case 2:if(a!==18)break;i.address=n.string();continue;case 3:if(a!==26)break;i.blockTag=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{chainId:E(e.chainId)?globalThis.String(e.chainId):"",address:E(e.address)?globalThis.String(e.address):"",blockTag:E(e.blockTag)?globalThis.String(e.blockTag):""}},toJSON(e){let t={};return e.chainId!==""&&(t.chainId=e.chainId),e.address!==""&&(t.address=e.address),e.blockTag!==""&&(t.blockTag=e.blockTag),t},create(e){return Gc.fromPartial(e??{})},fromPartial(e){let t=TN();return t.chainId=e.chainId??"",t.address=e.address??"",t.blockTag=e.blockTag??"",t}};function NN(){return{ethCallParams:[]}}var eV={encode(e,t=A.default.Writer.create()){for(let n of e.ethCallParams)zc.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=NN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.ethCallParams.push(zc.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{ethCallParams:globalThis.Array.isArray(e?.ethCallParams)?e.ethCallParams.map(t=>zc.fromJSON(t)):[]}},toJSON(e){let t={};return e.ethCallParams?.length&&(t.ethCallParams=e.ethCallParams.map(n=>zc.toJSON(n))),t},create(e){return eV.fromPartial(e??{})},fromPartial(e){let t=NN();return t.ethCallParams=e.ethCallParams?.map(n=>zc.fromPartial(n))||[],t}};function RN(){return{ethCallResults:{}}}var tV={encode(e,t=A.default.Writer.create()){return Object.entries(e.ethCallResults).forEach(([n,r])=>{py.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=RN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=py.decode(n,n.uint32());s.value!==void 0&&(i.ethCallResults[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{ethCallResults:qe(e.ethCallResults)?Object.entries(e.ethCallResults).reduce((t,[n,r])=>(t[n]=String(r),t),{}):{}}},toJSON(e){let t={};if(e.ethCallResults){let n=Object.entries(e.ethCallResults);n.length>0&&(t.ethCallResults={},n.forEach(([r,i])=>{t.ethCallResults[r]=i}))}return t},create(e){return tV.fromPartial(e??{})},fromPartial(e){let t=RN();return t.ethCallResults=Object.entries(e.ethCallResults??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=globalThis.String(i)),n),{}),t}};function kN(){return{key:"",value:""}}var py={encode(e,t=A.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==""&&t.uint32(18).string(e.value),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=kN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:E(e.key)?globalThis.String(e.key):"",value:E(e.value)?globalThis.String(e.value):""}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==""&&(t.value=e.value),t},create(e){return py.fromPartial(e??{})},fromPartial(e){let t=kN();return t.key=e.key??"",t.value=e.value??"",t}};function BN(){return{address:"",contractName:"",blockNumber:BigInt("0"),transactionHash:"",chainId:"",transactionIndex:0,logIndex:0,name:"",labels:{}}}var ht={encode(e,t=A.default.Writer.create()){if(e.address!==""&&t.uint32(10).string(e.address),e.contractName!==""&&t.uint32(74).string(e.contractName),e.blockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.blockNumber)!==e.blockNumber)throw new globalThis.Error("value provided for field message.blockNumber of type uint64 too large");t.uint32(16).uint64(e.blockNumber.toString())}return e.transactionHash!==""&&t.uint32(50).string(e.transactionHash),e.chainId!==""&&t.uint32(42).string(e.chainId),e.transactionIndex!==0&&t.uint32(24).int32(e.transactionIndex),e.logIndex!==0&&t.uint32(32).int32(e.logIndex),e.name!==""&&t.uint32(82).string(e.name),Object.entries(e.labels).forEach(([n,r])=>{hy.encode({key:n,value:r},t.uint32(58).fork()).ldelim()}),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=BN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.address=n.string();continue;case 9:if(a!==74)break;i.contractName=n.string();continue;case 2:if(a!==16)break;i.blockNumber=$t(n.uint64());continue;case 6:if(a!==50)break;i.transactionHash=n.string();continue;case 5:if(a!==42)break;i.chainId=n.string();continue;case 3:if(a!==24)break;i.transactionIndex=n.int32();continue;case 4:if(a!==32)break;i.logIndex=n.int32();continue;case 10:if(a!==82)break;i.name=n.string();continue;case 7:if(a!==58)break;let s=hy.decode(n,n.uint32());s.value!==void 0&&(i.labels[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{address:E(e.address)?globalThis.String(e.address):"",contractName:E(e.contractName)?globalThis.String(e.contractName):"",blockNumber:E(e.blockNumber)?BigInt(e.blockNumber):BigInt("0"),transactionHash:E(e.transactionHash)?globalThis.String(e.transactionHash):"",chainId:E(e.chainId)?globalThis.String(e.chainId):"",transactionIndex:E(e.transactionIndex)?globalThis.Number(e.transactionIndex):0,logIndex:E(e.logIndex)?globalThis.Number(e.logIndex):0,name:E(e.name)?globalThis.String(e.name):"",labels:qe(e.labels)?Object.entries(e.labels).reduce((t,[n,r])=>(t[n]=String(r),t),{}):{}}},toJSON(e){let t={};if(e.address!==""&&(t.address=e.address),e.contractName!==""&&(t.contractName=e.contractName),e.blockNumber!==BigInt("0")&&(t.blockNumber=e.blockNumber.toString()),e.transactionHash!==""&&(t.transactionHash=e.transactionHash),e.chainId!==""&&(t.chainId=e.chainId),e.transactionIndex!==0&&(t.transactionIndex=Math.round(e.transactionIndex)),e.logIndex!==0&&(t.logIndex=Math.round(e.logIndex)),e.name!==""&&(t.name=e.name),e.labels){let n=Object.entries(e.labels);n.length>0&&(t.labels={},n.forEach(([r,i])=>{t.labels[r]=i}))}return t},create(e){return ht.fromPartial(e??{})},fromPartial(e){let t=BN();return t.address=e.address??"",t.contractName=e.contractName??"",t.blockNumber=e.blockNumber??BigInt("0"),t.transactionHash=e.transactionHash??"",t.chainId=e.chainId??"",t.transactionIndex=e.transactionIndex??0,t.logIndex=e.logIndex??0,t.name=e.name??"",t.labels=Object.entries(e.labels??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=globalThis.String(i)),n),{}),t}};function ON(){return{key:"",value:""}}var hy={encode(e,t=A.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==""&&t.uint32(18).string(e.value),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ON();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:E(e.key)?globalThis.String(e.key):"",value:E(e.value)?globalThis.String(e.value):""}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==""&&(t.value=e.value),t},create(e){return hy.fromPartial(e??{})},fromPartial(e){let t=ON();return t.key=e.key??"",t.value=e.value??"",t}};function PN(){return{bigDecimal:void 0,doubleValue:void 0,bigInteger:void 0}}var Ot={encode(e,t=A.default.Writer.create()){return e.bigDecimal!==void 0&&t.uint32(10).string(e.bigDecimal),e.doubleValue!==void 0&&t.uint32(17).double(e.doubleValue),e.bigInteger!==void 0&&Nt.encode(e.bigInteger,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=PN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.bigDecimal=n.string();continue;case 2:if(a!==17)break;i.doubleValue=n.double();continue;case 3:if(a!==26)break;i.bigInteger=Nt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{bigDecimal:E(e.bigDecimal)?globalThis.String(e.bigDecimal):void 0,doubleValue:E(e.doubleValue)?globalThis.Number(e.doubleValue):void 0,bigInteger:E(e.bigInteger)?Nt.fromJSON(e.bigInteger):void 0}},toJSON(e){let t={};return e.bigDecimal!==void 0&&(t.bigDecimal=e.bigDecimal),e.doubleValue!==void 0&&(t.doubleValue=e.doubleValue),e.bigInteger!==void 0&&(t.bigInteger=Nt.toJSON(e.bigInteger)),t},create(e){return Ot.fromPartial(e??{})},fromPartial(e){let t=PN();return t.bigDecimal=e.bigDecimal??void 0,t.doubleValue=e.doubleValue??void 0,t.bigInteger=e.bigInteger!==void 0&&e.bigInteger!==null?Nt.fromPartial(e.bigInteger):void 0,t}};function DN(){return{from:0}}var mt={encode(e,t=A.default.Writer.create()){return e.from!==0&&t.uint32(8).int32(e.from),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=DN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.from=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{from:E(e.from)?QN(e.from):0}},toJSON(e){let t={};return e.from!==0&&(t.from=qN(e.from)),t},create(e){return mt.fromPartial(e??{})},fromPartial(e){let t=DN();return t.from=e.from??0,t}};function MN(){return{metadata:void 0,metricValue:void 0,runtimeInfo:void 0}}var Hc={encode(e,t=A.default.Writer.create()){return e.metadata!==void 0&&ht.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&Ot.encode(e.metricValue,t.uint32(18).fork()).ldelim(),e.runtimeInfo!==void 0&&mt.encode(e.runtimeInfo,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=MN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=ht.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.metricValue=Ot.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.runtimeInfo=mt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?ht.fromJSON(e.metadata):void 0,metricValue:E(e.metricValue)?Ot.fromJSON(e.metricValue):void 0,runtimeInfo:E(e.runtimeInfo)?mt.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=ht.toJSON(e.metadata)),e.metricValue!==void 0&&(t.metricValue=Ot.toJSON(e.metricValue)),e.runtimeInfo!==void 0&&(t.runtimeInfo=mt.toJSON(e.runtimeInfo)),t},create(e){return Hc.fromPartial(e??{})},fromPartial(e){let t=MN();return t.metadata=e.metadata!==void 0&&e.metadata!==null?ht.fromPartial(e.metadata):void 0,t.metricValue=e.metricValue!==void 0&&e.metricValue!==null?Ot.fromPartial(e.metricValue):void 0,t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?mt.fromPartial(e.runtimeInfo):void 0,t}};function FN(){return{metadata:void 0,metricValue:void 0,add:!1,runtimeInfo:void 0}}var Wc={encode(e,t=A.default.Writer.create()){return e.metadata!==void 0&&ht.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&Ot.encode(e.metricValue,t.uint32(18).fork()).ldelim(),e.add!==!1&&t.uint32(24).bool(e.add),e.runtimeInfo!==void 0&&mt.encode(e.runtimeInfo,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=FN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=ht.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.metricValue=Ot.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.add=n.bool();continue;case 4:if(a!==34)break;i.runtimeInfo=mt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?ht.fromJSON(e.metadata):void 0,metricValue:E(e.metricValue)?Ot.fromJSON(e.metricValue):void 0,add:E(e.add)?globalThis.Boolean(e.add):!1,runtimeInfo:E(e.runtimeInfo)?mt.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=ht.toJSON(e.metadata)),e.metricValue!==void 0&&(t.metricValue=Ot.toJSON(e.metricValue)),e.add!==!1&&(t.add=e.add),e.runtimeInfo!==void 0&&(t.runtimeInfo=mt.toJSON(e.runtimeInfo)),t},create(e){return Wc.fromPartial(e??{})},fromPartial(e){let t=FN();return t.metadata=e.metadata!==void 0&&e.metadata!==null?ht.fromPartial(e.metadata):void 0,t.metricValue=e.metricValue!==void 0&&e.metricValue!==null?Ot.fromPartial(e.metricValue):void 0,t.add=e.add??!1,t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?mt.fromPartial(e.runtimeInfo):void 0,t}};function LN(){return{metadata:void 0,distinctEntityId:"",attributes:void 0,severity:0,message:"",runtimeInfo:void 0,noMetric:!1}}var Zc={encode(e,t=A.default.Writer.create()){return e.metadata!==void 0&&ht.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.distinctEntityId!==""&&t.uint32(18).string(e.distinctEntityId),e.attributes!==void 0&&P.encode(P.wrap(e.attributes),t.uint32(50).fork()).ldelim(),e.severity!==0&&t.uint32(56).int32(e.severity),e.message!==""&&t.uint32(66).string(e.message),e.runtimeInfo!==void 0&&mt.encode(e.runtimeInfo,t.uint32(42).fork()).ldelim(),e.noMetric!==!1&&t.uint32(24).bool(e.noMetric),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=LN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=ht.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.distinctEntityId=n.string();continue;case 6:if(a!==50)break;i.attributes=P.unwrap(P.decode(n,n.uint32()));continue;case 7:if(a!==56)break;i.severity=n.int32();continue;case 8:if(a!==66)break;i.message=n.string();continue;case 5:if(a!==42)break;i.runtimeInfo=mt.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.noMetric=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?ht.fromJSON(e.metadata):void 0,distinctEntityId:E(e.distinctEntityId)?globalThis.String(e.distinctEntityId):"",attributes:qe(e.attributes)?e.attributes:void 0,severity:E(e.severity)?Hq(e.severity):0,message:E(e.message)?globalThis.String(e.message):"",runtimeInfo:E(e.runtimeInfo)?mt.fromJSON(e.runtimeInfo):void 0,noMetric:E(e.noMetric)?globalThis.Boolean(e.noMetric):!1}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=ht.toJSON(e.metadata)),e.distinctEntityId!==""&&(t.distinctEntityId=e.distinctEntityId),e.attributes!==void 0&&(t.attributes=e.attributes),e.severity!==0&&(t.severity=Wq(e.severity)),e.message!==""&&(t.message=e.message),e.runtimeInfo!==void 0&&(t.runtimeInfo=mt.toJSON(e.runtimeInfo)),e.noMetric!==!1&&(t.noMetric=e.noMetric),t},create(e){return Zc.fromPartial(e??{})},fromPartial(e){let t=LN();return t.metadata=e.metadata!==void 0&&e.metadata!==null?ht.fromPartial(e.metadata):void 0,t.distinctEntityId=e.distinctEntityId??"",t.attributes=e.attributes??void 0,t.severity=e.severity??0,t.message=e.message??"",t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?mt.fromPartial(e.runtimeInfo):void 0,t.noMetric=e.noMetric??!1,t}};function UN(){return{metadata:void 0,payload:"",runtimeInfo:void 0}}var Yc={encode(e,t=A.default.Writer.create()){return e.metadata!==void 0&&ht.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.payload!==""&&t.uint32(18).string(e.payload),e.runtimeInfo!==void 0&&mt.encode(e.runtimeInfo,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof A.default.Reader?e:A.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=UN();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=ht.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.payload=n.string();continue;case 3:if(a!==26)break;i.runtimeInfo=mt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?ht.fromJSON(e.metadata):void 0,payload:E(e.payload)?globalThis.String(e.payload):"",runtimeInfo:E(e.runtimeInfo)?mt.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=ht.toJSON(e.metadata)),e.payload!==""&&(t.payload=e.payload),e.runtimeInfo!==void 0&&(t.runtimeInfo=mt.toJSON(e.runtimeInfo)),t},create(e){return Yc.fromPartial(e??{})},fromPartial(e){let t=UN();return t.metadata=e.metadata!==void 0&&e.metadata!==null?ht.fromPartial(e.metadata):void 0,t.payload=e.payload??"",t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?mt.fromPartial(e.runtimeInfo):void 0,t}},Dse={name:"Processor",fullName:"processor.Processor",methods:{start:{name:"Start",requestType:zN,requestStream:!1,responseType:yl,responseStream:!1,options:{}},stop:{name:"Stop",requestType:yl,requestStream:!1,responseType:yl,responseStream:!1,options:{}},getConfig:{name:"GetConfig",requestType:VN,requestStream:!1,responseType:JN,responseStream:!1,options:{}},processBindings:{name:"ProcessBindings",requestType:GN,requestStream:!1,responseType:HN,responseStream:!1,options:{}},processBindingsStream:{name:"ProcessBindingsStream",requestType:WN,requestStream:!0,responseType:ZN,responseStream:!0,options:{}},preprocessBindingsStream:{name:"PreprocessBindingsStream",requestType:YN,requestStream:!0,responseType:XN,responseStream:!0,options:{}}}};function An(e){let t=BigInt(Math.trunc(e.getTime()/1e3)),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}function nn(e){let t=(globalThis.Number(e.seconds.toString())||0)*1e3;return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function yn(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):nn(ke.fromJSON(e))}function $t(e){return BigInt(e.toString())}A.default.util.Long!==Ti&&(A.default.util.Long=Ti,A.default.configure());function qe(e){return typeof e=="object"&&e!==null}function E(e){return e!=null}var $N=":sto_bi",nV=":sto_bd";function rV(e){return e.slice(0,128).replace(/[^_a-zA-Z0-9]/g,"_")}function my(e){return e==="labels"?"labels_":rV(e)}function iV(e){return e.length>1024?(console.warn(`${e} is exceed max length for value storage, will be truncate to 1024 characters`),e.slice(0,1024)):e}function gy(e){if(Object.keys(e).length===0)return e;let t={};for(let n in e)e[n]!==void 0?t[my(n)]=iV(e[n]):console.warn(`key: ${n} has empty value in attributes`);return t}function KN(e,t,n){let r;switch(typeof e){case"string":return e.slice(0,t);case"bigint":return e.toString()+$N;case"number":return e;case"function":return null;case"symbol":return null}if(Array.isArray(e))return console.warn(`Array type inside log/event payload is not currently supported and will be ignored. Path: ${n??""}`),null;if(e===Object(e)){if(e instanceof Date)return e.toISOString();if(e instanceof Jt)return e.isNaN()||!e.isFinite()?(console.error("can't submit NaN or Infinity value, will store as 0"),0):e.toString()+nV;if(sr.isBN(e))return e.toString(10)+$N;if(e instanceof Promise)return console.error("Cannot submit promise"),null;r={};for(let[a,s]of Object.entries(e)){let o=KN(s,t,`${n??""}.${a}`);o!=null&&(r[a]=o)}}else r=e;return r}function Ef(e){return KN(e,1e3)}import("process").then(e=>e.stdout.write(""));import{MapStateStorage as sV}from"@sentio/runtime";import{ListStateStorage as aV}from"@sentio/runtime";var _y=class extends aV{},ma=_y;cn(ma,"INSTANCE",new _y);var ga=class{static register(t){ma.INSTANCE.addValue(t)}static findEntity(t){for(let n of ma.INSTANCE.getValues())if(n.entities[t])return n.entities[t]}};import("process").then(e=>e.stdout.write(""));var Ay=class extends sV{},Xc=Ay;cn(Xc,"INSTANCE",new Ay);var Cf=class{ctx;constructor(t){this.ctx=t}emit(t,n){tR(t),eR(this.ctx,t,n)}},roe=Rt;function jN(e){let t=[];for(let[n,r]of Object.entries(e)){let i,a,s;typeof r=="number"?i=r:r.address||r.symbol?a=r:s=pa.create({fields:jN(r)}),t.push({name:n,basicType:i,coinType:a,structType:s})}return t}var If=class{eventName;config;constructor(t,n){this.eventName=t,this.config=n}static register(t,n){tR(t);let r=Ri.create();n?.fields&&(r=Ri.create({name:t,fields:jN(n.fields)}));let i=new If(t,r);return Xc.INSTANCE.getOrSetValue(t,i)}emit(t,n){eR(t,this.eventName,n)}};function eR(e,t,n){let{distinctId:r,severity:i,message:a,...s}=n,o={metadata:e.getMetaData(t,{}),severity:i||kt.INFO,message:a||"",distinctEntityId:r||"",attributes:{...gy(e.baseLabels),...Ef(s)},runtimeInfo:void 0,noMetric:!0};e.update({events:[o]})}function tR(e){if(ga.findEntity(e))throw new Error(`Event name ${e} is already used in the database schema`)}import("process").then(e=>e.stdout.write(""));function xf(e){if(typeof e=="number"){if(Number.isNaN(e))throw new Error("Cannot record NaN value");if(!Number.isFinite(e))throw new Error("Cannot record infinite value");return Number.isInteger(e)&&!Number.isSafeInteger(e)?Ot.fromPartial({bigInteger:yy(e)}):Ot.fromPartial({doubleValue:Number(e)})}if(typeof e=="bigint")return Ot.fromPartial({bigInteger:yy(e)});if(typeof e=="string")return Ot.fromPartial({bigDecimal:e});if(e.isInteger())return Ot.fromPartial({bigInteger:nR(e)});if(e.isNaN())throw new Error("Cannot record NaN value");if(!e.isFinite())throw new Error("Cannot record infinite value");return Ot.fromPartial({bigDecimal:e.toString()})}function nR(e){let t=e.isNegative();return t&&(e=e.abs()),rR(e.toString(16),t)}function Sf(e){let t=e<0;return t&&(e=-e),rR(e.toString(16),t)}function yy(e){return typeof e=="number"||typeof e=="bigint"?Sf(e):typeof e=="string"?Sf(BigInt(e)):e instanceof Jt?nR(e):Sf(e)}function rR(e,t){e.length%2===1&&(e="0"+e);let n=Buffer.from(e,"hex");return{negative:t,data:new Uint8Array(n)}}import("process").then(e=>e.stdout.write(""));var _a=class{name;constructor(t){this.name=my(t)}};import("process").then(e=>e.stdout.write(""));import{MapStateStorage as oV}from"@sentio/runtime";var by=class{unit;description;sparse;aggregationConfig};var Tf=class extends _a{config;constructor(t,n,r){super(n),this.config=jr.fromPartial({...r,name:this.name,type:t});let i=this.config.aggregationConfig;i&&i.intervalInMinutes.length&&(i.intervalInMinutes.length>1&&console.error("current only support one intervalInMinutes, only first interval will be used for",n),i.intervalInMinutes[0]>0&&i.types.length===0&&(i.types=[wt.SUM,wt.COUNT]))}},vy=class extends oV{getOrRegisterMetric(t,n,r){let i=this.getOrRegister(),a=i.get(n);if(a&&a.config.type!==t)throw Error(`redefine ${n} of metric type ${t} that is previously ${a.config.type}`);return a||(t===Bt.COUNTER?a=gs._create(n,r):a=_s._create(n,r)),i.set(n,a),a}},ms=vy;cn(ms,"INSTANCE",new vy);var gs=class extends Tf{static register(t,n){return ms.INSTANCE.getOrRegisterMetric(Bt.COUNTER,t,n)}static _create(t,n){return new gs(t,n)}constructor(t,n){super(Bt.COUNTER,t,jr.fromPartial({...n,aggregationConfig:{intervalInMinutes:n?.resolutionConfig?[n?.resolutionConfig?.intervalInMinutes]:[]}}))}add(t,n,r={}){this.record(t,n,r,!0)}sub(t,n,r={}){this.record(t,n,r,!1)}record(t,n,r,i){t.update({counters:[{metadata:t.getMetaData(this.name,r),metricValue:xf(n),add:i,runtimeInfo:void 0}]})}},Nf=class{ctx;counter;constructor(t,n){this.counter=gs._create(t),this.ctx=n}add(t,n={}){this.counter.add(this.ctx,t,n)}sub(t,n={}){this.counter.sub(this.ctx,t,n)}},_s=class extends Tf{static register(t,n){return ms.INSTANCE.getOrRegisterMetric(Bt.GAUGE,t,n)}static _create(t,n){return new _s(t,n)}constructor(t,n){super(Bt.GAUGE,t,jr.fromPartial({...n}))}record(t,n,r={}){t.update({gauges:[{metadata:t.getMetaData(this.config.name,r),metricValue:xf(n),runtimeInfo:void 0}]})}},Rf=class{gauge;ctx;constructor(t,n){this.gauge=_s._create(t),this.ctx=n}record(t,n={}){this.gauge.record(this.ctx,t,n)}},bl=class{ctx;constructor(t){this.ctx=t}Counter(t){return new Nf(t,this.ctx)}Gauge(t){return new Rf(t,this.ctx)}};import("process").then(e=>e.stdout.write(""));var Zu=Cn(lP(),1);import{mergeProcessResults as kY,PluginManager as BY}from"@sentio/runtime";import{PluginManager as NY}from"@sentio/runtime";var qh=class{cache=new Map;getKey(t,n){return`${t}-${n}`}has(t,n){return this.cache.has(this.getKey(t,n))}get(t,n){return this.cache.get(this.getKey(t,n))}set(t){let n=t.data?.fields.id.stringValue;if(n){let r=this.getKey(t.entity,n),i=t.data?.fields||{};if(this.cache.has(r)){let a=this.cache.get(r)?.data?.fields||{};i=Object.assign(a,i)}this.cache.set(r,{...t,data:{fields:i}})}}delete(t,n){n&&this.cache.delete(this.getKey(t,n))}};import("process").then(e=>e.stdout.write(""));var dP=new Error("Value is required but received null or undefined");function Rle(e){let{from:t,to:n,...r}=e;return{from:i=>{if(i==null)throw dP;return t(i)},to:i=>{if(i==null||i.nullValue)throw dP;return n(i)},...r,required:!0}}function kle(e){return{from:t=>({listValue:{values:t.map(e.from)}}),to:t=>t.listValue?.values.map(e.to)||[],isArray:!0,isRelation:e.isRelation,relationName:e.relationName}}function Ble(e){return{from:t=>t==null?{nullValue:vt.NULL_VALUE}:{stringValue:e[t]},to(t){return t.stringValue}}}function Ole(e){return{from:t=>typeof t=="string"?{stringValue:t}:t instanceof Uint8Array?{stringValue:`0x${Buffer.from(t).toString("hex")}`}:typeof t=="object"?{stringValue:t.id.toString()}:{nullValue:vt.NULL_VALUE},to(t){return t.stringValue},isRelation:!0,relationName:e}}var bY={from:e=>e==null?{nullValue:vt.NULL_VALUE}:{stringValue:e},to(e){return e.stringValue}},vY={from:e=>e==null?{nullValue:vt.NULL_VALUE}:{intValue:Math.floor(e)},to(e){return e.intValue}},wY={from:e=>e==null?{nullValue:vt.NULL_VALUE}:{floatValue:e},to(e){return e.floatValue}},EY={from:e=>e==null?{nullValue:vt.NULL_VALUE}:{boolValue:e},to(e){return e.boolValue}},CY={from:e=>e==null?{nullValue:vt.NULL_VALUE}:{timestampValue:e},to(e){return e.timestampValue}},fP={from:e=>e==null?{nullValue:vt.NULL_VALUE}:{bytesValue:e},to(e){return e.bytesValue}},IY={from(e){return typeof e=="string"?{stringValue:e}:e instanceof Uint8Array?{stringValue:`0x${Buffer.from(e).toString("hex")}`}:{nullValue:vt.NULL_VALUE}},to(e){if(e.stringValue)return e.stringValue;if(e.bytesValue)return`0x${Buffer.from(e.bytesValue).toString("hex")}`}},SY={from:e=>{if(e==null)return{nullValue:vt.NULL_VALUE};let t=(e.c||[]).map((r,i)=>i==0?r.toString():r.toString().padStart(14,"0")).join(""),n=-(t.length-(e.e??0)-1);return{bigdecimalValue:{value:Vh(BigInt(t)*BigInt(e.s??1)),exp:n}}},to(e){let t=e.bigdecimalValue;if(t){let n=pP(t.value.data),r=new Jt(n.toString());return t.exp<0?r=r.dividedBy(new Jt(10).pow(-t.exp)):r=r.multipliedBy(new Jt(10).pow(t.exp)),r.multipliedBy(t.value?.negative?-1:1)}}},xY={from:e=>e==null?{nullValue:vt.NULL_VALUE}:{bigintValue:Vh(e)},to(e){if(e.bigintValue){let t=pP(e.bigintValue?.data);return e.bigintValue.negative&&(t=-t),t}}};function pP(e){let t=BigInt(0);for(let n=0;n<e.length;n++)t=t*BigInt(256)+BigInt(e[n]);return t}function Vh(e){let t=e<0;t&&(e=-e);let n=e.toString(16);n.length%2===1&&(n="0"+n);let r=Buffer.from(n,"hex");return{negative:t,data:new Uint8Array(r)}}var Ple={BigDecimal:SY,BigInt:xY,String:bY,Boolean:EY,Uint8Array:fP,ID:IY,Bytes:fP,Int:vY,Float:wY,Timestamp:CY};import("process").then(e=>e.stdout.write(""));function Jh(e){return e==null?{nullValue:0}:typeof e=="boolean"?{boolValue:e}:typeof e=="string"?{stringValue:e}:typeof e=="number"?{floatValue:e}:typeof e=="bigint"?{bigintValue:Vh(e)}:e instanceof Jt?TY(e):e instanceof Date?{timestampValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{listValue:{values:e.map(t=>Jh(t))}}:{nullValue:0}}function TY(e){return{bigdecimalValue:void 0}}import("process").then(e=>e.stdout.write(""));function zh(e){if(e==null)throw new Error("can't figure out entityName from undefined");if(typeof e=="string")return e;if(typeof e=="function")return e.entityName;if(typeof e=="object")return e.constructor.entityName;throw new Error(`can't figure out entityName from ${typeof e}`)}var fd=class{constructor(t){this.context=t}cache=new qh;async get(t,n){let r=zh(t),i=this.cache.get(r,n);if(i)return Promise.resolve(this.newEntity(t,i));let s=await this.context.sendRequest({get:{entity:r,id:n.toString()}});if(s.entityList?.entities[0]){let o=s.entityList?.entities[0];return this.newEntity(t,o)}}async delete(t,n){let r={entity:[],id:[]},i=zh(t);if(n)if(Array.isArray(n))for(let a of n)r.entity.push(i),r.id.push(a.toString()),this.cache.delete(i,a.toString());else r.entity.push(i),r.id.push(n),this.cache.delete(i,n);else{let a=Array.isArray(t)?t:[t];for(let s of a)r.entity.push(i),r.id.push(s.id.toString()),this.cache.delete(i,n)}await this.context.sendRequest({delete:r})}async upsert(t){let n=Array.isArray(t)?t:[t],r={upsert:{entity:n.map(a=>zh(a)),id:n.map(a=>a.id.toString()),entityData:n.map(a=>a._data)}};return this.context.sendRequest(r).then(a=>{r.upsert?.entity.forEach((s,o)=>{this.cache.set({entity:s,data:r.upsert?.entityData[o],genBlockChain:"",genBlockTime:void 0,genBlockNumber:0n})})})}async*listIterator(t,n){let r;for(;;){let i=await this.listRequest(t,n||[],r);for(let a of i.entityList?.entities||[])yield this.newEntity(t,a);if(!i.nextCursor)break;r=i.nextCursor}}async*listBatched(t,n,r=100){let i;for(;;){let a=await this.listRequest(t,n||[],i,r);if(yield(a.entityList?.entities||[]).map(o=>this.newEntity(t,o)),!a.nextCursor)break;i=a.nextCursor}}async listRequest(t,n,r,i){let a=await this.context.sendRequest({list:{entity:zh(t),cursor:r,pageSize:i,filters:n?.map(s=>({field:s.field,op:RY[s.op],value:{values:Array.isArray(s.value)?s.value.map(o=>Jh(o)):[Jh(s.value)]}}))||[]}},3600);return a.entityList?.entities?.forEach(s=>{this.cache.set(s)}),a}async list(t,n,r){if(r){let i=await this.listRequest(t,n||[],r.cursor,r.pageSize);return r.cursor=i.nextCursor,i.entityList?.entities.map(a=>this.newEntity(t,a))||[]}return this.fromAsync(this.listIterator(t,n??[]))}async fromAsync(t){let n=[];for await(let r of t)n.push(r);return n}newEntity(t,n){if(typeof t=="string"){let i=ga.findEntity(t);if(!i&&(i=ga.findEntity(n.entity),!i))throw new Error(`Entity ${t} not found`);t=i}let r=new t({});return r._data=n.data,r}},RY={"=":Ee.EQ,"!=":Ee.NE,"<":Ee.LT,"<=":Ee.LE,">":Ee.GT,">=":Ee.GE,in:Ee.IN,"not in":Ee.NOT_IN,like:Ee.LIKE,"not like":Ee.NOT_LIKE,"has all":Ee.HAS_ALL,"has any":Ee.HAS_ANY};function Gle(){let e=NY.INSTANCE.dbContextLocalStorage.getStore();if(e)return new fd(e)}import("process").then(e=>e.stdout.write(""));var Mw=class{meter;eventLogger;_store;baseLabels;active;_res={counters:[],events:[],exports:[],gauges:[],states:{configUpdated:!1}};update(t){if(this.active)this._res=kY([this._res,kn.fromPartial(t)]);else throw new Zu.ServerError(Zu.Status.INTERNAL,"context not active, possible async function invoke without await")}constructor(t){this.meter=new bl(this),this.eventLogger=new Cf(this),this.baseLabels=t||{},this.active=!0,this.initStore()}stopAndGetResult(){if(this.active)return this.active=!1,this._res;throw new Zu.ServerError(Zu.Status.INTERNAL,"Can't get result from same context twice")}metadataCache=new Map;getMetaData(t,n){if(Object.keys(n).length===0){let r=this.metadataCache.get(t);return r||(r={...this.baseLabels,...this.getMetaDataInternal(t,n)},this.metadataCache.set(t,r)),r}return{...this.baseLabels,...this.getMetaDataInternal(t,n)}}get store(){return this._store==null&&console.warn("Store is not set, please initialize the processor with your database schema first."),this._store}initStore(){let t=BY.INSTANCE.dbContextLocalStorage.getStore();t&&(this._store=new fd(t))}};import("process").then(e=>e.stdout.write(""));import{MapStateStorage as OY}from"@sentio/runtime";var Fw=class extends OY{},Yu=Fw;cn(Yu,"INSTANCE",new Fw);var pd=class extends _a{static register(t,n){let r=new pd(t,n);return Yu.INSTANCE.getOrSetValue(t,r)}channel;constructor(t,n){super(t),this.channel=n}emit(t,n){let r={metadata:t.getMetaData(this.name,{}),payload:JSON.stringify(n),runtimeInfo:void 0};t.update({exports:[r]})}};import("process").then(e=>e.stdout.write(""));import{MapStateStorage as PY}from"@sentio/runtime";var Uw=class extends PY{},Ms=Uw;cn(Ms,"INSTANCE",new Uw);var Hh=class extends _a{static register(t,n){let r=new Hh(t,{...Hh.DEFAULT_OPTIONS,...n});return Ms.INSTANCE.getOrSetValue(t,r)}options;constructor(t,n){super(t),this.options=n}trackEvent(t,n){let{distinctId:r,message:i,severity:a,...s}=n,o={message:i||"",severity:a||kt.INFO,metadata:t.getMetaData(this.name,{}),distinctEntityId:r||"",attributes:Ef(s),runtimeInfo:void 0,noMetric:!1};t.update({events:[o]})}},Gh=Hh;cn(Gh,"DEFAULT_OPTIONS",{totalByDay:!0,unique:!0});var Wh=class extends Gh{static register(t,n){t?t=["user",t].join("_"):t="user";let r=new Wh(t,{...Wh.DEFAULT_OPTIONS,...n});return Ms.INSTANCE.getOrSetValue(t,r)}},Lw=Wh;cn(Lw,"DEFAULT_OPTIONS",{totalByDay:!0,unique:!0,distinctByDays:[1,7,30]});import("process").then(e=>e.stdout.write(""));import{Plugin as MY,PluginManager as FY}from"@sentio/runtime";import{ListStateStorage as DY}from"@sentio/runtime";var Qw=class extends DY{},hd=Qw;cn(hd,"INSTANCE",new Qw);import("process").then(e=>e.stdout.write(""));var Zh=class extends MY{name="CorePlugin";async configure(t){t.templateInstances=[...hd.INSTANCE.getValues()];for(let n of ms.INSTANCE.getValues())t.metricConfigs.push({...n.config});for(let n of Xc.INSTANCE.getValues())t.eventLogConfigs.push({...n.config});for(let n of Ms.INSTANCE.getValues())t.eventTrackingConfigs.push({distinctAggregationByDays:n.options.distinctByDays||[],eventName:n.name,retentionConfig:void 0,totalByDay:n.options.totalByDay||!1,totalPerEntity:void 0,unique:n.options.unique||!1});for(let n of Yu.INSTANCE.getValues())t.exportConfigs.push({name:n.name,channel:n.channel});ma.INSTANCE.getValues().length>0&&(t.dbSchema={gqlSchema:ma.INSTANCE.getValues().map(n=>n.source).join(`
|
|
822
|
+
|
|
823
|
+
`)})}};FY.INSTANCE.register(new Zh);import("process").then(e=>e.stdout.write(""));import("process").then(e=>e.stdout.write(""));export{Ti as a,Oo as b,yl as c,ps as d,Rq as e,kq as f,P as g,ly as h,Ni as i,Kr as j,ke as k,vt as l,da as m,me as n,st as o,fa as p,Nt as q,Bt as r,Lq as s,Uq as t,wt as u,Qq as v,qq as w,ei as x,Vq as y,Jq as z,ti as A,zq as B,Gq as C,ve as D,QN as E,qN as F,kt as G,Hq as H,Wq as I,ha as J,Ose as K,Pse as L,Rt as M,Zq as N,Yq as O,Ee as P,Xq as Q,$q as R,Fo as S,Lo as T,VN as U,JN as V,Uo as W,Qo as X,qo as Y,Vo as Z,Jo as _,zo as $,jr as aa,Ri as ba,pa as ca,yr as da,Go as ea,Ho as fa,Ar as ga,ft as ha,Kq as ia,Wo as ja,br as ka,vr as la,zN as ma,jq as na,pt as oa,Zo as pa,Yo as qa,wr as ra,Xo as sa,$o as ta,Ko as ua,jo as va,ec as wa,tc as xa,nc as ya,Er as za,rc as Aa,ic as Ba,ac as Ca,Cr as Da,Ir as Ea,sc as Fa,oc as Ga,cc as Ha,uc as Ia,Sr as Ja,ki as Ka,Yt as La,fy as Ma,xr as Na,lc as Oa,dc as Pa,fc as Qa,pc as Ra,hc as Sa,mc as Ta,GN as Ua,HN as Va,WN as Wa,ZN as Xa,YN as Ya,gc as Za,XN as _a,Tr as $a,_c as ab,Ac as bb,Nr as cb,yc as db,bc as eb,vc as fb,wc as gb,Ec as hb,Cc as ib,Ic as jb,Sc as kb,xc as lb,Tc as mb,Nc as nb,Rc as ob,kc as pb,Bc as qb,Oc as rb,Pc as sb,Dc as tb,Mc as ub,Fc as vb,Lc as wb,Uc as xb,Qc as yb,qc as zb,Vc as Ab,Xt as Bb,Jc as Cb,kn as Db,zc as Eb,Gc as Fb,eV as Gb,tV as Hb,py as Ib,ht as Jb,hy as Kb,Ot as Lb,mt as Mb,Hc as Nb,Wc as Ob,Zc as Pb,Yc as Qb,Dse as Rb,j as Sb,Qn as Tb,be as Ub,we as Vb,fe as Wb,Sn as Xb,mE as Yb,sl as Zb,Eo as _b,cQ as $b,wA as ac,cf as bc,pq as cc,VA as dc,gy as ec,ga as fc,Xc as gc,Cf as hc,roe as ic,jN as jc,If as kc,xf as lc,yy as mc,by as nc,gs as oc,Nf as pc,_s as qc,Rf as rc,bl as sc,Gn as tc,za as uc,Ga as vc,lP as wc,dP as xc,Rle as yc,kle as zc,Ble as Ac,Ole as Bc,bY as Cc,vY as Dc,wY as Ec,EY as Fc,CY as Gc,fP as Hc,IY as Ic,SY as Jc,xY as Kc,pP as Lc,Vh as Mc,Ple as Nc,Jh as Oc,zh as Pc,fd as Qc,Gle as Rc,Mw as Sc,pd as Tc,Ms as Uc,Gh as Vc,Lw as Wc,hd as Xc,Zh as Yc};
|
|
824
|
+
/*! Bundled license information:
|
|
825
|
+
|
|
826
|
+
mime-db/index.js:
|
|
827
|
+
(*!
|
|
828
|
+
* mime-db
|
|
829
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
830
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
831
|
+
* MIT Licensed
|
|
832
|
+
*)
|
|
833
|
+
|
|
834
|
+
mime-types/index.js:
|
|
835
|
+
(*!
|
|
836
|
+
* mime-types
|
|
837
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
838
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
839
|
+
* MIT Licensed
|
|
840
|
+
*)
|
|
841
|
+
|
|
842
|
+
@grpc/proto-loader/build/src/util.js:
|
|
843
|
+
(**
|
|
844
|
+
* @license
|
|
845
|
+
* Copyright 2018 gRPC authors.
|
|
846
|
+
*
|
|
847
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
848
|
+
* you may not use this file except in compliance with the License.
|
|
849
|
+
* You may obtain a copy of the License at
|
|
850
|
+
*
|
|
851
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
852
|
+
*
|
|
853
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
854
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
855
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
856
|
+
* See the License for the specific language governing permissions and
|
|
857
|
+
* limitations under the License.
|
|
858
|
+
*
|
|
859
|
+
*)
|
|
860
|
+
|
|
861
|
+
long/umd/index.js:
|
|
862
|
+
(**
|
|
863
|
+
* @license
|
|
864
|
+
* Copyright 2009 The Closure Library Authors
|
|
865
|
+
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
866
|
+
*
|
|
867
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
868
|
+
* you may not use this file except in compliance with the License.
|
|
869
|
+
* You may obtain a copy of the License at
|
|
870
|
+
*
|
|
871
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
872
|
+
*
|
|
873
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
874
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
875
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
876
|
+
* See the License for the specific language governing permissions and
|
|
877
|
+
* limitations under the License.
|
|
878
|
+
*
|
|
879
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
880
|
+
*)
|
|
881
|
+
|
|
882
|
+
@grpc/proto-loader/build/src/index.js:
|
|
883
|
+
(**
|
|
884
|
+
* @license
|
|
885
|
+
* Copyright 2018 gRPC authors.
|
|
886
|
+
*
|
|
887
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
888
|
+
* you may not use this file except in compliance with the License.
|
|
889
|
+
* You may obtain a copy of the License at
|
|
890
|
+
*
|
|
891
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
892
|
+
*
|
|
893
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
894
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
895
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
896
|
+
* See the License for the specific language governing permissions and
|
|
897
|
+
* limitations under the License.
|
|
898
|
+
*
|
|
899
|
+
*)
|
|
900
|
+
|
|
901
|
+
@noble/hashes/esm/utils.js:
|
|
902
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
903
|
+
|
|
904
|
+
@noble/curves/esm/abstract/utils.js:
|
|
905
|
+
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
906
|
+
|
|
907
|
+
@noble/curves/esm/abstract/modular.js:
|
|
908
|
+
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
909
|
+
|
|
910
|
+
@noble/curves/esm/abstract/curve.js:
|
|
911
|
+
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
912
|
+
|
|
913
|
+
@noble/curves/esm/abstract/weierstrass.js:
|
|
914
|
+
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
915
|
+
|
|
916
|
+
@noble/curves/esm/_shortw_utils.js:
|
|
917
|
+
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
918
|
+
|
|
919
|
+
@noble/curves/esm/secp256k1.js:
|
|
920
|
+
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
921
|
+
|
|
922
|
+
long/index.js:
|
|
923
|
+
(**
|
|
924
|
+
* @license
|
|
925
|
+
* Copyright 2009 The Closure Library Authors
|
|
926
|
+
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
927
|
+
*
|
|
928
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
929
|
+
* you may not use this file except in compliance with the License.
|
|
930
|
+
* You may obtain a copy of the License at
|
|
931
|
+
*
|
|
932
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
933
|
+
*
|
|
934
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
935
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
936
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
937
|
+
* See the License for the specific language governing permissions and
|
|
938
|
+
* limitations under the License.
|
|
939
|
+
*
|
|
940
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
941
|
+
*)
|
|
942
|
+
*/
|
|
943
|
+
//# sourceMappingURL=chunk-KCSKNUVW.js.map
|