dash-platform-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build.yml +35 -0
- package/.github/workflows/publish.yml +18 -0
- package/LICENSE +21 -0
- package/README.md +43 -0
- package/babel.config.js +3 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +12 -0
- package/index.js +76 -0
- package/package.json +37 -0
- package/proto/platform.proto +1768 -0
- package/src/dapi/getDocuments.js +33 -0
- package/src/dapi/getStatus.js +19 -0
- package/test/unit/index.spec.js +64 -0
- package/webpack.config.js +18 -0
package/dist/main.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,(()=>(()=>{var e={91:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(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){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2774),t),i(n(2421),t),i(n(7395),t),i(n(8105),t),i(n(3652),t),i(n(6776),t),i(n(4236),t),i(n(6524),t),i(n(5972),t),i(n(7640),t),i(n(4092),t)},169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=null;"undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof MozWebSocket?r=MozWebSocket:void 0!==n.g?r=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?r=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket);const i=r},207:(e,t,n)=>{"use strict";const r=n(2893),i=n(9744),{Buffer:o}=n(8287);class a extends r{constructor(e){super(e),this.valueSharing=new i}_pushObject(e,t){if(null!==e){const t=this.valueSharing.check(e);switch(t){case i.FIRST:this._pushTag(28);break;case i.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(t)}}return super._pushObject(e,t)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...e){const t=new a;t.on("data",(()=>{}));for(const n of e)t.pushAny(n);return t.stopRecording(),t.removeAllListeners("data"),t._encodeAll(e)}static encodeCanonical(...e){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(e,t){const n=new a(t);return n.on("data",(()=>{})),n.pushAny(e),n.stopRecording(),n.removeAllListeners("data"),n._encodeAll([e])}static encodeAsync(e,t){return new Promise(((n,r)=>{const i=[],u=new a(t);u.on("data",(()=>{})),u.on("error",r),u.on("finish",(()=>n(o.concat(i)))),u.pushAny(e),u.stopRecording(),u.removeAllListeners("data"),u.on("data",(e=>i.push(e))),u.pushAny(e),u.end()}))}}e.exports=a},213:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncIterableOf=async function*(e){yield e}},251:(e,t)=>{t.read=function(e,t,n,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,d=-7,f=n?i-1:0,l=n?-1:1,v=e[t+f];for(f+=l,o=v&(1<<-d)-1,v>>=-d,d+=u;d>0;o=256*o+e[t+f],f+=l,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=r;d>0;a=256*a+e[t+f],f+=l,d-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(v?-1:1);a+=Math.pow(2,r),o-=c}return(v?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,u,s,c=8*o-i-1,d=(1<<c)-1,f=d>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,p=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?l/s:l*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=d?(u=0,a=d):a+f>=1?(u=(t*s-1)*Math.pow(2,i),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+v]=255&u,v+=p,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;e[n+v]=255&a,v+=p,a/=256,c-=8);e[n+v-p]|=128*h}},345:(e,t,n)=>{e.exports=n(7007).EventEmitter},596:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesValue=t.StringValue=t.BoolValue=t.UInt32Value=t.Int32Value=t.UInt64Value=t.Int64Value=t.FloatValue=t.DoubleValue=t.protobufPackage=void 0;var r=n(4489);function i(){return{value:new Uint8Array(0)}}t.protobufPackage="google.protobuf",t.DoubleValue={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),0!==e.value&&t.uint32(9).double(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:0};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(9!==a)break;o.value=n.double();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.DoubleValue.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:0};return n.value=null!==(t=e.value)&&void 0!==t?t:0,n}},t.FloatValue={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),0!==e.value&&t.uint32(13).float(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:0};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(13!==a)break;o.value=n.float();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.FloatValue.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:0};return n.value=null!==(t=e.value)&&void 0!==t?t:0,n}},t.Int64Value={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),"0"!==e.value&&t.uint32(8).int64(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:"0"};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(8!==a)break;o.value=n.int64().toString();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.Int64Value.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:"0"};return n.value=null!==(t=e.value)&&void 0!==t?t:"0",n}},t.UInt64Value={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),"0"!==e.value&&t.uint32(8).uint64(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:"0"};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(8!==a)break;o.value=n.uint64().toString();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.UInt64Value.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:"0"};return n.value=null!==(t=e.value)&&void 0!==t?t:"0",n}},t.Int32Value={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),0!==e.value&&t.uint32(8).int32(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:0};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(8!==a)break;o.value=n.int32();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.Int32Value.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:0};return n.value=null!==(t=e.value)&&void 0!==t?t:0,n}},t.UInt32Value={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),0!==e.value&&t.uint32(8).uint32(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:0};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(8!==a)break;o.value=n.uint32();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.UInt32Value.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:0};return n.value=null!==(t=e.value)&&void 0!==t?t:0,n}},t.BoolValue={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),!1!==e.value&&t.uint32(8).bool(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:!1};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(8!==a)break;o.value=n.bool();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.BoolValue.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:!1};return n.value=null!==(t=e.value)&&void 0!==t&&t,n}},t.StringValue={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),""!==e.value&&t.uint32(10).string(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=void 0===t?n.len:n.pos+t,o={value:""};n.pos<i;){var a=n.uint32();switch(a>>>3){case 1:if(10!==a)break;o.value=n.string();continue}if(4==(7&a)||0===a)break;n.skip(7&a)}return o},create:function(e){return t.StringValue.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={value:""};return n.value=null!==(t=e.value)&&void 0!==t?t:"",n}},t.BytesValue={encode:function(e,t){return void 0===t&&(t=new r.BinaryWriter),0!==e.value.length&&t.uint32(10).bytes(e.value),t},decode:function(e,t){for(var n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),o=void 0===t?n.len:n.pos+t,a=i();n.pos<o;){var u=n.uint32();switch(u>>>3){case 1:if(10!==u)break;a.value=n.bytes();continue}if(4==(7&u)||0===u)break;n.skip(7&u)}return a},create:function(e){return t.BytesValue.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n=i();return n.value=null!==(t=e.value)&&void 0!==t?t:new Uint8Array(0),n}}},621:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMessage=function(e,t){return!(null===e||"object"!=typeof e||!("$typeName"in e)||"string"!=typeof e.$typeName)&&(void 0===t||t.typeName===e.$typeName)}},700:(e,t)=>{"use strict";function n(e){return 0===e.length?e:e[0].toLowerCase()+e.slice(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.fromGrpcWebServiceDefinition=function(e){const t={};for(const[r,i]of Object.entries(e)){if("serviceName"===r)continue;const o=i;t[n(r)]={path:`/${e.serviceName}/${r}`,requestStream:o.requestStream,responseStream:o.responseStream,requestDeserialize:o.requestType.deserializeBinary,requestSerialize:e=>e.serializeBinary(),responseDeserialize:o.responseType.deserializeBinary,responseSerialize:e=>e.serializeBinary(),options:{}}}return t},t.isGrpcWebServiceDefinition=function(e){return"prototype"in e}},893:(e,t,n)=>{"use strict";const r=n(8310),i=n(7328),o=n(3737),a=n(5256),{MT:u,NUMBYTES:s,SYMS:c}=n(9452),{Buffer:d}=n(8287);function f(e){return e>1?"s":""}class l extends r.Transform{constructor(e={}){const{depth:t=1,max_depth:n=10,no_summary:r=!1,tags:i={},preferWeb:u,encoding:s,...c}=e;super({...c,readableObjectMode:!1,writableObjectMode:!1}),this.depth=t,this.max_depth=n,this.all=new a,i[24]||(i[24]=this._tag_24.bind(this)),this.parser=new o({tags:i,max_depth:n,preferWeb:u,encoding:s}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),r||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(e){const t=new l({depth:this.depth+1,no_summary:!0});t.on("data",(e=>this.push(e))),t.on("error",(e=>this.emit("error",e))),t.end(e)}_transform(e,t,n){this.parser.write(e,t,n)}_flush(e){return this.parser._flush(e)}static comment(e,t={},n=null){if(null==e)throw new Error("input required");({options:t,cb:n}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"number":return{options:{max_depth:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,n));const r=new a,{encoding:o="hex",...u}=t,s=new l(u);let c=null;return"function"==typeof n?(s.on("end",(()=>{n(null,r.toString("utf8"))})),s.on("error",n)):c=new Promise(((e,t)=>{s.on("end",(()=>{e(r.toString("utf8"))})),s.on("error",t)})),s.pipe(r),i.guessEncoding(e,o).pipe(s),c}_on_error(e){this.push("ERROR: "),this.push(e.toString()),this.push("\n")}_on_read(e){this.all.write(e);const t=e.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(t);let n=2*(this.max_depth-this.depth)-t.length;n<1&&(n=1),this.push(new Array(n+1).join(" ")),this.push("-- ")}_on_more(e,t,n,r){let i="";switch(this.depth++,e){case u.POS_INT:i="Positive number,";break;case u.NEG_INT:i="Negative number,";break;case u.ARRAY:i="Array, length";break;case u.MAP:i="Map, count";break;case u.BYTE_STRING:i="Bytes, length";break;case u.UTF8_STRING:i="String, length";break;case u.SIMPLE_FLOAT:i=1===t?"Simple value,":"Float,"}this.push(`${i} next ${t} byte${f(t)}\n`)}_on_start_string(e,t,n,r){let i="";switch(this.depth++,e){case u.BYTE_STRING:i=`Bytes, length: ${t}`;break;case u.UTF8_STRING:i=`String, length: ${t.toString()}`}this.push(`${i}\n`)}_on_start(e,t,n,r){switch(this.depth++,n){case u.ARRAY:this.push(`[${r}], `);break;case u.MAP:r%2?this.push(`{Val:${Math.floor(r/2)}}, `):this.push(`{Key:${Math.floor(r/2)}}, `)}switch(e){case u.TAG:this.push(`Tag #${t}`),24===t&&this.push(" Encoded CBOR data item");break;case u.ARRAY:t===c.STREAM?this.push("Array (streaming)"):this.push(`Array, ${t} item${f(t)}`);break;case u.MAP:t===c.STREAM?this.push("Map (streaming)"):this.push(`Map, ${t} pair${f(t)}`);break;case u.BYTE_STRING:this.push("Bytes (streaming)");break;case u.UTF8_STRING:this.push("String (streaming)")}this.push("\n")}_on_stop(e){this.depth--}_on_value(e,t,n,r){if(e!==c.BREAK)switch(t){case u.ARRAY:this.push(`[${n}], `);break;case u.MAP:n%2?this.push(`{Val:${Math.floor(n/2)}}, `):this.push(`{Key:${Math.floor(n/2)}}, `)}const o=i.cborValueToString(e,-1/0);switch("string"==typeof e||d.isBuffer(e)?(e.length>0&&(this.push(o),this.push("\n")),this.depth--):(this.push(o),this.push("\n")),r){case s.ONE:case s.TWO:case s.FOUR:case s.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}e.exports=l},898:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configureTextEncoding=function(e){globalThis[n]=e},t.getTextEncoding=function(){if(null==globalThis[n]){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[n]={encodeUtf8:t=>e.encode(t),decodeUtf8:e=>t.decode(e),checkUtf8(e){try{return encodeURIComponent(e),!0}catch(e){return!1}}}}return globalThis[n]};const n=Symbol.for("@bufbuild/protobuf/text-encoding")},1475:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AbortError:()=>r,abortable:()=>c,all:()=>p,catchAbortError:()=>u,delay:()=>d,execute:()=>s,forever:()=>f,isAbortError:()=>i,proactiveRetry:()=>w,race:()=>h,rethrowAbortError:()=>a,retry:()=>y,run:()=>b,spawn:()=>m,throwIfAborted:()=>o,waitForEvent:()=>l});class r extends Error{constructor(){super("The operation has been aborted"),this.message="The operation has been aborted",this.name="AbortError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}function i(e){return"object"==typeof e&&null!==e&&"AbortError"===e.name}function o(e){if(e.aborted)throw new r}function a(e){if(i(e))throw e}function u(e){if(!i(e))throw e}function s(e,t){return new Promise(((n,i)=>{if(e.aborted)return void i(new r);let o,a=!1;function u(){a||(a=!0,null!=o&&o())}const s=t((e=>{n(e),u()}),(e=>{i(e),u()}));if(!a){const t=()=>{const e=s();null==e?i(new r):e.then((()=>{i(new r)}),(e=>{i(e)})),u()};e.addEventListener("abort",t),o=()=>{e.removeEventListener("abort",t)}}}))}function c(e,t){if(e.aborted){const e=()=>{};t.then(e,e)}return s(e,((e,n)=>(t.then(e,n),()=>{})))}function d(e,t){return s(e,(e=>{const n="number"==typeof t?t:t.getTime()-Date.now(),r=setTimeout(e,n);return()=>{clearTimeout(r)}}))}function f(e){return s(e,(()=>()=>{}))}function l(e,t,n,r){return s(e,(e=>{let i,o=!1;return i=function(e,t,n,r){if(v((i=e).addEventListener)&&v(i.removeEventListener))return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r);var i;if(function(e){return v(e.on)&&v(e.off)}(e))return e.on(t,n),()=>e.off(t,n);if(function(e){return v(e.addListener)&&v(e.removeListener)}(e))return e.addListener(t,n),()=>e.removeListener(t,n);throw new Error("Invalid event target")}(t,n,((...t)=>{e(t.length>1?t:t[0]),o=!0,null!=i&&i()}),r),o&&i(),()=>{o=!0,null!=i&&i()}}))}const v=e=>"function"==typeof e;function p(e,t){return new Promise(((n,o)=>{if(e.aborted)return void o(new r);const a=new AbortController,u=t(a.signal);if(0===u.length)return void n([]);const s=()=>{a.abort()};let c;e.addEventListener("abort",s);const d=new Array(u.length);let f=0;function l(){f+=1,f===u.length&&(e.removeEventListener("abort",s),null!=c?o(c.reason):n(d))}for(const[e,t]of u.entries())t.then((t=>{d[e]=t,l()}),(e=>{a.abort(),(null==c||!i(e)&&i(c.reason))&&(c={reason:e}),l()}))}))}function h(e,t){return new Promise(((n,o)=>{if(e.aborted)return void o(new r);const a=new AbortController,u=t(a.signal),s=()=>{a.abort()};e.addEventListener("abort",s);let c,d=0;function f(t){a.abort(),d+=1,d===u.length&&(e.removeEventListener("abort",s),"fulfilled"===t.status?n(t.value):o(t.reason))}for(const e of u)e.then((e=>{null==c&&(c={status:"fulfilled",value:e}),f(c)}),(e=>{null!=c&&(i(e)||"fulfilled"!==c.status&&!i(c.reason))||(c={status:"rejected",reason:e}),f(c)}))}))}async function y(e,t,n={}){const{baseMs:r=1e3,maxDelayMs:i=3e4,onError:o,maxAttempts:u=1/0}=n;let s=0;const c=()=>{s=-1};for(;;)try{return await t(e,s,c)}catch(t){if(a(t),s>=u)throw t;let n;if(-1===s)n=0;else{const e=Math.min(i,Math.pow(2,s)*r);n=Math.round(e*(1+Math.random())/2)}o&&o(t,s,n),0!==n&&await d(e,n),s+=1}}function m(e,t){if(e.aborted)return Promise.reject(new r);const n=[],o=new AbortController,a=o.signal,s=()=>{o.abort()};e.addEventListener("abort",s);const c=new Set,d=()=>{for(const e of c)e.abort()};a.addEventListener("abort",d);let f=new Promise(((e,s)=>{let d,f;function l(t){if(a.aborted)return{abort(){},async join(){throw new r}};const n=new AbortController,i=t(n.signal),l={abort(){n.abort()},join:()=>i};return c.add(l),i.catch(u).catch((e=>{f={error:e},o.abort()})).finally((()=>{c.delete(l),0===c.size&&(null!=f?s(f.error):e(d.value))})),l}l((e=>t(e,{defer(e){n.push(e)},fork:l}))).join().then((e=>{o.abort(),d={value:e}}),(e=>{o.abort(),i(e)&&null!=f||(f={error:e})}))}));return f=f.finally((()=>{e.removeEventListener("abort",s),a.removeEventListener("abort",d);let t=Promise.resolve();for(let e=n.length-1;e>=0;e--)t=t.finally(n[e]);return t})),f}function b(e){const t=new AbortController,n=e(t.signal).catch(u);return()=>(t.abort(),n)}function w(e,t,n={}){const{baseMs:r=1e3,onError:o,maxAttempts:a=1/0}=n;return s(e,((e,n)=>{const s=new AbortController;let c=!1;const f=new Map;function l(t){s.abort(),f.clear(),e(t)}function v(e,t){if(f.delete(t),c&&0===f.size)n(e);else if(!i(e)&&o)try{o(e,t)}catch(e){s.abort(),f.clear(),n(e)}}return async function(e){for(let n=0;;n++){const i=t(e,n);if(f.set(n,i),i.then(l,(e=>v(e,n))),n+1>=a)break;const o=Math.pow(2,n)*r,u=Math.round(o*(1+Math.random())/2);await d(e,u)}c=!0}(s.signal).catch(u),()=>{s.abort()}}))}},1510:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHttpTransport=function(){throw new Error("NodeHttpTransport is not supported in the browser")}},1546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClientStreamingMethod=function(e,t,n,a){const u={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(n,a){if(!(0,i.isAsyncIterable)(n))throw Error("A middleware passed invalid request to next(): expected a single message for client streaming method");const u=(0,o.makeCall)(e,t,n,a);let s;for await(const t of u){if(null!=s)throw new r.ClientError(e.path,r.Status.INTERNAL,"Received more than one message from server for client streaming method");s=t}if(null==s)throw new r.ClientError(e.path,r.Status.INTERNAL,"Server did not return a response");return s}const c=null==n?s:(e,t)=>n({method:u,requestStream:!0,request:e,responseStream:!1,next:s},t);return async(e,t)=>{const n=c(e,{...a,...t})[Symbol.asyncIterator]();let r=await n.next();for(;;)if(r.done){if(null!=r.value)return r.value;r=await n.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"))}else r=await n.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"))}};const r=n(91),i=n(7768),o=n(2810)},1583:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=l;const r=n(621),i=n(2885),o=n(2949),a=n(8792),u=n(7299),s=n(2992),c=999,d=998,f=2;function l(e,t){if((0,r.isMessage)(t,e))return t;const n=function(e){let t;if(function(e){switch(e.file.edition){case c:return!1;case d:return!0;default:return e.fields.some((e=>e.presence!=f&&"message"!=e.fieldKind&&!e.oneof))}}(e)){const n=k.get(e);let r,i;if(n)({prototype:r,members:i}=n);else{r={},i=new Set;for(const t of e.members)"oneof"!=t.kind&&("scalar"!=t.fieldKind&&"enum"!=t.fieldKind||t.presence!=f&&(i.add(t),r[t.localName]=g(t)));k.set(e,{prototype:r,members:i})}t=Object.create(r),t.$typeName=e.typeName;for(const n of e.members)if(!i.has(n)){if("field"==n.kind){if("message"==n.fieldKind)continue;if(("scalar"==n.fieldKind||"enum"==n.fieldKind)&&n.presence!=f)continue}t[n.localName]=g(n)}}else{t={$typeName:e.typeName};for(const n of e.members)"oneof"!=n.kind&&n.presence!=f||(t[n.localName]=g(n))}return t}(e);return void 0!==t&&function(e,t,n){for(const r of e.members){let e,i=n[r.localName];if(null!=i){if("oneof"==r.kind){const t=(0,u.unsafeOneofCase)(n,r);if(!t)continue;e=t,i=(0,u.unsafeGet)(n,t)}else e=r;switch(e.fieldKind){case"message":i=y(e,i);break;case"scalar":i=v(e,i);break;case"list":i=h(e,i);break;case"map":i=p(e,i)}(0,u.unsafeSet)(t,e,i)}}}(e,n,t),n}function v(e,t){return e.scalar==i.ScalarType.BYTES?m(t):t}function p(e,t){if((0,a.isObject)(t)){if(e.scalar==i.ScalarType.BYTES)return b(t,m);if("message"==e.mapKind)return b(t,(t=>y(e,t)))}return t}function h(e,t){if(Array.isArray(t)){if(e.scalar==i.ScalarType.BYTES)return t.map(m);if("message"==e.listKind)return t.map((t=>y(e,t)))}return t}function y(e,t){if("message"==e.fieldKind&&!e.oneof&&(0,s.isWrapperDesc)(e.message))return v(e.message.fields[0],t);if((0,a.isObject)(t)){if("google.protobuf.Struct"==e.message.typeName&&"google.protobuf.Value"!==e.parent.typeName)return t;if(!(0,r.isMessage)(t,e.message))return l(e.message,t)}return t}function m(e){return Array.isArray(e)?new Uint8Array(e):e}function b(e,t){const n={};for(const r of Object.entries(e))n[r[0]]=t(r[1]);return n}const w=Symbol(),k=new WeakMap;function g(e){if("oneof"==e.kind)return{case:void 0};if("list"==e.fieldKind)return[];if("map"==e.fieldKind)return{};if("message"==e.fieldKind)return w;const t=e.getDefaultValue();return void 0!==t?"scalar"==e.fieldKind&&e.longAsString?t.toString():t:"scalar"==e.fieldKind?(0,o.scalarZeroValue)(e.scalar,e.longAsString):e.enum.values[0].number}},1841:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkField=function(e,t){const n="list"==e.fieldKind?(0,a.isReflectList)(t,e):"map"==e.fieldKind?(0,a.isReflectMap)(t,e):d(e,t);if(!0===n)return;let r;switch(e.fieldKind){case"list":r=`expected ${h(e)}, got ${v(t)}`;break;case"map":r=`expected ${y(e)}, got ${v(t)}`;break;default:r=l(e,t,n)}return new o.FieldError(e,r)},t.checkListItem=function(e,t,n){const r=d(e,n);if(!0!==r)return new o.FieldError(e,`list item #${t+1}: ${l(e,n,r)}`)},t.checkMapEntry=function(e,t,n){const r=f(t,e.mapKey);if(!0!==r)return new o.FieldError(e,`invalid map key: ${l({scalar:e.mapKey},t,r)}`);const i=d(e,n);return!0!==i?new o.FieldError(e,`map entry ${v(t)}: ${l(e,n,i)}`):void 0},t.formatVal=v;const r=n(2885),i=n(621),o=n(5067),a=n(8792),u=n(3056),s=n(898),c=n(4011);function d(e,t){return void 0!==e.scalar?f(t,e.scalar):void 0!==e.enum?e.enum.open?Number.isInteger(t):e.enum.values.some((e=>e.number===t)):(0,a.isReflectMessage)(t,e.message)}function f(e,t){switch(t){case r.ScalarType.DOUBLE:return"number"==typeof e;case r.ScalarType.FLOAT:return"number"==typeof e&&(!(!Number.isNaN(e)&&Number.isFinite(e))||!(e>u.FLOAT32_MAX||e<u.FLOAT32_MIN)||`${e.toFixed()} out of range`);case r.ScalarType.INT32:case r.ScalarType.SFIXED32:case r.ScalarType.SINT32:return!("number"!=typeof e||!Number.isInteger(e))&&(!(e>u.INT32_MAX||e<u.INT32_MIN)||`${e.toFixed()} out of range`);case r.ScalarType.FIXED32:case r.ScalarType.UINT32:return!("number"!=typeof e||!Number.isInteger(e))&&(!(e>u.UINT32_MAX||e<0)||`${e.toFixed()} out of range`);case r.ScalarType.BOOL:return"boolean"==typeof e;case r.ScalarType.STRING:return"string"==typeof e&&((0,s.getTextEncoding)().checkUtf8(e)||"invalid UTF8");case r.ScalarType.BYTES:return e instanceof Uint8Array;case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:if("string"!=typeof e&&"bigint"!=typeof e&&"number"!=typeof e)return!1;try{c.protoInt64.parse(e)}catch(t){return`${e} out of range`}return!0;case r.ScalarType.FIXED64:case r.ScalarType.UINT64:if("string"!=typeof e&&"bigint"!=typeof e&&"number"!=typeof e)return!1;try{c.protoInt64.uParse(e)}catch(t){return`${e} out of range`}return!0}}function l(e,t,n){return n="string"==typeof n?`: ${n}`:`, got ${v(t)}`,void 0!==e.scalar?`expected ${function(e){switch(e){case r.ScalarType.STRING:return"string";case r.ScalarType.BOOL:return"boolean";case r.ScalarType.INT64:case r.ScalarType.SINT64:case r.ScalarType.SFIXED64:return"bigint (int64)";case r.ScalarType.UINT64:case r.ScalarType.FIXED64:return"bigint (uint64)";case r.ScalarType.BYTES:return"Uint8Array";case r.ScalarType.DOUBLE:return"number (float64)";case r.ScalarType.FLOAT:return"number (float32)";case r.ScalarType.FIXED32:case r.ScalarType.UINT32:return"number (uint32)";case r.ScalarType.INT32:case r.ScalarType.SFIXED32:case r.ScalarType.SINT32:return"number (int32)"}}(e.scalar)}`+n:void 0!==e.enum?`expected ${e.enum.toString()}`+n:`expected ${p(e.message)}`+n}function v(e){switch(typeof e){case"object":return null===e?"null":e instanceof Uint8Array?`Uint8Array(${e.length})`:Array.isArray(e)?`Array(${e.length})`:(0,a.isReflectList)(e)?h(e.field()):(0,a.isReflectMap)(e)?y(e.field()):(0,a.isReflectMessage)(e)?p(e.desc):(0,i.isMessage)(e)?`message ${e.$typeName}`:"object";case"string":return e.length>30?"string":`"${e.split('"').join('\\"')}"`;case"boolean":case"number":return String(e);case"bigint":return String(e)+"n";default:return typeof e}}function p(e){return`ReflectMessage (${e.typeName})`}function h(e){switch(e.listKind){case"message":return`ReflectList (${e.message.toString()})`;case"enum":return`ReflectList (${e.enum.toString()})`;case"scalar":return`ReflectList (${r.ScalarType[e.scalar]})`}}function y(e){switch(e.mapKind){case"message":return`ReflectMap (${r.ScalarType[e.mapKey]}, ${e.message.toString()})`;case"enum":return`ReflectMap (${r.ScalarType[e.mapKey]}, ${e.enum.toString()})`;case"scalar":return`ReflectMap (${r.ScalarType[e.mapKey]}, ${r.ScalarType[e.scalar]})`}}},1891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeMetadata=function(e){const t=(0,r.Metadata)(),n=(new TextDecoder).decode(e);for(const e of n.split("\r\n")){if(!e)continue;const n=e.indexOf(":");if(-1===n)throw new Error(`Invalid metadata line: ${e}`);const r=e.slice(0,n).trim().toLowerCase(),o=e.slice(n+1).trim();if(r.endsWith("-bin"))for(const e of o.split(/,\s?/))t.append(r,i.Base64.toUint8Array(e));else t.append(r,o)}return t};const r=n(91),i=n(8127)},1953:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBidiStreamingMethod=function(e,t,n,o){const a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*u(n,o){if(!(0,r.isAsyncIterable)(n))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");const a=(0,i.makeCall)(e,t,n,o);yield*a}const s=null==n?u:(e,t)=>n({method:a,requestStream:!0,request:e,responseStream:!0,next:u},t);return(e,t)=>{const n=s(e,{...o,...t})[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({async next(){const e=await n.next();return e.done&&null!=e.value?await n.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method")):e},return:()=>n.return(),throw:e=>n.throw(e)})}}};const r=n(7768),i=n(2810)},1999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2018:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketTransport=function(){return async function*({url:e,body:t,metadata:n,signal:r}){if(r.aborted)throw new i.AbortError;const s=new u.AsyncSink;r.addEventListener("abort",(()=>{s.error(new i.AbortError)}));const c=new URL(e);c.protocol=c.protocol.replace("http","ws");const d=new o.default(c,["grpc-websockets"]);d.binaryType="arraybuffer",d.addEventListener("message",(e=>{e.data instanceof ArrayBuffer?s.write({type:"data",data:new Uint8Array(e.data)}):s.error(new Error("Unexpected message type: "+typeof e.data))})),d.addEventListener("close",(e=>{e.wasClean?s.end():s.error(new Error(`WebSocket closed with code ${e.code}`+(e.reason&&`: ${e.reason}`)))}));const f=new AbortController;(async function(e,t,n,r){r.readyState==o.default.CONNECTING&&await(0,i.waitForEvent)(e,r,"open"),r.send(function(e){let t="";for(const[r,i]of e)for(const e of i){const i=`${r}: ${"string"==typeof e?e:a.Base64.fromUint8Array(e)}\r\n`;for(let e=0;e<i.length;e++)if(!(9===(n=i.charCodeAt(e))||10===n||13===n||n>=32&&n<=126))throw new Error(`Metadata contains invalid characters: '${i}'`);t+=i}var n;return(new TextEncoder).encode(t)}(t));for await(const t of n){(0,i.throwIfAborted)(e);const n=new Uint8Array(t.length+1);n.set([0],0),n.set(t,1),r.send(n)}r.send(new Uint8Array([1]))})(f.signal,n,t,d).catch((e=>{(0,i.isAbortError)(e)||s.error(e)}));try{return yield*s}finally{f.abort(),d.close()}}};const i=n(1475),o=r(n(169)),a=n(8127),u=n(2505)},2260:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(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){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHttpTransport=t.WebsocketTransport=t.FetchTransport=t.Status=t.Metadata=t.composeClientMiddleware=t.ClientError=void 0;var o=n(91);Object.defineProperty(t,"ClientError",{enumerable:!0,get:function(){return o.ClientError}}),Object.defineProperty(t,"composeClientMiddleware",{enumerable:!0,get:function(){return o.composeClientMiddleware}}),Object.defineProperty(t,"Metadata",{enumerable:!0,get:function(){return o.Metadata}}),Object.defineProperty(t,"Status",{enumerable:!0,get:function(){return o.Status}}),i(n(7671),t),i(n(3297),t),i(n(2969),t),i(n(1999),t);var a=n(7005);Object.defineProperty(t,"FetchTransport",{enumerable:!0,get:function(){return a.FetchTransport}});var u=n(2018);Object.defineProperty(t,"WebsocketTransport",{enumerable:!0,get:function(){return u.WebsocketTransport}});var s=n(1510);Object.defineProperty(t,"NodeHttpTransport",{enumerable:!0,get:function(){return s.NodeHttpTransport}})},2421:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Status=void 0,(n=t.Status||(t.Status={}))[n.OK=0]="OK",n[n.CANCELLED=1]="CANCELLED",n[n.UNKNOWN=2]="UNKNOWN",n[n.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",n[n.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",n[n.NOT_FOUND=5]="NOT_FOUND",n[n.ALREADY_EXISTS=6]="ALREADY_EXISTS",n[n.PERMISSION_DENIED=7]="PERMISSION_DENIED",n[n.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",n[n.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",n[n.ABORTED=10]="ABORTED",n[n.OUT_OF_RANGE=11]="OUT_OF_RANGE",n[n.UNIMPLEMENTED=12]="UNIMPLEMENTED",n[n.INTERNAL=13]="INTERNAL",n[n.UNAVAILABLE=14]="UNAVAILABLE",n[n.DATA_LOSS=15]="DATA_LOSS",n[n.UNAUTHENTICATED=16]="UNAUTHENTICATED"},2505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSink=void 0;const n="error";class r{constructor(){this._ended=!1,this._values=[],this._resolvers=[]}[Symbol.asyncIterator](){return this}write(e){this._push({type:"value",value:e})}error(e){this._push({type:n,error:e})}_push(e){if(!this._ended)if(this._resolvers.length>0){const{resolve:t,reject:r}=this._resolvers.shift();e.type===n?r(e.error):t({done:!1,value:e.value})}else this._values.push(e)}next(){if(this._values.length>0){const{type:e,value:t,error:r}=this._values.shift();return e===n?Promise.reject(r):Promise.resolve({done:!1,value:t})}return this._ended?Promise.resolve({done:!0}):new Promise(((e,t)=>{this._resolvers.push({resolve:e,reject:t})}))}end(){for(;this._resolvers.length>0;)this._resolvers.shift().resolve({done:!0});this._ended=!0}}t.AsyncSink=r},2721:(e,t,n)=>{"use strict";t.__esModule=void 0,t.__esModule=!0;var r=n(7522),i=r.setPrototypeOf,o=r.getPrototypeOf,a=r.defineProperty,u=r.objectCreate,s="[object Error]"===(new Error).toString(),c="";function d(e){var t,n=this.constructor,r=n.name||(null===(t=n.toString().match(/^function\s*([^\s(]+)/))?c||"Error":t[1]),u="Error"===r,f=u?c:r,l=Error.apply(this,arguments);if(i(l,o(this)),l instanceof n&&l instanceof d||(l=this,Error.apply(this,arguments),a(l,"message",{configurable:!0,enumerable:!1,value:e,writable:!0})),a(l,"name",{configurable:!0,enumerable:!1,value:f,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(l,u?d:n),void 0===l.stack){var v=new Error(e);v.name=l.name,l.stack=v.stack}return s&&a(l,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(void 0===this.message?"":": "+this.message)},writable:!0}),l}c=d.name||"ExtendableError",d.prototype=u(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),t.ExtendableError=d,t.default=t.ExtendableError},2726:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var s=n(8287).Buffer,c=n(5340).inspect,d=c&&c.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,n,r,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=i,r=a,s.prototype.copy.call(t,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:d,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},2774:(e,t)=>{"use strict";function n(e){return e.toLowerCase()}function r(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("string"!=typeof t)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`)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0,t.Metadata=function(e){const t=new Map,i={set(e,o){if(e=n(e),Array.isArray(o))if(0===o.length)t.delete(e);else{for(const t of o)r(e,t);t.set(e,e.endsWith("-bin")?o:[o.join(", ")])}else r(e,o),t.set(e,[o]);return i},append(e,o){r(e=n(e),o);let a=t.get(e);return null==a&&(a=[],t.set(e,a)),a.push(o),e.endsWith("-bin")||t.set(e,[a.join(", ")]),i},delete(e){e=n(e),t.delete(e)},get(e){var r;return e=n(e),null===(r=t.get(e))||void 0===r?void 0:r[0]},getAll(e){var r;return e=n(e),null!==(r=t.get(e))&&void 0!==r?r:[]},has:e=>(e=n(e),t.has(e)),[Symbol.iterator]:()=>t[Symbol.iterator]()};if(null!=e){const t=(o=e,Symbol.iterator in o?e:Object.entries(e));for(const[e,n]of t)i.set(e,n)}var o;return i}},2810:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCall=async function*(e,t,n,c){const{metadata:d,signal:f=(new AbortController).signal,onHeader:l,onTrailer:v}=c;let p,h,y=!1;function m(t){if(y){if(new Map(t).size>0)throw new i.ClientError(e.path,i.Status.INTERNAL,"Received non-empty trailer after trailers-only response");return}const n=(0,s.parseTrailer)(t);({status:p,message:h}=n),null==v||v(n.trailer)}const b=(0,i.Metadata)(d);b.set("content-type","application/grpc-web+proto"),b.set("x-grpc-web","1");const w=new AbortController,k=()=>{w.abort()};f.addEventListener("abort",k);let g,B=!1;async function*I(){try{for await(const e of n){if(B)throw new Error("Request finished");yield e}}catch(e){throw g={err:e},w.abort(),e}}const P=(0,o.decodeResponse)({response:async function*(){try{return yield*t.transport({url:t.address+e.path,metadata:b,body:(0,a.encodeRequest)({request:I(),encode:e.requestSerialize}),signal:w.signal,method:e})}catch(t){throw(0,r.rethrowAbortError)(t),new i.ClientError(e.path,i.Status.UNKNOWN,`Transport error: ${(0,u.makeInternalErrorMessage)(t)}`)}}(),decode:e.responseDeserialize,onHeader(e){e.has("grpc-status")?(m(e),y=!0):null==l||l(e)},onTrailer(e){m(e)}});try{yield*P}catch(t){throw void 0!==g?g.err:t instanceof i.ClientError||(0,r.isAbortError)(t)?t:new i.ClientError(e.path,i.Status.INTERNAL,(0,u.makeInternalErrorMessage)(t))}finally{if(B=!0,f.removeEventListener("abort",k),null!=p&&p!==i.Status.OK)throw new i.ClientError(e.path,p,null!=h?h:"")}if(null==p)throw new i.ClientError(e.path,i.Status.UNKNOWN,'Response stream closed without gRPC status. This may indicate a misconfigured CORS policy on the server: Access-Control-Expose-Headers must include "grpc-status" and "grpc-message".')};const r=n(1475),i=n(91),o=n(2941),a=n(7621),u=n(8198),s=n(4762)},2861:(e,t,n)=>{var r=n(8287),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},2885:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ScalarType=void 0,function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"}(n||(t.ScalarType=n={}))},2893:(e,t,n)=>{"use strict";const r=n(8310),i=n(5256),o=n(7328),a=n(9452),{MT:u,NUMBYTES:s,SHIFT32:c,SIMPLE:d,SYMS:f,TAG:l,BI:v}=a,{Buffer:p}=n(8287),h=u.SIMPLE_FLOAT<<5|s.TWO,y=u.SIMPLE_FLOAT<<5|s.FOUR,m=u.SIMPLE_FLOAT<<5|s.EIGHT,b=u.SIMPLE_FLOAT<<5|d.TRUE,w=u.SIMPLE_FLOAT<<5|d.FALSE,k=u.SIMPLE_FLOAT<<5|d.UNDEFINED,g=u.SIMPLE_FLOAT<<5|d.NULL,B=p.from([255]),I=p.from("f97e00","hex"),P=p.from("f9fc00","hex"),R=p.from("f97c00","hex"),T=p.from("f98000","hex"),S={};let E={};class A extends r.Transform{constructor(e={}){const{canonical:t=!1,encodeUndefined:n,disallowUndefinedKeys:r=!1,dateType:i="number",collapseBigIntegers:o=!1,detectLoops:a=!1,omitUndefinedProperties:u=!1,genTypes:s=[],...c}=e;if(super({...c,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=t,this.encodeUndefined=n,this.disallowUndefinedKeys=r,this.dateType=function(e){if(!e)return"number";switch(e.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${e}"`)}(i),this.collapseBigIntegers=!!this.canonical||o,this.detectLoops=void 0,"boolean"==typeof a)a&&(this.detectLoops=new WeakSet);else{if(!(a instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=a}if(this.omitUndefinedProperties=u,this.semanticTypes={...A.SEMANTIC_TYPES},Array.isArray(s))for(let e=0,t=s.length;e<t;e+=2)this.addSemanticType(s[e],s[e+1]);else for(const[e,t]of Object.entries(s))this.addSemanticType(e,t)}_transform(e,t,n){n(!1===this.pushAny(e)?new Error("Push Error"):void 0)}_flush(e){e()}_pushUInt8(e){const t=p.allocUnsafe(1);return t.writeUInt8(e,0),this.push(t)}_pushUInt16BE(e){const t=p.allocUnsafe(2);return t.writeUInt16BE(e,0),this.push(t)}_pushUInt32BE(e){const t=p.allocUnsafe(4);return t.writeUInt32BE(e,0),this.push(t)}_pushFloatBE(e){const t=p.allocUnsafe(4);return t.writeFloatBE(e,0),this.push(t)}_pushDoubleBE(e){const t=p.allocUnsafe(8);return t.writeDoubleBE(e,0),this.push(t)}_pushNaN(){return this.push(I)}_pushInfinity(e){const t=e<0?P:R;return this.push(t)}_pushFloat(e){if(this.canonical){const t=p.allocUnsafe(2);if(o.writeHalf(t,e))return this._pushUInt8(h)&&this.push(t)}return Math.fround(e)===e?this._pushUInt8(y)&&this._pushFloatBE(e):this._pushUInt8(m)&&this._pushDoubleBE(e)}_pushInt(e,t,n){const r=t<<5;if(e<24)return this._pushUInt8(r|e);if(e<=255)return this._pushUInt8(r|s.ONE)&&this._pushUInt8(e);if(e<=65535)return this._pushUInt8(r|s.TWO)&&this._pushUInt16BE(e);if(e<=4294967295)return this._pushUInt8(r|s.FOUR)&&this._pushUInt32BE(e);let i=Number.MAX_SAFE_INTEGER;return t===u.NEG_INT&&i--,e<=i?this._pushUInt8(r|s.EIGHT)&&this._pushUInt32BE(Math.floor(e/c))&&this._pushUInt32BE(e%c):t===u.NEG_INT?this._pushFloat(n):this._pushFloat(e)}_pushIntNum(e){return Object.is(e,-0)?this.push(T):e<0?this._pushInt(-e-1,u.NEG_INT,e):this._pushInt(e,u.POS_INT)}_pushNumber(e){return isNaN(e)?this._pushNaN():isFinite(e)?Math.round(e)===e?this._pushIntNum(e):this._pushFloat(e):this._pushInfinity(e)}_pushString(e){const t=p.byteLength(e,"utf8");return this._pushInt(t,u.UTF8_STRING)&&this.push(e,"utf8")}_pushBoolean(e){return this._pushUInt8(e?b:w)}_pushUndefined(e){switch(typeof this.encodeUndefined){case"undefined":return this._pushUInt8(k);case"function":return this.pushAny(this.encodeUndefined(e));case"object":{const e=o.bufferishToBuffer(this.encodeUndefined);if(e)return this.push(e)}}return this.pushAny(this.encodeUndefined)}_pushNull(e){return this._pushUInt8(g)}_pushTag(e){return this._pushInt(e,u.TAG)}_pushJSBigint(e){let t=u.POS_INT,n=l.POS_BIGINT;if(e<0&&(e=-e+v.MINUS_ONE,t=u.NEG_INT,n=l.NEG_BIGINT),this.collapseBigIntegers&&e<=v.MAXINT64)return e<=4294967295?this._pushInt(Number(e),t):this._pushUInt8(t<<5|s.EIGHT)&&this._pushUInt32BE(Number(e/v.SHIFT32))&&this._pushUInt32BE(Number(e%v.SHIFT32));let r=e.toString(16);r.length%2&&(r=`0${r}`);const i=p.from(r,"hex");return this._pushTag(n)&&A._pushBuffer(this,i)}_pushObject(e,t){if(!e)return this._pushNull(e);if(!(t={indefinite:!1,skipTypes:!1,...t}).indefinite&&this.detectLoops){if(this.detectLoops.has(e))throw new Error("Loop detected while CBOR encoding.\nCall removeLoopDetectors before resuming.");this.detectLoops.add(e)}if(!t.skipTypes){const t=e.encodeCBOR;if("function"==typeof t)return t.call(e,this);const n=this.semanticTypes[e.constructor.name];if(n)return n.call(e,this,e)}const n=Object.keys(e).filter((t=>{const n=typeof e[t];return"function"!==n&&(!this.omitUndefinedProperties||"undefined"!==n)})),r={};if(this.canonical&&n.sort(((e,t)=>{const n=r[e]||(r[e]=A.encode(e)),i=r[t]||(r[t]=A.encode(t));return n.compare(i)})),t.indefinite){if(!this._pushUInt8(u.MAP<<5|s.INDEFINITE))return!1}else if(!this._pushInt(n.length,u.MAP))return!1;let i=null;for(let t=0,o=n.length;t<o;t++){const o=n[t];if(this.canonical&&(i=r[o])){if(!this.push(i))return!1}else if(!this._pushString(o))return!1;if(!this.pushAny(e[o]))return!1}if(t.indefinite){if(!this.push(B))return!1}else this.detectLoops&&this.detectLoops.delete(e);return!0}_encodeAll(e){const t=new i({highWaterMark:this.readableHighWaterMark});this.pipe(t);for(const t of e)this.pushAny(t);return this.end(),t.read()}addSemanticType(e,t){const n="string"==typeof e?e:e.name,r=this.semanticTypes[n];if(t){if("function"!=typeof t)throw new TypeError("fun must be of type function");this.semanticTypes[n]=t}else r&&delete this.semanticTypes[n];return r}pushAny(e){switch(typeof e){case"number":return this._pushNumber(e);case"bigint":return this._pushJSBigint(e);case"string":return this._pushString(e);case"boolean":return this._pushBoolean(e);case"undefined":return this._pushUndefined(e);case"object":return this._pushObject(e);case"symbol":switch(e){case f.NULL:return this._pushNull(null);case f.UNDEFINED:return this._pushUndefined(void 0);default:throw new TypeError(`Unknown symbol: ${e.toString()}`)}default:throw new TypeError(`Unknown type: ${typeof e}, ${"function"==typeof e.toString?e.toString():""}`)}}static pushArray(e,t,n){n={indefinite:!1,...n};const r=t.length;if(n.indefinite){if(!e._pushUInt8(u.ARRAY<<5|s.INDEFINITE))return!1}else if(!e._pushInt(r,u.ARRAY))return!1;for(let n=0;n<r;n++)if(!e.pushAny(t[n]))return!1;return!(n.indefinite&&!e.push(B))}removeLoopDetectors(){return!!this.detectLoops&&(this.detectLoops=new WeakSet,!0)}static _pushDate(e,t){switch(e.dateType){case"string":return e._pushTag(l.DATE_STRING)&&e._pushString(t.toISOString());case"int":return e._pushTag(l.DATE_EPOCH)&&e._pushIntNum(Math.round(t.getTime()/1e3));case"float":return e._pushTag(l.DATE_EPOCH)&&e._pushFloat(t.getTime()/1e3);default:return e._pushTag(l.DATE_EPOCH)&&e.pushAny(t.getTime()/1e3)}}static _pushBuffer(e,t){return e._pushInt(t.length,u.BYTE_STRING)&&e.push(t)}static _pushNoFilter(e,t){return A._pushBuffer(e,t.slice())}static _pushRegexp(e,t){return e._pushTag(l.REGEXP)&&e.pushAny(t.source)}static _pushSet(e,t){if(!e._pushTag(l.SET))return!1;if(!e._pushInt(t.size,u.ARRAY))return!1;for(const n of t)if(!e.pushAny(n))return!1;return!0}static _pushURL(e,t){return e._pushTag(l.URI)&&e.pushAny(t.toString())}static _pushBoxed(e,t){return e.pushAny(t.valueOf())}static _pushMap(e,t,n){n={indefinite:!1,...n};let r=[...t.entries()];if(e.omitUndefinedProperties&&(r=r.filter((([e,t])=>void 0!==t))),n.indefinite){if(!e._pushUInt8(u.MAP<<5|s.INDEFINITE))return!1}else if(!e._pushInt(r.length,u.MAP))return!1;if(e.canonical){const t=new A({genTypes:e.semanticTypes,canonical:e.canonical,detectLoops:Boolean(e.detectLoops),dateType:e.dateType,disallowUndefinedKeys:e.disallowUndefinedKeys,collapseBigIntegers:e.collapseBigIntegers}),n=new i({highWaterMark:e.readableHighWaterMark});t.pipe(n),r.sort((([e],[r])=>{t.pushAny(e);const i=n.read();t.pushAny(r);const o=n.read();return i.compare(o)}));for(const[t,n]of r){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(n))return!1}}else for(const[t,n]of r){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(n))return!1}return!(n.indefinite&&!e.push(B))}static _pushTypedArray(e,t){let n=64,r=t.BYTES_PER_ELEMENT;const{name:i}=t.constructor;return i.startsWith("Float")?(n|=16,r/=2):i.includes("U")||(n|=8),(i.includes("Clamped")||1!==r&&!o.isBigEndian())&&(n|=4),n|={1:0,2:1,4:2,8:3}[r],!!e._pushTag(n)&&A._pushBuffer(e,p.from(t.buffer,t.byteOffset,t.byteLength))}static _pushArrayBuffer(e,t){return A._pushBuffer(e,p.from(t))}static encodeIndefinite(e,t,n={}){if(null==t){if(null==this)throw new Error("No object to encode");t=this}const{chunkSize:r=4096}=n;let i=!0;const a=typeof t;let c=null;if("string"===a){i=i&&e._pushUInt8(u.UTF8_STRING<<5|s.INDEFINITE);let n=0;for(;n<t.length;){const o=n+r;i=i&&e._pushString(t.slice(n,o)),n=o}i=i&&e.push(B)}else if(c=o.bufferishToBuffer(t)){i=i&&e._pushUInt8(u.BYTE_STRING<<5|s.INDEFINITE);let t=0;for(;t<c.length;){const n=t+r;i=i&&A._pushBuffer(e,c.slice(t,n)),t=n}i=i&&e.push(B)}else if(Array.isArray(t))i=i&&A.pushArray(e,t,{indefinite:!0});else if(t instanceof Map)i=i&&A._pushMap(e,t,{indefinite:!0});else{if("object"!==a)throw new Error("Invalid indefinite encoding");i=i&&e._pushObject(t,{indefinite:!0,skipTypes:!0})}return i}static encode(...e){return(new A)._encodeAll(e)}static encodeCanonical(...e){return new A({canonical:!0})._encodeAll(e)}static encodeOne(e,t){return new A(t)._encodeAll([e])}static encodeAsync(e,t){return new Promise(((n,r)=>{const i=[],o=new A(t);o.on("data",(e=>i.push(e))),o.on("error",r),o.on("finish",(()=>n(p.concat(i)))),o.pushAny(e),o.end()}))}static get SEMANTIC_TYPES(){return E}static set SEMANTIC_TYPES(e){E=e}static reset(){A.SEMANTIC_TYPES={...S}}}Object.assign(S,{Array:A.pushArray,Date:A._pushDate,Buffer:A._pushBuffer,[p.name]:A._pushBuffer,Map:A._pushMap,NoFilter:A._pushNoFilter,[i.name]:A._pushNoFilter,RegExp:A._pushRegexp,Set:A._pushSet,ArrayBuffer:A._pushArrayBuffer,Uint8ClampedArray:A._pushTypedArray,Uint8Array:A._pushTypedArray,Uint16Array:A._pushTypedArray,Uint32Array:A._pushTypedArray,Int8Array:A._pushTypedArray,Int16Array:A._pushTypedArray,Int32Array:A._pushTypedArray,Float32Array:A._pushTypedArray,Float64Array:A._pushTypedArray,URL:A._pushURL,Boolean:A._pushBoxed,Number:A._pushBoxed,String:A._pushBoxed}),"undefined"!=typeof BigUint64Array&&(S[BigUint64Array.name]=A._pushTypedArray),"undefined"!=typeof BigInt64Array&&(S[BigInt64Array.name]=A._pushTypedArray),A.reset(),e.exports=A},2903:(e,t,n)=>{"use strict";const{Buffer:r}=n(8287),i=n(2893),o=n(3737),{MT:a}=n(9452);class u extends Map{constructor(e){super(e)}static _encode(e){return i.encodeCanonical(e).toString("base64")}static _decode(e){return o.decodeFirstSync(e,"base64")}get(e){return super.get(u._encode(e))}set(e,t){return super.set(u._encode(e),t)}delete(e){return super.delete(u._encode(e))}has(e){return super.has(u._encode(e))}*keys(){for(const e of super.keys())yield u._decode(e)}*entries(){for(const e of super.entries())yield[u._decode(e[0]),e[1]]}[Symbol.iterator](){return this.entries()}forEach(e,t=this){if("function"!=typeof e)throw new TypeError("Must be function");for(const n of super.entries())e.call(t,n[1],u._decode(n[0]),this)}encodeCBOR(e){if(!e._pushInt(this.size,a.MAP))return!1;if(e.canonical){const t=Array.from(super.entries()).map((e=>[r.from(e[0],"base64"),e[1]]));t.sort(((e,t)=>e[0].compare(t[0])));for(const n of t)if(!e.push(n[0])||!e.pushAny(n[1]))return!1}else for(const t of super.entries())if(!e.push(r.from(t[0],"base64"))||!e.pushAny(t[1]))return!1;return!0}}e.exports=u},2941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeResponse=async function*({response:e,decode:t,onHeader:n,onTrailer:a}){let u,s=!1,c=!1,d=!1,f=p(o.LPM_HEADER_LENGTH);for await(const n of e)if("header"===n.type)l(n.header);else if("trailer"===n.type)v(n.trailer);else if("data"===n.type){if(c)throw new Error("Received data after trailer");let{data:e}=n;for(;e.length>0||0===(null==u?void 0:u.length);){const n=Math.min(e.length,f.targetLength-f.totalLength),a=e.subarray(0,n);if(e=e.subarray(n),f.chunks.push(a),f.totalLength+=a.length,f.totalLength===f.targetLength){const e=(0,r.concatBuffers)(f.chunks,f.totalLength);if(null==u)u=(0,o.parseLpmHeader)(e),f=p(u.length);else{if(u.compressed)throw new Error("Compressed messages not supported");if(u.isMetadata)s?v((0,i.decodeMetadata)(e)):l((0,i.decodeMetadata)(e));else{if(!s)throw new Error("Received data before header");yield t(e),d=!0}u=void 0,f=p(o.LPM_HEADER_LENGTH)}}}}function l(e){if(s)throw new Error("Received multiple headers");if(d)throw new Error("Received header after data");if(c)throw new Error("Received header after trailer");s=!0,n(e)}function v(e){if(c)throw new Error("Received multiple trailers");c=!0,a(e)}function p(e){return{chunks:[],totalLength:0,targetLength:e}}};const r=n(4101),i=n(1891),o=n(3564)},2949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scalarEquals=function(e,t,n){if(t===n)return!0;if(e==i.ScalarType.BYTES){if(!(t instanceof Uint8Array&&n instanceof Uint8Array))return!1;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case i.ScalarType.UINT64:case i.ScalarType.FIXED64:case i.ScalarType.INT64:case i.ScalarType.SFIXED64:case i.ScalarType.SINT64:return t==n}return!1},t.scalarZeroValue=function(e,t){switch(e){case i.ScalarType.STRING:return"";case i.ScalarType.BOOL:return!1;default:case i.ScalarType.DOUBLE:case i.ScalarType.FLOAT:return 0;case i.ScalarType.INT64:case i.ScalarType.UINT64:case i.ScalarType.SFIXED64:case i.ScalarType.FIXED64:case i.ScalarType.SINT64:return t?"0":r.protoInt64.zero;case i.ScalarType.BYTES:return new Uint8Array(0)}},t.isScalarZeroValue=function(e,t){switch(e){case i.ScalarType.BOOL:return!1===t;case i.ScalarType.STRING:return""===t;case i.ScalarType.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}};const r=n(4011),i=n(2885)},2955:(e,t,n)=>{"use strict";var r;function i(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(6238),a=Symbol("lastResolve"),u=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),l=Symbol("stream");function v(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var n=e[l].read();null!==n&&(e[d]=null,e[a]=null,e[u]=null,t(v(n,!1)))}}function h(e){process.nextTick(p,e)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(r={get stream(){return this[l]},next:function(){var e=this,t=this[s];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(v(void 0,!0));if(this[l].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[s]?n(e[s]):t(v(void 0,!0))}))}));var n,r=this[d];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(v(void 0,!0)):t[f](n,r)}),r)}}(r,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(v(i,!1));n=new Promise(this[f])}return this[d]=n,n}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[l].destroy(null,(function(e){e?n(e):t(v(void 0,!0))}))}))})),r),y);e.exports=function(e){var t,n=Object.create(m,(i(t={},l,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var r=n[l].read();r?(n[d]=null,n[a]=null,n[u]=null,e(v(r,!1))):(n[a]=e,n[u]=t)},writable:!0}),t));return n[d]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[u];return null!==t&&(n[d]=null,n[a]=null,n[u]=null,t(e)),void(n[s]=e)}var r=n[a];null!==r&&(n[d]=null,n[a]=null,n[u]=null,r(v(void 0,!0))),n[c]=!0})),e.on("readable",h.bind(null,n)),n}},2969:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClientFactory=c,t.createClient=function(e,t,n){return c().create(e,t,n)};const r=n(91),i=n(7671),o=n(1953),a=n(1546),u=n(4230),s=n(8632);function c(){return d()}function d(e){return{use:t=>d(null==e?t:(0,r.composeClientMiddleware)(e,t)),create(t,n,r={}){const c={},d=Object.entries((0,i.normalizeServiceDefinition)(t));for(const[t,i]of d){const d={...r["*"],...r[t]};i.requestStream?i.responseStream?c[t]=(0,o.createBidiStreamingMethod)(i,n,e,d):c[t]=(0,a.createClientStreamingMethod)(i,n,e,d):i.responseStream?c[t]=(0,u.createServerStreamingMethod)(i,n,e,d):c[t]=(0,s.createUnaryMethod)(i,n,e,d)}return c}}}},2992:(e,t)=>{"use strict";function n(e){return e.startsWith("google.protobuf.")&&["DoubleValue","FloatValue","Int64Value","UInt64Value","Int32Value","UInt32Value","BoolValue","StringValue","BytesValue"].includes(e.substring(16))}Object.defineProperty(t,"__esModule",{value:!0}),t.isWrapper=function(e){return n(e.$typeName)},t.isWrapperDesc=function(e){const t=e.fields[0];return n(e.typeName)&&void 0!==t&&"scalar"==t.fieldKind&&"value"==t.name&&1==t.number}},3056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryReader=t.BinaryWriter=t.INT32_MIN=t.INT32_MAX=t.UINT32_MAX=t.FLOAT32_MIN=t.FLOAT32_MAX=t.WireType=void 0;const r=n(9119),i=n(4011),o=n(898);var a;function u(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>t.INT32_MAX||e<t.INT32_MIN)throw new Error("invalid int32: "+e)}function s(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>t.UINT32_MAX||e<0)throw new Error("invalid uint32: "+e)}!function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(a||(t.WireType=a={})),t.FLOAT32_MAX=34028234663852886e22,t.FLOAT32_MIN=-34028234663852886e22,t.UINT32_MAX=4294967295,t.INT32_MAX=2147483647,t.INT32_MIN=-2147483648,t.BinaryWriter=class{constructor(e=(0,o.getTextEncoding)().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(s(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return u(e),(0,r.varint32write)(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.encodeUtf8(e);return this.uint32(t.byteLength),this.raw(t)}float(e){!function(e){if("string"==typeof e){const t=e;if(e=Number(e),isNaN(e)&&"NaN"!==t)throw new Error("invalid float32: "+t)}else if("number"!=typeof e)throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>t.FLOAT32_MAX||e<t.FLOAT32_MIN))throw new Error("invalid float32: "+e)}(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){s(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){u(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return u(e),e=(e<<1^e>>31)>>>0,(0,r.varint32write)(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=i.protoInt64.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=i.protoInt64.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=i.protoInt64.enc(e);return(0,r.varint64write)(t.lo,t.hi,this.buf),this}sint64(e){let t=i.protoInt64.enc(e),n=t.hi>>31,o=t.lo<<1^n,a=(t.hi<<1|t.lo>>>31)^n;return(0,r.varint64write)(o,a,this.buf),this}uint64(e){let t=i.protoInt64.uEnc(e);return(0,r.varint64write)(t.lo,t.hi,this.buf),this}},t.BinaryReader=class{constructor(e,t=(0,o.getTextEncoding)().decodeUtf8){this.decodeUtf8=t,this.varint64=r.varint64read,this.uint32=r.varint32read,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.uint32(),t=e>>>3,n=7&e;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case a.Varint:for(;128&this.buf[this.pos++];);break;case a.Bit64:this.pos+=4;case a.Bit32:this.pos+=4;break;case a.LengthDelimited:let n=this.uint32();this.pos+=n;break;case a.StartGroup:for(;;){const[e,n]=this.tag();if(n===a.EndGroup){if(void 0!==t&&e!==t)throw new Error("invalid end group tag");break}this.skip(n,e)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return i.protoInt64.dec(...this.varint64())}uint64(){return i.protoInt64.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,i.protoInt64.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return i.protoInt64.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return i.protoInt64.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.decodeUtf8(this.bytes())}}},3141:(e,t,n)=>{"use strict";var r=n(2861).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=c,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=d,this.end=f,t=3;break;default:return this.write=l,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},3297:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createChannel=function(e,t=(0,r.FetchTransport)()){return{address:e,transport:t}};const r=n(7005)},3557:(e,t,n)=>{"use strict";const r=n(9452),i=n(7328),o=Symbol("INTERNAL_JSON");function a(e,t){if(i.isBufferish(e))e.toJSON=t;else if(Array.isArray(e))for(const n of e)a(n,t);else if(e&&"object"==typeof e&&(!(e instanceof p)||e.tag<21||e.tag>23))for(const n of Object.values(e))a(n,t)}function u(){return i.base64(this)}function s(){return i.base64url(this)}function c(){return this.toString("hex")}const d={0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>i.bufferToBigInt(e),3:e=>r.BI.MINUS_ONE-i.bufferToBigInt(e),21:(e,t)=>(i.isBufferish(e)?t[o]=s:a(e,s),t),22:(e,t)=>(i.isBufferish(e)?t[o]=u:a(e,u),t),23:(e,t)=>(i.isBufferish(e)?t[o]=c:a(e,c),t),32:e=>new URL(e),33:(e,t)=>{if(!e.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const n=e.length%4;if(1===n)throw new Error("Invalid base64url length");if(2===n){if(-1==="AQgw".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding")}else if(3===n&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding");return t},34:(e,t)=>{const n=e.match(/^[a-zA-Z0-9+/]+(?<padding>={0,2})$/);if(!n)throw new Error("Invalid base64 characters");if(e.length%4!=0)throw new Error("Invalid base64 length");if("="===n.groups.padding){if(-1==="AQgw".indexOf(e[e.length-2]))throw new Error("Invalid base64 padding")}else if("=="===n.groups.padding&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-3]))throw new Error("Invalid base64 padding");return t},35:e=>new RegExp(e),258:e=>new Set(e)},f={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};function l(e,t){if(!i.isBufferish(e))throw new TypeError("val not a buffer");const{tag:n}=t,r=f[n];if(!r)throw new Error(`Invalid typed array tag: ${n}`);const o=2**(((16&n)>>4)+(3&n));return!(4&n)!==i.isBigEndian()&&o>1&&function(e,t,n,r){const i=new DataView(e),[o,a]={2:[i.getUint16,i.setUint16],4:[i.getUint32,i.setUint32],8:[i.getBigUint64,i.setBigUint64]}[t],u=n+r;for(let e=n;e<u;e+=t)a.call(i,e,o.call(i,e,!0))}(e.buffer,o,e.byteOffset,e.byteLength),new r(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}"undefined"!=typeof BigUint64Array&&(f[67]=BigUint64Array,f[71]=BigUint64Array),"undefined"!=typeof BigInt64Array&&(f[75]=BigInt64Array,f[79]=BigInt64Array);for(const e of Object.keys(f))d[e]=l;let v={};class p{constructor(e,t,n){if(this.tag=e,this.value=t,this.err=n,"number"!=typeof this.tag)throw new Error(`Invalid tag type (${typeof this.tag})`);if(this.tag<0||(0|this.tag)!==this.tag)throw new Error(`Tag must be a positive integer: ${this.tag}`)}toJSON(){if(this[o])return this[o].call(this.value);const e={tag:this.tag,value:this.value};return this.err&&(e.err=this.err),e}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(e){return e._pushTag(this.tag),e.pushAny(this.value)}convert(e){let t=null==e?void 0:e[this.tag];if(null===t)return this;if("function"!=typeof t&&(t=p.TAGS[this.tag],"function"!=typeof t))return this;try{return t.call(this,this.value,this)}catch(e){return e&&e.message&&e.message.length>0?this.err=e.message:this.err=e,this}}static get TAGS(){return v}static set TAGS(e){v=e}static reset(){p.TAGS={...d}}}p.INTERNAL_JSON=o,p.reset(),e.exports=p},3564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LPM_HEADER_LENGTH=void 0,t.parseLpmHeader=function(e){if(e.length!==t.LPM_HEADER_LENGTH)throw new Error(`Invalid LPM header length: ${e.length}`);const n=new DataView(e.buffer,e.byteOffset,e.byteLength);return{compressed:!!(1&n.getUint8(0)),isMetadata:!!(128&n.getUint8(0)),length:n.getUint32(1)}},t.encodeFrame=function(e){const n=new Uint8Array(t.LPM_HEADER_LENGTH+e.length);return new DataView(n.buffer,1,4).setUint32(0,e.length,!1),n.set(e,t.LPM_HEADER_LENGTH),n},t.LPM_HEADER_LENGTH=5},3600:(e,t,n)=>{"use strict";e.exports=i;var r=n(4610);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(6698)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},3652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3691:(e,t,n)=>{"use strict";t.shr=t.Zho=t.mB7=t.SxR=t.kY6=t.ilO=t.OVb=t.z8H=t.nYT=t.Ivf=t.FY$=t.oB1=t.npH=t.Jb0=t.yRG=t.GJ_=t.ky6=t.IZf=t.kdB=t.jpi=t.Q5R=t.T6t=t.Sti=t.UKh=t.eTk=t.MSi=t.mLN=t.oBU=t.gcQ=t.tXX=t.Ukj=t.hiI=t._xD=t.KHE=t.RSA=t.HmR=t.Q2J=t.tLl=t.RiP=void 0,t.wwQ=t._qG=t.BR9=t.vHc=t.kyM=t.YzH=t.sOp=t.q6T=t.u2P=t.bR2=t.YBp=t.bJb=t.wGV=t.ZjH=t.I6S=t.y9m=t.YED=t.cSQ=t.Qkv=t.tjt=t.RSV=t.fDS=t.tiv=t.PJf=t.qYK=t.CID=t.YPh=t.zF5=t.Ej7=t.v7D=t.M14=t.FVM=t.ww9=t.JlK=t.CCO=t.pQ6=t.C96=t.EFo=t.wcW=t.rtc=t.YyU=t.u4e=t.WKb=t.ZkI=t.Fgu=t.ZIC=t.f46=t.g_n=t.eUP=t.UoU=void 0,t.ur$=t.tMS=t.O6S=t.kyv=t.qq9=t.s9X=t.hSI=t.mzz=t.A3R=t.Qgs=t.yxr=t.Qct=t.BMy=t.kGC=t.iJe=t.uiG=t.z9d=t.K57=t.iFu=t.Qi4=t.GDk=t.FYb=t.EIb=t.mH2=t.GDv=t.UU=t.YiO=t.rN9=t.cFY=t.ucP=t.BZ8=t.qd0=t.fDp=t._GF=t.ao8=t.sQ1=t.zq$=t.Asw=t.$l=t.WSK=t.ZMb=t.UgO=t.hvh=t.kj3=t.dFH=t.ShL=t.H76=t.P_r=t.IK=t.cLn=void 0,t.SYo=t.TwU=t.XED=t.LAk=t.cze=t.nss=t.ssn=t.lO=t.fld=t.M2p=t.nSQ=t.HHp=t.Ym=t.mZy=t.mrT=t.kCY=t.M4C=t.G$$=t.eV4=t.uzJ=t.CHe=t.GFp=t.UHf=t.ImF=t.Gqp=t.S9_=t.GfB=t.ke4=t.UwI=t.WrM=t.mCq=t.NlM=t.s4p=t.ErQ=t.eSZ=t.Yuy=t.QPq=t.jE7=t.mDO=t.r0j=t.JqM=t.yye=t.pSr=t.J5y=t.rSh=t.lAg=t.YCl=t.sgL=t.hh1=t.w2G=void 0,t.POn=t.J5C=t.cw9=t.osR=t.wa5=t.utu=t.JkI=t.NEI=t.cjl=t.Y7N=t.ftF=t._oe=t.oUB=t.PQ6=t.YZt=t.Uzd=t.SaJ=t.$97=t.mDi=t.xB5=t.f2Z=t.MNk=t.Wb=t.gE1=t.OGr=t.a7Y=t.cNK=t.lw_=t.WCy=t.yj9=t.mzf=t.umN=t.oYg=t.iGb=t.V9H=t.AiO=t.WJ6=t.yk=t.c8T=t.yuk=t.$$L=t.wR0=t.Ie4=t.CUW=t.uLU=t.kFJ=t.GD3=t.m99=t.Cfi=t.nDu=void 0,t.Xut=t.TIL=t.kk=t.K5I=t.YRc=t.G$0=t.wFb=t.tMz=t.EdZ=t.a2E=t.f2B=t.q4s=t.Obl=t.ow1=t.ue8=t.Vc3=t.gY7=t.LJO=t.M8C=t.duA=t.LX0=t.yW7=t.qP2=t.VW3=t.UGg=t.Kz6=t.QwV=t.R3S=t.Uu2=t.LAV=t.X40=t.K6=t.Q8r=t.Ca7=t.sCC=t.K2g=t.yiw=t.wnc=t.UtY=t.kMH=t.Mn6=t.rly=t.Y0y=void 0;var r,i,o,a,u,s,c,d,f,l,v=n(4489),p=n(596);function h(){return{grovedbProof:new Uint8Array(0),quorumHash:new Uint8Array(0),signature:new Uint8Array(0),round:0,blockIdHash:new Uint8Array(0),quorumType:0}}function y(){return{code:0,message:"",data:new Uint8Array(0)}}function m(){return{stateTransition:new Uint8Array(0)}}function b(){return{id:new Uint8Array(0),prove:!1}}function w(){return{identityId:new Uint8Array(0),prove:!1}}function k(){return{identityId:new Uint8Array(0),contractId:new Uint8Array(0),prove:!1}}function g(){return{id:new Uint8Array(0),prove:!1}}function B(){return{id:new Uint8Array(0),prove:!1}}function I(){return{identityId:new Uint8Array(0),requestType:void 0,limit:void 0,offset:void 0,prove:!1}}function P(){return{identitiesIds:[],contractId:new Uint8Array(0),documentTypeName:void 0,purposes:[],prove:!1}}function R(){return{identityId:new Uint8Array(0),keys:[]}}function T(){return{proTxHash:new Uint8Array(0),count:"0"}}function S(){return{identityId:new Uint8Array(0),balance:void 0}}function E(){return{contractId:new Uint8Array(0),documentType:"",documentTypeKeepsHistory:!1,documentId:new Uint8Array(0),documentContestedStatus:0}}function A(){return{identityId:new Uint8Array(0),requestType:0}}function _(){return{contractId:new Uint8Array(0)}}function N(){return{contractId:new Uint8Array(0),documentTypeName:"",indexName:"",indexValues:[],voterIdentifier:new Uint8Array(0)}}function U(){return{tokenId:new Uint8Array(0),identityId:new Uint8Array(0)}}function L(){return{tokenId:new Uint8Array(0),identityId:new Uint8Array(0)}}function j(){return{tokenId:new Uint8Array(0)}}function C(){return{id:new Uint8Array(0),prove:!1}}function O(){return{identifier:new Uint8Array(0),dataContract:void 0}}function M(){return{id:new Uint8Array(0),limit:void 0,offset:void 0,startAtMs:"0",prove:!1}}function x(){return{date:"0",value:new Uint8Array(0)}}function D(){return{dataContractId:new Uint8Array(0),documentType:"",where:new Uint8Array(0),orderBy:new Uint8Array(0),limit:0,startAfter:void 0,startAt:void 0,prove:!1}}function W(){return{publicKeyHash:new Uint8Array(0),prove:!1}}function F(){return{stateTransitionHash:new Uint8Array(0),prove:!1}}function V(){return{startProTxHash:new Uint8Array(0),count:0,prove:!1}}function H(){return{proTxHash:new Uint8Array(0),version:0}}function q(){return{contractId:new Uint8Array(0),documentTypeName:"",indexName:"",startIndexValues:[],endIndexValues:[],startAtValueInfo:void 0,count:void 0,orderAscending:!1,prove:!1}}function G(){return{startValue:new Uint8Array(0),startValueIncluded:!1}}function K(){return{contractId:new Uint8Array(0),documentTypeName:"",indexName:"",indexValues:[],resultType:0,allowIncludeLockedAndAbstainingVoteTally:!1,startAtIdentifierInfo:void 0,count:void 0,prove:!1}}function $(){return{startIdentifier:new Uint8Array(0),startIdentifierIncluded:!1}}function Y(){return{identifier:new Uint8Array(0),voteCount:void 0,document:void 0}}function z(){return{contractId:new Uint8Array(0),documentTypeName:"",indexName:"",indexValues:[],contestantId:new Uint8Array(0),startAtIdentifierInfo:void 0,count:void 0,orderAscending:!1,prove:!1}}function X(){return{startIdentifier:new Uint8Array(0),startIdentifierIncluded:!1}}function Q(){return{identityId:new Uint8Array(0),limit:void 0,offset:void 0,orderAscending:!1,startAtVotePollIdInfo:void 0,prove:!1}}function J(){return{startAtPollIdentifier:new Uint8Array(0),startPollIdentifierIncluded:!1}}function Z(){return{contractId:new Uint8Array(0),documentTypeName:"",serializedIndexStorageValues:[],voteChoice:void 0}}function ee(){return{id:new Uint8Array(0),prove:!1}}function te(){return{id:new Uint8Array(0),proTxHash:void 0}}function ne(){return{catchingUp:!1,latestBlockHash:new Uint8Array(0),latestAppHash:new Uint8Array(0),latestBlockHeight:"0",earliestBlockHash:new Uint8Array(0),earliestAppHash:new Uint8Array(0),earliestBlockHeight:"0",maxPeerBlockHeight:"0",coreChainLockedHeight:void 0}}function re(){return{proTxHash:new Uint8Array(0),nodeIp:"",isBanned:!1}}function ie(){return{quorumHash:new Uint8Array(0),coreHeight:0,members:[],thresholdPublicKey:new Uint8Array(0)}}function oe(){return{quorumHashes:[],currentQuorumHash:new Uint8Array(0),validatorSets:[],lastBlockProposer:new Uint8Array(0),metadata:void 0}}function ae(){return{identityId:new Uint8Array(0),tokenIds:[],prove:!1}}function ue(){return{tokenId:new Uint8Array(0),balance:void 0}}function se(){return{tokenId:new Uint8Array(0),identityIds:[],prove:!1}}function ce(){return{identityId:new Uint8Array(0),balance:void 0}}function de(){return{identityId:new Uint8Array(0),tokenIds:[],prove:!1}}function fe(){return{tokenId:new Uint8Array(0),info:void 0}}function le(){return{tokenId:new Uint8Array(0),identityIds:[],prove:!1}}function ve(){return{identityId:new Uint8Array(0),info:void 0}}function pe(){return{tokenId:new Uint8Array(0),paused:void 0}}function he(){return{tokenId:new Uint8Array(0),startAtInfo:void 0,limit:void 0,prove:!1}}function ye(){return{recipientId:new Uint8Array(0),amount:"0"}}function me(){return{tokenId:new Uint8Array(0),prove:!1}}function be(){return{tokenId:new Uint8Array(0),totalAggregatedAmountInUserAccounts:"0",totalSystemAmount:"0"}}function we(){return{contractId:new Uint8Array(0),groupContractPosition:0,prove:!1}}function ke(){return{memberId:new Uint8Array(0),power:0}}function ge(){return{contractId:new Uint8Array(0),startAtGroupContractPosition:void 0,count:void 0,prove:!1}}function Be(){return{memberId:new Uint8Array(0),power:0}}function Ie(){return{startActionId:new Uint8Array(0),startActionIdIncluded:!1}}function Pe(){return{contractId:new Uint8Array(0),groupContractPosition:0,status:0,startAtActionId:void 0,count:void 0,prove:!1}}function Re(){return{amount:"0",recipientId:new Uint8Array(0),publicNote:void 0}}function Te(){return{frozenId:new Uint8Array(0),publicNote:void 0}}function Se(){return{frozenId:new Uint8Array(0),publicNote:void 0}}function Ee(){return{frozenId:new Uint8Array(0),amount:"0",publicNote:void 0}}function Ae(){return{senderKeyIndex:0,recipientKeyIndex:0,encryptedData:new Uint8Array(0)}}function _e(){return{rootEncryptionKeyIndex:0,derivationEncryptionKeyIndex:0,encryptedData:new Uint8Array(0)}}function Ne(){return{tokenConfigUpdateItem:new Uint8Array(0),publicNote:void 0}}function Ue(){return{createdDocument:new Uint8Array(0)}}function Le(){return{updatedContract:new Uint8Array(0)}}function je(){return{actionId:new Uint8Array(0),event:void 0}}function Ce(){return{contractId:new Uint8Array(0),groupContractPosition:0,status:0,actionId:new Uint8Array(0),prove:!1}}function Oe(){return{signerId:new Uint8Array(0),power:0}}(function(e){e[e.AUTHENTICATION=0]="AUTHENTICATION",e[e.ENCRYPTION=1]="ENCRYPTION",e[e.DECRYPTION=2]="DECRYPTION",e[e.TRANSFER=3]="TRANSFER",e[e.VOTING=5]="VOTING",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(r||(r={})),function(e){e[e.CURRENT_KEY_OF_KIND_REQUEST=0]="CURRENT_KEY_OF_KIND_REQUEST",e[e.ALL_KEYS_OF_KIND_REQUEST=1]="ALL_KEYS_OF_KIND_REQUEST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(i={})),function(e){e[e.NOT_CONTESTED=0]="NOT_CONTESTED",e[e.MAYBE_CONTESTED=1]="MAYBE_CONTESTED",e[e.CONTESTED=2]="CONTESTED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(o||(o={})),function(e){e[e.FULL_IDENTITY=0]="FULL_IDENTITY",e[e.BALANCE=1]="BALANCE",e[e.KEYS=2]="KEYS",e[e.REVISION=3]="REVISION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(a||(a={})),function(e){e[e.DOCUMENTS=0]="DOCUMENTS",e[e.VOTE_TALLY=1]="VOTE_TALLY",e[e.DOCUMENTS_AND_VOTE_TALLY=2]="DOCUMENTS_AND_VOTE_TALLY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(u||(u={})),function(e){e[e.TOWARDS_IDENTITY=0]="TOWARDS_IDENTITY",e[e.LOCKED=1]="LOCKED",e[e.NO_PREVIOUS_WINNER=2]="NO_PREVIOUS_WINNER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s||(s={})),function(e){e[e.TOWARDS_IDENTITY=0]="TOWARDS_IDENTITY",e[e.ABSTAIN=1]="ABSTAIN",e[e.LOCK=2]="LOCK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c||(c={})),function(e){e[e.ACTIVE=0]="ACTIVE",e[e.CLOSED=1]="CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(d||(d={})),function(e){e[e.PAUSE=0]="PAUSE",e[e.RESUME=1]="RESUME",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(f||(f={})),function(e){e[e.ACTIVE=0]="ACTIVE",e[e.CLOSED=1]="CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(l||(l={})),t.RiP={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.grovedbProof.length&&t.uint32(10).bytes(e.grovedbProof),0!==e.quorumHash.length&&t.uint32(18).bytes(e.quorumHash),0!==e.signature.length&&t.uint32(26).bytes(e.signature),0!==e.round&&t.uint32(32).uint32(e.round),0!==e.blockIdHash.length&&t.uint32(42).bytes(e.blockIdHash),0!==e.quorumType&&t.uint32(48).uint32(e.quorumType),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=h();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.grovedbProof=n.bytes();continue;case 2:if(18!==o)break;i.quorumHash=n.bytes();continue;case 3:if(26!==o)break;i.signature=n.bytes();continue;case 4:if(32!==o)break;i.round=n.uint32();continue;case 5:if(42!==o)break;i.blockIdHash=n.bytes();continue;case 6:if(48!==o)break;i.quorumType=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.RiP.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a,u=h();return u.grovedbProof=null!==(t=e.grovedbProof)&&void 0!==t?t:new Uint8Array(0),u.quorumHash=null!==(n=e.quorumHash)&&void 0!==n?n:new Uint8Array(0),u.signature=null!==(r=e.signature)&&void 0!==r?r:new Uint8Array(0),u.round=null!==(i=e.round)&&void 0!==i?i:0,u.blockIdHash=null!==(o=e.blockIdHash)&&void 0!==o?o:new Uint8Array(0),u.quorumType=null!==(a=e.quorumType)&&void 0!==a?a:0,u}},t.tLl={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.height&&t.uint32(8).uint64(e.height),0!==e.coreChainLockedHeight&&t.uint32(16).uint32(e.coreChainLockedHeight),0!==e.epoch&&t.uint32(24).uint32(e.epoch),"0"!==e.timeMs&&t.uint32(32).uint64(e.timeMs),0!==e.protocolVersion&&t.uint32(40).uint32(e.protocolVersion),""!==e.chainId&&t.uint32(50).string(e.chainId),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={height:"0",coreChainLockedHeight:0,epoch:0,timeMs:"0",protocolVersion:0,chainId:""};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.height=n.uint64().toString();continue;case 2:if(16!==o)break;i.coreChainLockedHeight=n.uint32();continue;case 3:if(24!==o)break;i.epoch=n.uint32();continue;case 4:if(32!==o)break;i.timeMs=n.uint64().toString();continue;case 5:if(40!==o)break;i.protocolVersion=n.uint32();continue;case 6:if(50!==o)break;i.chainId=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.tLl.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a,u={height:"0",coreChainLockedHeight:0,epoch:0,timeMs:"0",protocolVersion:0,chainId:""};return u.height=null!==(t=e.height)&&void 0!==t?t:"0",u.coreChainLockedHeight=null!==(n=e.coreChainLockedHeight)&&void 0!==n?n:0,u.epoch=null!==(r=e.epoch)&&void 0!==r?r:0,u.timeMs=null!==(i=e.timeMs)&&void 0!==i?i:"0",u.protocolVersion=null!==(o=e.protocolVersion)&&void 0!==o?o:0,u.chainId=null!==(a=e.chainId)&&void 0!==a?a:"",u}},t.Q2J={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.code&&t.uint32(8).uint32(e.code),""!==e.message&&t.uint32(18).string(e.message),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=y();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.code=n.uint32();continue;case 2:if(18!==o)break;i.message=n.string();continue;case 3:if(26!==o)break;i.data=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Q2J.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=y();return i.code=null!==(t=e.code)&&void 0!==t?t:0,i.message=null!==(n=e.message)&&void 0!==n?n:"",i.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array(0),i}},t.HmR={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.stateTransition.length&&t.uint32(10).bytes(e.stateTransition),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=m();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.stateTransition=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.HmR.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n=m();return n.stateTransition=null!==(t=e.stateTransition)&&void 0!==t?t:new Uint8Array(0),n}},t.RSA={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t;n.pos<r;){var i=n.uint32();if(4==(7&i)||0===i)break;n.skip(7&i)}return{}},create:function(e){return t.RSA.fromPartial(null!=e?e:{})},fromPartial:function(e){return{}}},t.KHE={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t._xD.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t._xD.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.KHE.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t._xD.fromPartial(e.v0):void 0,n}},t._xD={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.id.length&&t.uint32(10).bytes(e.id),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=b();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.id=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t._xD.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=b();return r.id=null!==(t=e.id)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.hiI={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Ukj.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Ukj.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.hiI.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Ukj.fromPartial(e.v0):void 0,n}},t.Ukj={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.identityId.length&&t.uint32(10).bytes(e.identityId),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=w();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identityId=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Ukj.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=w();return r.identityId=null!==(t=e.identityId)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.tXX={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.gcQ.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.gcQ.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.tXX.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.gcQ.fromPartial(e.v0):void 0,n}},t.gcQ={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.identityId.length&&t.uint32(10).bytes(e.identityId),0!==e.contractId.length&&t.uint32(18).bytes(e.contractId),!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=k();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identityId=n.bytes();continue;case 2:if(18!==o)break;i.contractId=n.bytes();continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.gcQ.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=k();return i.identityId=null!==(t=e.identityId)&&void 0!==t?t:new Uint8Array(0),i.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.oBU={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mLN.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mLN.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.oBU.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mLN.fromPartial(e.v0):void 0,n}},t.mLN={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.id.length&&t.uint32(10).bytes(e.id),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=g();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.id=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.mLN.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=g();return r.id=null!==(t=e.id)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.MSi={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.eTk.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.eTk.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.MSi.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.eTk.fromPartial(e.v0):void 0,n}},t.eTk={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.id.length&&t.uint32(10).bytes(e.id),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=B();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.id=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.eTk.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=B();return r.id=null!==(t=e.id)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.UKh={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Sti.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Sti.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.UKh.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Sti.fromPartial(e.v0):void 0,n}},t.Sti={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identity&&n.uint32(10).bytes(e.identity),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identity:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identity=r.bytes();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Sti.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={identity:void 0,proof:void 0,metadata:void 0};return r.identity=null!==(n=e.identity)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.T6t={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Q5R.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Q5R.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.T6t.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Q5R.fromPartial(e.v0):void 0,n}},t.Q5R={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identityNonce&&n.uint32(8).uint64(e.identityNonce),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identityNonce:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.identityNonce=r.uint64().toString();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Q5R.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={identityNonce:void 0,proof:void 0,metadata:void 0};return r.identityNonce=null!==(n=e.identityNonce)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.jpi={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.kdB.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.kdB.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.jpi.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.kdB.fromPartial(e.v0):void 0,n}},t.kdB={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identityContractNonce&&n.uint32(8).uint64(e.identityContractNonce),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identityContractNonce:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.identityContractNonce=r.uint64().toString();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kdB.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={identityContractNonce:void 0,proof:void 0,metadata:void 0};return r.identityContractNonce=null!==(n=e.identityContractNonce)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.IZf={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.ky6.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.ky6.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.IZf.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.ky6.fromPartial(e.v0):void 0,n}},t.ky6={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.balance&&n.uint32(8).uint64(e.balance),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={balance:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.balance=r.uint64().toString();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ky6.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={balance:void 0,proof:void 0,metadata:void 0};return r.balance=null!==(n=e.balance)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.GJ_={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.yRG.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.yRG.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.GJ_.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.yRG.fromPartial(e.v0):void 0,n}},t.yRG={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.balanceAndRevision&&t.Jb0.encode(e.balanceAndRevision,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={balanceAndRevision:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.balanceAndRevision=t.Jb0.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.yRG.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={balanceAndRevision:void 0,proof:void 0,metadata:void 0};return n.balanceAndRevision=void 0!==e.balanceAndRevision&&null!==e.balanceAndRevision?t.Jb0.fromPartial(e.balanceAndRevision):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.Jb0={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.balance&&t.uint32(8).uint64(e.balance),"0"!==e.revision&&t.uint32(16).uint64(e.revision),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={balance:"0",revision:"0"};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.balance=n.uint64().toString();continue;case 2:if(16!==o)break;i.revision=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Jb0.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={balance:"0",revision:"0"};return r.balance=null!==(t=e.balance)&&void 0!==t?t:"0",r.revision=null!==(n=e.revision)&&void 0!==n?n:"0",r}},t.npH={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.allKeys&&t.oB1.encode(e.allKeys,n.uint32(10).fork()).join(),void 0!==e.specificKeys&&t.FY$.encode(e.specificKeys,n.uint32(18).fork()).join(),void 0!==e.searchKey&&t.Ivf.encode(e.searchKey,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={allKeys:void 0,specificKeys:void 0,searchKey:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.allKeys=t.oB1.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.specificKeys=t.FY$.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.searchKey=t.Ivf.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.npH.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={allKeys:void 0,specificKeys:void 0,searchKey:void 0};return n.allKeys=void 0!==e.allKeys&&null!==e.allKeys?t.oB1.fromPartial(e.allKeys):void 0,n.specificKeys=void 0!==e.specificKeys&&null!==e.specificKeys?t.FY$.fromPartial(e.specificKeys):void 0,n.searchKey=void 0!==e.searchKey&&null!==e.searchKey?t.Ivf.fromPartial(e.searchKey):void 0,n}},t.oB1={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t;n.pos<r;){var i=n.uint32();if(4==(7&i)||0===i)break;n.skip(7&i)}return{}},create:function(e){return t.oB1.fromPartial(null!=e?e:{})},fromPartial:function(e){return{}}},t.FY$={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),t.uint32(10).fork();for(var n=0,r=e.keyIds;n<r.length;n++){var i=r[n];t.uint32(i)}return t.join(),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={keyIds:[]};n.pos<r;){var o=n.uint32();if(o>>>3==1){if(8===o){i.keyIds.push(n.uint32());continue}if(10===o){for(var a=n.uint32()+n.pos;n.pos<a;)i.keyIds.push(n.uint32());continue}}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.FY$.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={keyIds:[]};return n.keyIds=(null===(t=e.keyIds)||void 0===t?void 0:t.map((function(e){return e})))||[],n}},t.Ivf={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),Object.entries(e.purposeMap).forEach((function(e){var r=e[0],i=e[1];t.nYT.encode({key:r,value:i},n.uint32(10).fork()).join()})),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={purposeMap:{}};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;var u=t.nYT.decode(r,r.uint32());void 0!==u.value&&(o.purposeMap[u.key]=u.value);continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Ivf.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={purposeMap:{}};return r.purposeMap=Object.entries(null!==(n=e.purposeMap)&&void 0!==n?n:{}).reduce((function(e,n){var r=n[0],i=n[1];return void 0!==i&&(e[globalThis.Number(r)]=t.z8H.fromPartial(i)),e}),{}),r}},t.nYT={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.key&&n.uint32(8).uint32(e.key),void 0!==e.value&&t.z8H.encode(e.value,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={key:0,value:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.key=r.uint32();continue;case 2:if(18!==a)break;o.value=t.z8H.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.nYT.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={key:0,value:void 0};return r.key=null!==(n=e.key)&&void 0!==n?n:0,r.value=void 0!==e.value&&null!==e.value?t.z8H.fromPartial(e.value):void 0,r}},t.z8H={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),Object.entries(e.securityLevelMap).forEach((function(e){var r=e[0],i=e[1];t.OVb.encode({key:r,value:i},n.uint32(10).fork()).join()})),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={securityLevelMap:{}};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;var u=t.OVb.decode(r,r.uint32());void 0!==u.value&&(o.securityLevelMap[u.key]=u.value);continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.z8H.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={securityLevelMap:{}};return n.securityLevelMap=Object.entries(null!==(t=e.securityLevelMap)&&void 0!==t?t:{}).reduce((function(e,t){var n=t[0],r=t[1];return void 0!==r&&(e[globalThis.Number(n)]=r),e}),{}),n}},t.OVb={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.key&&t.uint32(8).uint32(e.key),0!==e.value&&t.uint32(16).int32(e.value),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={key:0,value:0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.key=n.uint32();continue;case 2:if(16!==o)break;i.value=n.int32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.OVb.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={key:0,value:0};return r.key=null!==(t=e.key)&&void 0!==t?t:0,r.value=null!==(n=e.value)&&void 0!==n?n:0,r}},t.ilO={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.kY6.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.kY6.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ilO.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.kY6.fromPartial(e.v0):void 0,n}},t.kY6={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.identityId.length&&n.uint32(10).bytes(e.identityId),void 0!==e.requestType&&t.npH.encode(e.requestType,n.uint32(18).fork()).join(),void 0!==e.limit&&p.UInt32Value.encode({value:e.limit},n.uint32(26).fork()).join(),void 0!==e.offset&&p.UInt32Value.encode({value:e.offset},n.uint32(34).fork()).join(),!1!==e.prove&&n.uint32(40).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=I();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identityId=r.bytes();continue;case 2:if(18!==a)break;o.requestType=t.npH.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.limit=p.UInt32Value.decode(r,r.uint32()).value;continue;case 4:if(34!==a)break;o.offset=p.UInt32Value.decode(r,r.uint32()).value;continue;case 5:if(40!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kY6.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a=I();return a.identityId=null!==(n=e.identityId)&&void 0!==n?n:new Uint8Array(0),a.requestType=void 0!==e.requestType&&null!==e.requestType?t.npH.fromPartial(e.requestType):void 0,a.limit=null!==(r=e.limit)&&void 0!==r?r:void 0,a.offset=null!==(i=e.offset)&&void 0!==i?i:void 0,a.prove=null!==(o=e.prove)&&void 0!==o&&o,a}},t.SxR={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mB7.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mB7.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.SxR.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mB7.fromPartial(e.v0):void 0,n}},t.mB7={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.keys&&t.Zho.encode(e.keys,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={keys:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.keys=t.Zho.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.mB7.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={keys:void 0,proof:void 0,metadata:void 0};return n.keys=void 0!==e.keys&&null!==e.keys?t.Zho.fromPartial(e.keys):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.Zho={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.keysBytes;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={keysBytes:[]};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.keysBytes.push(n.bytes());continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Zho.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={keysBytes:[]};return n.keysBytes=(null===(t=e.keysBytes)||void 0===t?void 0:t.map((function(e){return e})))||[],n}},t.shr={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.UoU.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.UoU.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.shr.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.UoU.fromPartial(e.v0):void 0,n}},t.UoU={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.identitiesIds;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}0!==e.contractId.length&&t.uint32(18).bytes(e.contractId),void 0!==e.documentTypeName&&t.uint32(26).string(e.documentTypeName),t.uint32(34).fork();for(var o=0,a=e.purposes;o<a.length;o++)i=a[o],t.int32(i);return t.join(),!1!==e.prove&&t.uint32(40).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=P();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identitiesIds.push(n.bytes());continue;case 2:if(18!==o)break;i.contractId=n.bytes();continue;case 3:if(26!==o)break;i.documentTypeName=n.string();continue;case 4:if(32===o){i.purposes.push(n.int32());continue}if(34===o){for(var a=n.uint32()+n.pos;n.pos<a;)i.purposes.push(n.int32());continue}break;case 5:if(40!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.UoU.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a=P();return a.identitiesIds=(null===(t=e.identitiesIds)||void 0===t?void 0:t.map((function(e){return e})))||[],a.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),a.documentTypeName=null!==(r=e.documentTypeName)&&void 0!==r?r:void 0,a.purposes=(null===(i=e.purposes)||void 0===i?void 0:i.map((function(e){return e})))||[],a.prove=null!==(o=e.prove)&&void 0!==o&&o,a}},t.eUP={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.g_n.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.g_n.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.eUP.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.g_n.fromPartial(e.v0):void 0,n}},t.g_n={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identitiesKeys&&t.Fgu.encode(e.identitiesKeys,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identitiesKeys:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identitiesKeys=t.Fgu.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.g_n.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={identitiesKeys:void 0,proof:void 0,metadata:void 0};return n.identitiesKeys=void 0!==e.identitiesKeys&&null!==e.identitiesKeys?t.Fgu.fromPartial(e.identitiesKeys):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.f46={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),0!==e.purpose&&t.uint32(8).int32(e.purpose);for(var n=0,r=e.keysBytes;n<r.length;n++){var i=r[n];t.uint32(18).bytes(i)}return t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={purpose:0,keysBytes:[]};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.purpose=n.int32();continue;case 2:if(18!==o)break;i.keysBytes.push(n.bytes());continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.f46.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={purpose:0,keysBytes:[]};return r.purpose=null!==(t=e.purpose)&&void 0!==t?t:0,r.keysBytes=(null===(n=e.keysBytes)||void 0===n?void 0:n.map((function(e){return e})))||[],r}},t.ZIC={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),0!==e.identityId.length&&n.uint32(10).bytes(e.identityId);for(var r=0,i=e.keys;r<i.length;r++){var o=i[r];t.f46.encode(o,n.uint32(18).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=R();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identityId=r.bytes();continue;case 2:if(18!==a)break;o.keys.push(t.f46.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ZIC.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i=R();return i.identityId=null!==(n=e.identityId)&&void 0!==n?n:new Uint8Array(0),i.keys=(null===(r=e.keys)||void 0===r?void 0:r.map((function(e){return t.f46.fromPartial(e)})))||[],i}},t.Fgu={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.entries;r<i.length;r++){var o=i[r];t.ZIC.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={entries:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.entries.push(t.ZIC.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Fgu.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={entries:[]};return r.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((function(e){return t.ZIC.fromPartial(e)})))||[],r}},t.ZkI={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.WKb.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.WKb.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ZkI.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.WKb.fromPartial(e.v0):void 0,n}},t.WKb={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),void 0!==e.epoch&&t.uint32(8).uint32(e.epoch);for(var n=0,r=e.ids;n<r.length;n++){var i=r[n];t.uint32(18).bytes(i)}return!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={epoch:void 0,ids:[],prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.epoch=n.uint32();continue;case 2:if(18!==o)break;i.ids.push(n.bytes());continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.WKb.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i={epoch:void 0,ids:[],prove:!1};return i.epoch=null!==(t=e.epoch)&&void 0!==t?t:void 0,i.ids=(null===(n=e.ids)||void 0===n?void 0:n.map((function(e){return e})))||[],i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.u4e={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.YyU.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.YyU.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.u4e.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.YyU.fromPartial(e.v0):void 0,n}},t.YyU={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.evonodesProposedBlockCountsInfo&&t.wcW.encode(e.evonodesProposedBlockCountsInfo,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={evonodesProposedBlockCountsInfo:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.evonodesProposedBlockCountsInfo=t.wcW.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.YyU.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={evonodesProposedBlockCountsInfo:void 0,proof:void 0,metadata:void 0};return n.evonodesProposedBlockCountsInfo=void 0!==e.evonodesProposedBlockCountsInfo&&null!==e.evonodesProposedBlockCountsInfo?t.wcW.fromPartial(e.evonodesProposedBlockCountsInfo):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.rtc={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.proTxHash.length&&t.uint32(10).bytes(e.proTxHash),"0"!==e.count&&t.uint32(16).uint64(e.count),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=T();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.proTxHash=n.bytes();continue;case 2:if(16!==o)break;i.count=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.rtc.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=T();return r.proTxHash=null!==(t=e.proTxHash)&&void 0!==t?t:new Uint8Array(0),r.count=null!==(n=e.count)&&void 0!==n?n:"0",r}},t.wcW={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.evonodesProposedBlockCounts;r<i.length;r++){var o=i[r];t.rtc.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={evonodesProposedBlockCounts:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.evonodesProposedBlockCounts.push(t.rtc.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.wcW.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={evonodesProposedBlockCounts:[]};return r.evonodesProposedBlockCounts=(null===(n=e.evonodesProposedBlockCounts)||void 0===n?void 0:n.map((function(e){return t.rtc.fromPartial(e)})))||[],r}},t.EFo={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.C96.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.C96.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.EFo.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.C96.fromPartial(e.v0):void 0,n}},t.C96={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),void 0!==e.epoch&&t.uint32(8).uint32(e.epoch),void 0!==e.limit&&t.uint32(16).uint32(e.limit),void 0!==e.startAfter&&t.uint32(26).bytes(e.startAfter),void 0!==e.startAt&&t.uint32(34).bytes(e.startAt),!1!==e.prove&&t.uint32(40).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={epoch:void 0,limit:void 0,startAfter:void 0,startAt:void 0,prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.epoch=n.uint32();continue;case 2:if(16!==o)break;i.limit=n.uint32();continue;case 3:if(26!==o)break;i.startAfter=n.bytes();continue;case 4:if(34!==o)break;i.startAt=n.bytes();continue;case 5:if(40!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.C96.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a={epoch:void 0,limit:void 0,startAfter:void 0,startAt:void 0,prove:!1};return a.epoch=null!==(t=e.epoch)&&void 0!==t?t:void 0,a.limit=null!==(n=e.limit)&&void 0!==n?n:void 0,a.startAfter=null!==(r=e.startAfter)&&void 0!==r?r:void 0,a.startAt=null!==(i=e.startAt)&&void 0!==i?i:void 0,a.prove=null!==(o=e.prove)&&void 0!==o&&o,a}},t.pQ6={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.CCO.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.CCO.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.pQ6.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.CCO.fromPartial(e.v0):void 0,n}},t.CCO={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.ids;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={ids:[],prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.ids.push(n.bytes());continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.CCO.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={ids:[],prove:!1};return r.ids=(null===(t=e.ids)||void 0===t?void 0:t.map((function(e){return e})))||[],r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.JlK={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.ww9.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.ww9.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.JlK.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.ww9.fromPartial(e.v0):void 0,n}},t.ww9={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identitiesBalances&&t.M14.encode(e.identitiesBalances,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identitiesBalances:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identitiesBalances=t.M14.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ww9.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={identitiesBalances:void 0,proof:void 0,metadata:void 0};return n.identitiesBalances=void 0!==e.identitiesBalances&&null!==e.identitiesBalances?t.M14.fromPartial(e.identitiesBalances):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.FVM={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.identityId.length&&t.uint32(10).bytes(e.identityId),void 0!==e.balance&&t.uint32(16).uint64(e.balance),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=S();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identityId=n.bytes();continue;case 2:if(16!==o)break;i.balance=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.FVM.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=S();return r.identityId=null!==(t=e.identityId)&&void 0!==t?t:new Uint8Array(0),r.balance=null!==(n=e.balance)&&void 0!==n?n:void 0,r}},t.M14={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.entries;r<i.length;r++){var o=i[r];t.FVM.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={entries:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.entries.push(t.FVM.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.M14.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={entries:[]};return r.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((function(e){return t.FVM.fromPartial(e)})))||[],r}},t.v7D={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Ej7.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Ej7.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.v7D.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Ej7.fromPartial(e.v0):void 0,n}},t.Ej7={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.identities;r<i.length;r++){var o=i[r];t.YPh.encode(o,n.uint32(10).fork()).join()}for(var a=0,u=e.contracts;a<u.length;a++)o=u[a],t.CID.encode(o,n.uint32(18).fork()).join();for(var s=0,c=e.documents;s<c.length;s++)o=c[s],t.zF5.encode(o,n.uint32(26).fork()).join();for(var d=0,f=e.votes;d<f.length;d++)o=f[d],t.qYK.encode(o,n.uint32(34).fork()).join();for(var l=0,p=e.identityTokenBalances;l<p.length;l++)o=p[l],t.tiv.encode(o,n.uint32(42).fork()).join();for(var h=0,y=e.identityTokenInfos;h<y.length;h++)o=y[h],t.fDS.encode(o,n.uint32(50).fork()).join();for(var m=0,b=e.tokenStatuses;m<b.length;m++)o=b[m],t.RSV.encode(o,n.uint32(58).fork()).join();return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identities:[],contracts:[],documents:[],votes:[],identityTokenBalances:[],identityTokenInfos:[],tokenStatuses:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identities.push(t.YPh.decode(r,r.uint32()));continue;case 2:if(18!==a)break;o.contracts.push(t.CID.decode(r,r.uint32()));continue;case 3:if(26!==a)break;o.documents.push(t.zF5.decode(r,r.uint32()));continue;case 4:if(34!==a)break;o.votes.push(t.qYK.decode(r,r.uint32()));continue;case 5:if(42!==a)break;o.identityTokenBalances.push(t.tiv.decode(r,r.uint32()));continue;case 6:if(50!==a)break;o.identityTokenInfos.push(t.fDS.decode(r,r.uint32()));continue;case 7:if(58!==a)break;o.tokenStatuses.push(t.RSV.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Ej7.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a,u,s,c={identities:[],contracts:[],documents:[],votes:[],identityTokenBalances:[],identityTokenInfos:[],tokenStatuses:[]};return c.identities=(null===(n=e.identities)||void 0===n?void 0:n.map((function(e){return t.YPh.fromPartial(e)})))||[],c.contracts=(null===(r=e.contracts)||void 0===r?void 0:r.map((function(e){return t.CID.fromPartial(e)})))||[],c.documents=(null===(i=e.documents)||void 0===i?void 0:i.map((function(e){return t.zF5.fromPartial(e)})))||[],c.votes=(null===(o=e.votes)||void 0===o?void 0:o.map((function(e){return t.qYK.fromPartial(e)})))||[],c.identityTokenBalances=(null===(a=e.identityTokenBalances)||void 0===a?void 0:a.map((function(e){return t.tiv.fromPartial(e)})))||[],c.identityTokenInfos=(null===(u=e.identityTokenInfos)||void 0===u?void 0:u.map((function(e){return t.fDS.fromPartial(e)})))||[],c.tokenStatuses=(null===(s=e.tokenStatuses)||void 0===s?void 0:s.map((function(e){return t.RSV.fromPartial(e)})))||[],c}},t.zF5={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.contractId.length&&t.uint32(10).bytes(e.contractId),""!==e.documentType&&t.uint32(18).string(e.documentType),!1!==e.documentTypeKeepsHistory&&t.uint32(24).bool(e.documentTypeKeepsHistory),0!==e.documentId.length&&t.uint32(34).bytes(e.documentId),0!==e.documentContestedStatus&&t.uint32(40).int32(e.documentContestedStatus),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=E();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.contractId=n.bytes();continue;case 2:if(18!==o)break;i.documentType=n.string();continue;case 3:if(24!==o)break;i.documentTypeKeepsHistory=n.bool();continue;case 4:if(34!==o)break;i.documentId=n.bytes();continue;case 5:if(40!==o)break;i.documentContestedStatus=n.int32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.zF5.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a=E();return a.contractId=null!==(t=e.contractId)&&void 0!==t?t:new Uint8Array(0),a.documentType=null!==(n=e.documentType)&&void 0!==n?n:"",a.documentTypeKeepsHistory=null!==(r=e.documentTypeKeepsHistory)&&void 0!==r&&r,a.documentId=null!==(i=e.documentId)&&void 0!==i?i:new Uint8Array(0),a.documentContestedStatus=null!==(o=e.documentContestedStatus)&&void 0!==o?o:0,a}},t.YPh={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.identityId.length&&t.uint32(10).bytes(e.identityId),0!==e.requestType&&t.uint32(16).int32(e.requestType),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=A();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identityId=n.bytes();continue;case 2:if(16!==o)break;i.requestType=n.int32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.YPh.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=A();return r.identityId=null!==(t=e.identityId)&&void 0!==t?t:new Uint8Array(0),r.requestType=null!==(n=e.requestType)&&void 0!==n?n:0,r}},t.CID={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.contractId.length&&t.uint32(10).bytes(e.contractId),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=_();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.contractId=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.CID.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n=_();return n.contractId=null!==(t=e.contractId)&&void 0!==t?t:new Uint8Array(0),n}},t.qYK={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.contestedResourceVoteStatusRequest&&t.PJf.encode(e.contestedResourceVoteStatusRequest,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={contestedResourceVoteStatusRequest:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contestedResourceVoteStatusRequest=t.PJf.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.qYK.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={contestedResourceVoteStatusRequest:void 0};return n.contestedResourceVoteStatusRequest=void 0!==e.contestedResourceVoteStatusRequest&&null!==e.contestedResourceVoteStatusRequest?t.PJf.fromPartial(e.contestedResourceVoteStatusRequest):void 0,n}},t.PJf={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),0!==e.contractId.length&&t.uint32(10).bytes(e.contractId),""!==e.documentTypeName&&t.uint32(18).string(e.documentTypeName),""!==e.indexName&&t.uint32(26).string(e.indexName);for(var n=0,r=e.indexValues;n<r.length;n++){var i=r[n];t.uint32(34).bytes(i)}return 0!==e.voterIdentifier.length&&t.uint32(42).bytes(e.voterIdentifier),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=N();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.contractId=n.bytes();continue;case 2:if(18!==o)break;i.documentTypeName=n.string();continue;case 3:if(26!==o)break;i.indexName=n.string();continue;case 4:if(34!==o)break;i.indexValues.push(n.bytes());continue;case 5:if(42!==o)break;i.voterIdentifier=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.PJf.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a=N();return a.contractId=null!==(t=e.contractId)&&void 0!==t?t:new Uint8Array(0),a.documentTypeName=null!==(n=e.documentTypeName)&&void 0!==n?n:"",a.indexName=null!==(r=e.indexName)&&void 0!==r?r:"",a.indexValues=(null===(i=e.indexValues)||void 0===i?void 0:i.map((function(e){return e})))||[],a.voterIdentifier=null!==(o=e.voterIdentifier)&&void 0!==o?o:new Uint8Array(0),a}},t.tiv={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId),0!==e.identityId.length&&t.uint32(18).bytes(e.identityId),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=U();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(18!==o)break;i.identityId=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.tiv.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=U();return r.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),r.identityId=null!==(n=e.identityId)&&void 0!==n?n:new Uint8Array(0),r}},t.fDS={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId),0!==e.identityId.length&&t.uint32(18).bytes(e.identityId),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=L();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(18!==o)break;i.identityId=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.fDS.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=L();return r.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),r.identityId=null!==(n=e.identityId)&&void 0!==n?n:new Uint8Array(0),r}},t.RSV={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=j();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.RSV.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n=j();return n.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),n}},t.tjt={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Qkv.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Qkv.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.tjt.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Qkv.fromPartial(e.v0):void 0,n}},t.Qkv={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(10).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Qkv.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={proof:void 0,metadata:void 0};return n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.cSQ={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.YED.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.YED.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.cSQ.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.YED.fromPartial(e.v0):void 0,n}},t.YED={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.id.length&&t.uint32(10).bytes(e.id),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=C();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.id=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.YED.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=C();return r.id=null!==(t=e.id)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.y9m={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.I6S.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.I6S.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.y9m.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.I6S.fromPartial(e.v0):void 0,n}},t.I6S={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.dataContract&&n.uint32(10).bytes(e.dataContract),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={dataContract:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.dataContract=r.bytes();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.I6S.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={dataContract:void 0,proof:void 0,metadata:void 0};return r.dataContract=null!==(n=e.dataContract)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.ZjH={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.wGV.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.wGV.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ZjH.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.wGV.fromPartial(e.v0):void 0,n}},t.wGV={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.ids;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={ids:[],prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.ids.push(n.bytes());continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.wGV.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={ids:[],prove:!1};return r.ids=(null===(t=e.ids)||void 0===t?void 0:t.map((function(e){return e})))||[],r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.bJb={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.u2P.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.u2P.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.bJb.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.u2P.fromPartial(e.v0):void 0,n}},t.YBp={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.identifier.length&&t.uint32(10).bytes(e.identifier),void 0!==e.dataContract&&p.BytesValue.encode({value:e.dataContract},t.uint32(18).fork()).join(),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=O();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identifier=n.bytes();continue;case 2:if(18!==o)break;i.dataContract=p.BytesValue.decode(n,n.uint32()).value;continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.YBp.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=O();return r.identifier=null!==(t=e.identifier)&&void 0!==t?t:new Uint8Array(0),r.dataContract=null!==(n=e.dataContract)&&void 0!==n?n:void 0,r}},t.bR2={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.dataContractEntries;r<i.length;r++){var o=i[r];t.YBp.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={dataContractEntries:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.dataContractEntries.push(t.YBp.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.bR2.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={dataContractEntries:[]};return r.dataContractEntries=(null===(n=e.dataContractEntries)||void 0===n?void 0:n.map((function(e){return t.YBp.fromPartial(e)})))||[],r}},t.u2P={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.dataContracts&&t.bR2.encode(e.dataContracts,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={dataContracts:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.dataContracts=t.bR2.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.u2P.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={dataContracts:void 0,proof:void 0,metadata:void 0};return n.dataContracts=void 0!==e.dataContracts&&null!==e.dataContracts?t.bR2.fromPartial(e.dataContracts):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.q6T={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.sOp.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.sOp.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.q6T.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.sOp.fromPartial(e.v0):void 0,n}},t.sOp={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.id.length&&t.uint32(10).bytes(e.id),void 0!==e.limit&&p.UInt32Value.encode({value:e.limit},t.uint32(18).fork()).join(),void 0!==e.offset&&p.UInt32Value.encode({value:e.offset},t.uint32(26).fork()).join(),"0"!==e.startAtMs&&t.uint32(32).uint64(e.startAtMs),!1!==e.prove&&t.uint32(40).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=M();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.id=n.bytes();continue;case 2:if(18!==o)break;i.limit=p.UInt32Value.decode(n,n.uint32()).value;continue;case 3:if(26!==o)break;i.offset=p.UInt32Value.decode(n,n.uint32()).value;continue;case 4:if(32!==o)break;i.startAtMs=n.uint64().toString();continue;case 5:if(40!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.sOp.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a=M();return a.id=null!==(t=e.id)&&void 0!==t?t:new Uint8Array(0),a.limit=null!==(n=e.limit)&&void 0!==n?n:void 0,a.offset=null!==(r=e.offset)&&void 0!==r?r:void 0,a.startAtMs=null!==(i=e.startAtMs)&&void 0!==i?i:"0",a.prove=null!==(o=e.prove)&&void 0!==o&&o,a}},t.YzH={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.kyM.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.kyM.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.YzH.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.kyM.fromPartial(e.v0):void 0,n}},t.kyM={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.dataContractHistory&&t.BR9.encode(e.dataContractHistory,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={dataContractHistory:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.dataContractHistory=t.BR9.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kyM.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={dataContractHistory:void 0,proof:void 0,metadata:void 0};return n.dataContractHistory=void 0!==e.dataContractHistory&&null!==e.dataContractHistory?t.BR9.fromPartial(e.dataContractHistory):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.vHc={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.date&&t.uint32(8).uint64(e.date),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=x();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.date=n.uint64().toString();continue;case 2:if(18!==o)break;i.value=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.vHc.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=x();return r.date=null!==(t=e.date)&&void 0!==t?t:"0",r.value=null!==(n=e.value)&&void 0!==n?n:new Uint8Array(0),r}},t.BR9={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.dataContractEntries;r<i.length;r++){var o=i[r];t.vHc.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={dataContractEntries:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.dataContractEntries.push(t.vHc.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.BR9.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={dataContractEntries:[]};return r.dataContractEntries=(null===(n=e.dataContractEntries)||void 0===n?void 0:n.map((function(e){return t.vHc.fromPartial(e)})))||[],r}},t._qG={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.wwQ.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.wwQ.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t._qG.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.wwQ.fromPartial(e.v0):void 0,n}},t.wwQ={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.dataContractId.length&&t.uint32(10).bytes(e.dataContractId),""!==e.documentType&&t.uint32(18).string(e.documentType),0!==e.where.length&&t.uint32(26).bytes(e.where),0!==e.orderBy.length&&t.uint32(34).bytes(e.orderBy),0!==e.limit&&t.uint32(40).uint32(e.limit),void 0!==e.startAfter&&t.uint32(50).bytes(e.startAfter),void 0!==e.startAt&&t.uint32(58).bytes(e.startAt),!1!==e.prove&&t.uint32(64).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=D();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.dataContractId=n.bytes();continue;case 2:if(18!==o)break;i.documentType=n.string();continue;case 3:if(26!==o)break;i.where=n.bytes();continue;case 4:if(34!==o)break;i.orderBy=n.bytes();continue;case 5:if(40!==o)break;i.limit=n.uint32();continue;case 6:if(50!==o)break;i.startAfter=n.bytes();continue;case 7:if(58!==o)break;i.startAt=n.bytes();continue;case 8:if(64!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.wwQ.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a,u,s,c=D();return c.dataContractId=null!==(t=e.dataContractId)&&void 0!==t?t:new Uint8Array(0),c.documentType=null!==(n=e.documentType)&&void 0!==n?n:"",c.where=null!==(r=e.where)&&void 0!==r?r:new Uint8Array(0),c.orderBy=null!==(i=e.orderBy)&&void 0!==i?i:new Uint8Array(0),c.limit=null!==(o=e.limit)&&void 0!==o?o:0,c.startAfter=null!==(a=e.startAfter)&&void 0!==a?a:void 0,c.startAt=null!==(u=e.startAt)&&void 0!==u?u:void 0,c.prove=null!==(s=e.prove)&&void 0!==s&&s,c}},t.cLn={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.IK.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.IK.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.cLn.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.IK.fromPartial(e.v0):void 0,n}},t.IK={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.documents&&t.P_r.encode(e.documents,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={documents:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.documents=t.P_r.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.IK.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={documents:void 0,proof:void 0,metadata:void 0};return n.documents=void 0!==e.documents&&null!==e.documents?t.P_r.fromPartial(e.documents):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.P_r={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.documents;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={documents:[]};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.documents.push(n.bytes());continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.P_r.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={documents:[]};return n.documents=(null===(t=e.documents)||void 0===t?void 0:t.map((function(e){return e})))||[],n}},t.H76={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.ShL.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.ShL.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.H76.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.ShL.fromPartial(e.v0):void 0,n}},t.ShL={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.publicKeyHash.length&&t.uint32(10).bytes(e.publicKeyHash),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=W();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.publicKeyHash=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.ShL.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=W();return r.publicKeyHash=null!==(t=e.publicKeyHash)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.dFH={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.kj3.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.kj3.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.dFH.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.kj3.fromPartial(e.v0):void 0,n}},t.kj3={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identity&&n.uint32(10).bytes(e.identity),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identity:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identity=r.bytes();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kj3.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={identity:void 0,proof:void 0,metadata:void 0};return r.identity=null!==(n=e.identity)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.hvh={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.UgO.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.UgO.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.hvh.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.UgO.fromPartial(e.v0):void 0,n}},t.UgO={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.stateTransitionHash.length&&t.uint32(10).bytes(e.stateTransitionHash),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=F();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.stateTransitionHash=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.UgO.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=F();return r.stateTransitionHash=null!==(t=e.stateTransitionHash)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.ZMb={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.WSK.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.WSK.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ZMb.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.WSK.fromPartial(e.v0):void 0,n}},t.WSK={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.error&&t.Q2J.encode(e.error,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={error:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.error=t.Q2J.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.WSK.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={error:void 0,proof:void 0,metadata:void 0};return n.error=void 0!==e.error&&null!==e.error?t.Q2J.fromPartial(e.error):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.$l={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Asw.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Asw.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.$l.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Asw.fromPartial(e.v0):void 0,n}},t.Asw={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.height&&t.uint32(8).int32(e.height),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={height:0,prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.height=n.int32();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Asw.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={height:0,prove:!1};return r.height=null!==(t=e.height)&&void 0!==t?t:0,r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.zq$={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t._GF.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t._GF.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.zq$.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t._GF.fromPartial(e.v0):void 0,n}},t.sQ1={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),""!==e.maxBytes&&t.uint32(10).string(e.maxBytes),""!==e.maxGas&&t.uint32(18).string(e.maxGas),""!==e.timeIotaMs&&t.uint32(26).string(e.timeIotaMs),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={maxBytes:"",maxGas:"",timeIotaMs:""};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.maxBytes=n.string();continue;case 2:if(18!==o)break;i.maxGas=n.string();continue;case 3:if(26!==o)break;i.timeIotaMs=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.sQ1.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i={maxBytes:"",maxGas:"",timeIotaMs:""};return i.maxBytes=null!==(t=e.maxBytes)&&void 0!==t?t:"",i.maxGas=null!==(n=e.maxGas)&&void 0!==n?n:"",i.timeIotaMs=null!==(r=e.timeIotaMs)&&void 0!==r?r:"",i}},t.ao8={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),""!==e.maxAgeNumBlocks&&t.uint32(10).string(e.maxAgeNumBlocks),""!==e.maxAgeDuration&&t.uint32(18).string(e.maxAgeDuration),""!==e.maxBytes&&t.uint32(26).string(e.maxBytes),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={maxAgeNumBlocks:"",maxAgeDuration:"",maxBytes:""};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.maxAgeNumBlocks=n.string();continue;case 2:if(18!==o)break;i.maxAgeDuration=n.string();continue;case 3:if(26!==o)break;i.maxBytes=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.ao8.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i={maxAgeNumBlocks:"",maxAgeDuration:"",maxBytes:""};return i.maxAgeNumBlocks=null!==(t=e.maxAgeNumBlocks)&&void 0!==t?t:"",i.maxAgeDuration=null!==(n=e.maxAgeDuration)&&void 0!==n?n:"",i.maxBytes=null!==(r=e.maxBytes)&&void 0!==r?r:"",i}},t._GF={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.block&&t.sQ1.encode(e.block,n.uint32(10).fork()).join(),void 0!==e.evidence&&t.ao8.encode(e.evidence,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={block:void 0,evidence:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.block=t.sQ1.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.evidence=t.ao8.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t._GF.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={block:void 0,evidence:void 0};return n.block=void 0!==e.block&&null!==e.block?t.sQ1.fromPartial(e.block):void 0,n.evidence=void 0!==e.evidence&&null!==e.evidence?t.ao8.fromPartial(e.evidence):void 0,n}},t.fDp={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.qd0.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.qd0.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.fDp.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.qd0.fromPartial(e.v0):void 0,n}},t.qd0={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),!1!==e.prove&&t.uint32(8).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.qd0.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={prove:!1};return n.prove=null!==(t=e.prove)&&void 0!==t&&t,n}},t.BZ8={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.ucP.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.ucP.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.BZ8.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.ucP.fromPartial(e.v0):void 0,n}},t.ucP={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.versions&&t.cFY.encode(e.versions,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={versions:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.versions=t.cFY.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ucP.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={versions:void 0,proof:void 0,metadata:void 0};return n.versions=void 0!==e.versions&&null!==e.versions?t.cFY.fromPartial(e.versions):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.cFY={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.versions;r<i.length;r++){var o=i[r];t.rN9.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={versions:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.versions.push(t.rN9.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.cFY.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={versions:[]};return r.versions=(null===(n=e.versions)||void 0===n?void 0:n.map((function(e){return t.rN9.fromPartial(e)})))||[],r}},t.rN9={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.versionNumber&&t.uint32(8).uint32(e.versionNumber),0!==e.voteCount&&t.uint32(16).uint32(e.voteCount),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={versionNumber:0,voteCount:0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.versionNumber=n.uint32();continue;case 2:if(16!==o)break;i.voteCount=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.rN9.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={versionNumber:0,voteCount:0};return r.versionNumber=null!==(t=e.versionNumber)&&void 0!==t?t:0,r.voteCount=null!==(n=e.voteCount)&&void 0!==n?n:0,r}},t.YiO={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.UU.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.UU.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.YiO.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.UU.fromPartial(e.v0):void 0,n}},t.UU={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.startProTxHash.length&&t.uint32(10).bytes(e.startProTxHash),0!==e.count&&t.uint32(16).uint32(e.count),!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=V();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.startProTxHash=n.bytes();continue;case 2:if(16!==o)break;i.count=n.uint32();continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.UU.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=V();return i.startProTxHash=null!==(t=e.startProTxHash)&&void 0!==t?t:new Uint8Array(0),i.count=null!==(n=e.count)&&void 0!==n?n:0,i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.GDv={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mH2.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mH2.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.GDv.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mH2.fromPartial(e.v0):void 0,n}},t.mH2={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.versions&&t.EIb.encode(e.versions,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={versions:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.versions=t.EIb.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.mH2.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={versions:void 0,proof:void 0,metadata:void 0};return n.versions=void 0!==e.versions&&null!==e.versions?t.EIb.fromPartial(e.versions):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.EIb={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.versionSignals;r<i.length;r++){var o=i[r];t.FYb.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={versionSignals:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.versionSignals.push(t.FYb.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.EIb.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={versionSignals:[]};return r.versionSignals=(null===(n=e.versionSignals)||void 0===n?void 0:n.map((function(e){return t.FYb.fromPartial(e)})))||[],r}},t.FYb={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.proTxHash.length&&t.uint32(10).bytes(e.proTxHash),0!==e.version&&t.uint32(16).uint32(e.version),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=H();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.proTxHash=n.bytes();continue;case 2:if(16!==o)break;i.version=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.FYb.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=H();return r.proTxHash=null!==(t=e.proTxHash)&&void 0!==t?t:new Uint8Array(0),r.version=null!==(n=e.version)&&void 0!==n?n:0,r}},t.GDk={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Qi4.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Qi4.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.GDk.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Qi4.fromPartial(e.v0):void 0,n}},t.Qi4={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),void 0!==e.startEpoch&&p.UInt32Value.encode({value:e.startEpoch},t.uint32(10).fork()).join(),0!==e.count&&t.uint32(16).uint32(e.count),!1!==e.ascending&&t.uint32(24).bool(e.ascending),!1!==e.prove&&t.uint32(32).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={startEpoch:void 0,count:0,ascending:!1,prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.startEpoch=p.UInt32Value.decode(n,n.uint32()).value;continue;case 2:if(16!==o)break;i.count=n.uint32();continue;case 3:if(24!==o)break;i.ascending=n.bool();continue;case 4:if(32!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Qi4.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o={startEpoch:void 0,count:0,ascending:!1,prove:!1};return o.startEpoch=null!==(t=e.startEpoch)&&void 0!==t?t:void 0,o.count=null!==(n=e.count)&&void 0!==n?n:0,o.ascending=null!==(r=e.ascending)&&void 0!==r&&r,o.prove=null!==(i=e.prove)&&void 0!==i&&i,o}},t.iFu={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.K57.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.K57.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.iFu.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.K57.fromPartial(e.v0):void 0,n}},t.K57={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.epochs&&t.z9d.encode(e.epochs,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={epochs:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.epochs=t.z9d.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.K57.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={epochs:void 0,proof:void 0,metadata:void 0};return n.epochs=void 0!==e.epochs&&null!==e.epochs?t.z9d.fromPartial(e.epochs):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.z9d={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.epochInfos;r<i.length;r++){var o=i[r];t.uiG.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={epochInfos:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.epochInfos.push(t.uiG.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.z9d.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={epochInfos:[]};return r.epochInfos=(null===(n=e.epochInfos)||void 0===n?void 0:n.map((function(e){return t.uiG.fromPartial(e)})))||[],r}},t.uiG={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.number&&t.uint32(8).uint32(e.number),"0"!==e.firstBlockHeight&&t.uint32(16).uint64(e.firstBlockHeight),0!==e.firstCoreBlockHeight&&t.uint32(24).uint32(e.firstCoreBlockHeight),"0"!==e.startTime&&t.uint32(32).uint64(e.startTime),0!==e.feeMultiplier&&t.uint32(41).double(e.feeMultiplier),0!==e.protocolVersion&&t.uint32(48).uint32(e.protocolVersion),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={number:0,firstBlockHeight:"0",firstCoreBlockHeight:0,startTime:"0",feeMultiplier:0,protocolVersion:0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.number=n.uint32();continue;case 2:if(16!==o)break;i.firstBlockHeight=n.uint64().toString();continue;case 3:if(24!==o)break;i.firstCoreBlockHeight=n.uint32();continue;case 4:if(32!==o)break;i.startTime=n.uint64().toString();continue;case 5:if(41!==o)break;i.feeMultiplier=n.double();continue;case 6:if(48!==o)break;i.protocolVersion=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.uiG.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a,u={number:0,firstBlockHeight:"0",firstCoreBlockHeight:0,startTime:"0",feeMultiplier:0,protocolVersion:0};return u.number=null!==(t=e.number)&&void 0!==t?t:0,u.firstBlockHeight=null!==(n=e.firstBlockHeight)&&void 0!==n?n:"0",u.firstCoreBlockHeight=null!==(r=e.firstCoreBlockHeight)&&void 0!==r?r:0,u.startTime=null!==(i=e.startTime)&&void 0!==i?i:"0",u.feeMultiplier=null!==(o=e.feeMultiplier)&&void 0!==o?o:0,u.protocolVersion=null!==(a=e.protocolVersion)&&void 0!==a?a:0,u}},t.iJe={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.kGC.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.kGC.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.iJe.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.kGC.fromPartial(e.v0):void 0,n}},t.kGC={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),0!==e.contractId.length&&n.uint32(10).bytes(e.contractId),""!==e.documentTypeName&&n.uint32(18).string(e.documentTypeName),""!==e.indexName&&n.uint32(26).string(e.indexName);for(var r=0,i=e.startIndexValues;r<i.length;r++){var o=i[r];n.uint32(34).bytes(o)}for(var a=0,u=e.endIndexValues;a<u.length;a++)o=u[a],n.uint32(42).bytes(o);return void 0!==e.startAtValueInfo&&t.BMy.encode(e.startAtValueInfo,n.uint32(50).fork()).join(),void 0!==e.count&&n.uint32(56).uint32(e.count),!1!==e.orderAscending&&n.uint32(64).bool(e.orderAscending),!1!==e.prove&&n.uint32(72).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=q();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contractId=r.bytes();continue;case 2:if(18!==a)break;o.documentTypeName=r.string();continue;case 3:if(26!==a)break;o.indexName=r.string();continue;case 4:if(34!==a)break;o.startIndexValues.push(r.bytes());continue;case 5:if(42!==a)break;o.endIndexValues.push(r.bytes());continue;case 6:if(50!==a)break;o.startAtValueInfo=t.BMy.decode(r,r.uint32());continue;case 7:if(56!==a)break;o.count=r.uint32();continue;case 8:if(64!==a)break;o.orderAscending=r.bool();continue;case 9:if(72!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kGC.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a,u,s,c,d=q();return d.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),d.documentTypeName=null!==(r=e.documentTypeName)&&void 0!==r?r:"",d.indexName=null!==(i=e.indexName)&&void 0!==i?i:"",d.startIndexValues=(null===(o=e.startIndexValues)||void 0===o?void 0:o.map((function(e){return e})))||[],d.endIndexValues=(null===(a=e.endIndexValues)||void 0===a?void 0:a.map((function(e){return e})))||[],d.startAtValueInfo=void 0!==e.startAtValueInfo&&null!==e.startAtValueInfo?t.BMy.fromPartial(e.startAtValueInfo):void 0,d.count=null!==(u=e.count)&&void 0!==u?u:void 0,d.orderAscending=null!==(s=e.orderAscending)&&void 0!==s&&s,d.prove=null!==(c=e.prove)&&void 0!==c&&c,d}},t.BMy={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.startValue.length&&t.uint32(10).bytes(e.startValue),!1!==e.startValueIncluded&&t.uint32(16).bool(e.startValueIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=G();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.startValue=n.bytes();continue;case 2:if(16!==o)break;i.startValueIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.BMy.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=G();return r.startValue=null!==(t=e.startValue)&&void 0!==t?t:new Uint8Array(0),r.startValueIncluded=null!==(n=e.startValueIncluded)&&void 0!==n&&n,r}},t.Qct={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.yxr.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.yxr.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Qct.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.yxr.fromPartial(e.v0):void 0,n}},t.yxr={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.contestedResourceValues&&t.Qgs.encode(e.contestedResourceValues,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={contestedResourceValues:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contestedResourceValues=t.Qgs.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.yxr.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={contestedResourceValues:void 0,proof:void 0,metadata:void 0};return n.contestedResourceValues=void 0!==e.contestedResourceValues&&null!==e.contestedResourceValues?t.Qgs.fromPartial(e.contestedResourceValues):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.Qgs={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.contestedResourceValues;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={contestedResourceValues:[]};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.contestedResourceValues.push(n.bytes());continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Qgs.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={contestedResourceValues:[]};return n.contestedResourceValues=(null===(t=e.contestedResourceValues)||void 0===t?void 0:t.map((function(e){return e})))||[],n}},t.A3R={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mzz.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mzz.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.A3R.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mzz.fromPartial(e.v0):void 0,n}},t.mzz={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.startTimeInfo&&t.hSI.encode(e.startTimeInfo,n.uint32(10).fork()).join(),void 0!==e.endTimeInfo&&t.s9X.encode(e.endTimeInfo,n.uint32(18).fork()).join(),void 0!==e.limit&&n.uint32(24).uint32(e.limit),void 0!==e.offset&&n.uint32(32).uint32(e.offset),!1!==e.ascending&&n.uint32(40).bool(e.ascending),!1!==e.prove&&n.uint32(48).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={startTimeInfo:void 0,endTimeInfo:void 0,limit:void 0,offset:void 0,ascending:!1,prove:!1};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.startTimeInfo=t.hSI.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.endTimeInfo=t.s9X.decode(r,r.uint32());continue;case 3:if(24!==a)break;o.limit=r.uint32();continue;case 4:if(32!==a)break;o.offset=r.uint32();continue;case 5:if(40!==a)break;o.ascending=r.bool();continue;case 6:if(48!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.mzz.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a={startTimeInfo:void 0,endTimeInfo:void 0,limit:void 0,offset:void 0,ascending:!1,prove:!1};return a.startTimeInfo=void 0!==e.startTimeInfo&&null!==e.startTimeInfo?t.hSI.fromPartial(e.startTimeInfo):void 0,a.endTimeInfo=void 0!==e.endTimeInfo&&null!==e.endTimeInfo?t.s9X.fromPartial(e.endTimeInfo):void 0,a.limit=null!==(n=e.limit)&&void 0!==n?n:void 0,a.offset=null!==(r=e.offset)&&void 0!==r?r:void 0,a.ascending=null!==(i=e.ascending)&&void 0!==i&&i,a.prove=null!==(o=e.prove)&&void 0!==o&&o,a}},t.hSI={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.startTimeMs&&t.uint32(8).uint64(e.startTimeMs),!1!==e.startTimeIncluded&&t.uint32(16).bool(e.startTimeIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={startTimeMs:"0",startTimeIncluded:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.startTimeMs=n.uint64().toString();continue;case 2:if(16!==o)break;i.startTimeIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.hSI.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={startTimeMs:"0",startTimeIncluded:!1};return r.startTimeMs=null!==(t=e.startTimeMs)&&void 0!==t?t:"0",r.startTimeIncluded=null!==(n=e.startTimeIncluded)&&void 0!==n&&n,r}},t.s9X={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.endTimeMs&&t.uint32(8).uint64(e.endTimeMs),!1!==e.endTimeIncluded&&t.uint32(16).bool(e.endTimeIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={endTimeMs:"0",endTimeIncluded:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.endTimeMs=n.uint64().toString();continue;case 2:if(16!==o)break;i.endTimeIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.s9X.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={endTimeMs:"0",endTimeIncluded:!1};return r.endTimeMs=null!==(t=e.endTimeMs)&&void 0!==t?t:"0",r.endTimeIncluded=null!==(n=e.endTimeIncluded)&&void 0!==n&&n,r}},t.qq9={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.kyv.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.kyv.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.qq9.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.kyv.fromPartial(e.v0):void 0,n}},t.kyv={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.votePollsByTimestamps&&t.tMS.encode(e.votePollsByTimestamps,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={votePollsByTimestamps:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.votePollsByTimestamps=t.tMS.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kyv.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={votePollsByTimestamps:void 0,proof:void 0,metadata:void 0};return n.votePollsByTimestamps=void 0!==e.votePollsByTimestamps&&null!==e.votePollsByTimestamps?t.tMS.fromPartial(e.votePollsByTimestamps):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.O6S={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),"0"!==e.timestamp&&t.uint32(8).uint64(e.timestamp);for(var n=0,r=e.serializedVotePolls;n<r.length;n++){var i=r[n];t.uint32(18).bytes(i)}return t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={timestamp:"0",serializedVotePolls:[]};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.timestamp=n.uint64().toString();continue;case 2:if(18!==o)break;i.serializedVotePolls.push(n.bytes());continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.O6S.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={timestamp:"0",serializedVotePolls:[]};return r.timestamp=null!==(t=e.timestamp)&&void 0!==t?t:"0",r.serializedVotePolls=(null===(n=e.serializedVotePolls)||void 0===n?void 0:n.map((function(e){return e})))||[],r}},t.tMS={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.votePollsByTimestamps;r<i.length;r++){var o=i[r];t.O6S.encode(o,n.uint32(10).fork()).join()}return!1!==e.finishedResults&&n.uint32(16).bool(e.finishedResults),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={votePollsByTimestamps:[],finishedResults:!1};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.votePollsByTimestamps.push(t.O6S.decode(r,r.uint32()));continue;case 2:if(16!==a)break;o.finishedResults=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.tMS.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i={votePollsByTimestamps:[],finishedResults:!1};return i.votePollsByTimestamps=(null===(n=e.votePollsByTimestamps)||void 0===n?void 0:n.map((function(e){return t.O6S.fromPartial(e)})))||[],i.finishedResults=null!==(r=e.finishedResults)&&void 0!==r&&r,i}},t.ur$={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.w2G.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.w2G.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ur$.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.w2G.fromPartial(e.v0):void 0,n}},t.w2G={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),0!==e.contractId.length&&n.uint32(10).bytes(e.contractId),""!==e.documentTypeName&&n.uint32(18).string(e.documentTypeName),""!==e.indexName&&n.uint32(26).string(e.indexName);for(var r=0,i=e.indexValues;r<i.length;r++){var o=i[r];n.uint32(34).bytes(o)}return 0!==e.resultType&&n.uint32(40).int32(e.resultType),!1!==e.allowIncludeLockedAndAbstainingVoteTally&&n.uint32(48).bool(e.allowIncludeLockedAndAbstainingVoteTally),void 0!==e.startAtIdentifierInfo&&t.hh1.encode(e.startAtIdentifierInfo,n.uint32(58).fork()).join(),void 0!==e.count&&n.uint32(64).uint32(e.count),!1!==e.prove&&n.uint32(72).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=K();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contractId=r.bytes();continue;case 2:if(18!==a)break;o.documentTypeName=r.string();continue;case 3:if(26!==a)break;o.indexName=r.string();continue;case 4:if(34!==a)break;o.indexValues.push(r.bytes());continue;case 5:if(40!==a)break;o.resultType=r.int32();continue;case 6:if(48!==a)break;o.allowIncludeLockedAndAbstainingVoteTally=r.bool();continue;case 7:if(58!==a)break;o.startAtIdentifierInfo=t.hh1.decode(r,r.uint32());continue;case 8:if(64!==a)break;o.count=r.uint32();continue;case 9:if(72!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.w2G.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a,u,s,c,d=K();return d.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),d.documentTypeName=null!==(r=e.documentTypeName)&&void 0!==r?r:"",d.indexName=null!==(i=e.indexName)&&void 0!==i?i:"",d.indexValues=(null===(o=e.indexValues)||void 0===o?void 0:o.map((function(e){return e})))||[],d.resultType=null!==(a=e.resultType)&&void 0!==a?a:0,d.allowIncludeLockedAndAbstainingVoteTally=null!==(u=e.allowIncludeLockedAndAbstainingVoteTally)&&void 0!==u&&u,d.startAtIdentifierInfo=void 0!==e.startAtIdentifierInfo&&null!==e.startAtIdentifierInfo?t.hh1.fromPartial(e.startAtIdentifierInfo):void 0,d.count=null!==(s=e.count)&&void 0!==s?s:void 0,d.prove=null!==(c=e.prove)&&void 0!==c&&c,d}},t.hh1={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.startIdentifier.length&&t.uint32(10).bytes(e.startIdentifier),!1!==e.startIdentifierIncluded&&t.uint32(16).bool(e.startIdentifierIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=$();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.startIdentifier=n.bytes();continue;case 2:if(16!==o)break;i.startIdentifierIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.hh1.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=$();return r.startIdentifier=null!==(t=e.startIdentifier)&&void 0!==t?t:new Uint8Array(0),r.startIdentifierIncluded=null!==(n=e.startIdentifierIncluded)&&void 0!==n&&n,r}},t.sgL={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.YCl.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.YCl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.sgL.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.YCl.fromPartial(e.v0):void 0,n}},t.YCl={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.contestedResourceContenders&&t.rSh.encode(e.contestedResourceContenders,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={contestedResourceContenders:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contestedResourceContenders=t.rSh.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.YCl.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={contestedResourceContenders:void 0,proof:void 0,metadata:void 0};return n.contestedResourceContenders=void 0!==e.contestedResourceContenders&&null!==e.contestedResourceContenders?t.rSh.fromPartial(e.contestedResourceContenders):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.lAg={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.finishedVoteOutcome&&t.uint32(8).int32(e.finishedVoteOutcome),void 0!==e.wonByIdentityId&&t.uint32(18).bytes(e.wonByIdentityId),"0"!==e.finishedAtBlockHeight&&t.uint32(24).uint64(e.finishedAtBlockHeight),0!==e.finishedAtCoreBlockHeight&&t.uint32(32).uint32(e.finishedAtCoreBlockHeight),"0"!==e.finishedAtBlockTimeMs&&t.uint32(40).uint64(e.finishedAtBlockTimeMs),0!==e.finishedAtEpoch&&t.uint32(48).uint32(e.finishedAtEpoch),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={finishedVoteOutcome:0,wonByIdentityId:void 0,finishedAtBlockHeight:"0",finishedAtCoreBlockHeight:0,finishedAtBlockTimeMs:"0",finishedAtEpoch:0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.finishedVoteOutcome=n.int32();continue;case 2:if(18!==o)break;i.wonByIdentityId=n.bytes();continue;case 3:if(24!==o)break;i.finishedAtBlockHeight=n.uint64().toString();continue;case 4:if(32!==o)break;i.finishedAtCoreBlockHeight=n.uint32();continue;case 5:if(40!==o)break;i.finishedAtBlockTimeMs=n.uint64().toString();continue;case 6:if(48!==o)break;i.finishedAtEpoch=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.lAg.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a,u={finishedVoteOutcome:0,wonByIdentityId:void 0,finishedAtBlockHeight:"0",finishedAtCoreBlockHeight:0,finishedAtBlockTimeMs:"0",finishedAtEpoch:0};return u.finishedVoteOutcome=null!==(t=e.finishedVoteOutcome)&&void 0!==t?t:0,u.wonByIdentityId=null!==(n=e.wonByIdentityId)&&void 0!==n?n:void 0,u.finishedAtBlockHeight=null!==(r=e.finishedAtBlockHeight)&&void 0!==r?r:"0",u.finishedAtCoreBlockHeight=null!==(i=e.finishedAtCoreBlockHeight)&&void 0!==i?i:0,u.finishedAtBlockTimeMs=null!==(o=e.finishedAtBlockTimeMs)&&void 0!==o?o:"0",u.finishedAtEpoch=null!==(a=e.finishedAtEpoch)&&void 0!==a?a:0,u}},t.rSh={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.contenders;r<i.length;r++){var o=i[r];t.J5y.encode(o,n.uint32(10).fork()).join()}return void 0!==e.abstainVoteTally&&n.uint32(16).uint32(e.abstainVoteTally),void 0!==e.lockVoteTally&&n.uint32(24).uint32(e.lockVoteTally),void 0!==e.finishedVoteInfo&&t.lAg.encode(e.finishedVoteInfo,n.uint32(34).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={contenders:[],abstainVoteTally:void 0,lockVoteTally:void 0,finishedVoteInfo:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contenders.push(t.J5y.decode(r,r.uint32()));continue;case 2:if(16!==a)break;o.abstainVoteTally=r.uint32();continue;case 3:if(24!==a)break;o.lockVoteTally=r.uint32();continue;case 4:if(34!==a)break;o.finishedVoteInfo=t.lAg.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.rSh.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o={contenders:[],abstainVoteTally:void 0,lockVoteTally:void 0,finishedVoteInfo:void 0};return o.contenders=(null===(n=e.contenders)||void 0===n?void 0:n.map((function(e){return t.J5y.fromPartial(e)})))||[],o.abstainVoteTally=null!==(r=e.abstainVoteTally)&&void 0!==r?r:void 0,o.lockVoteTally=null!==(i=e.lockVoteTally)&&void 0!==i?i:void 0,o.finishedVoteInfo=void 0!==e.finishedVoteInfo&&null!==e.finishedVoteInfo?t.lAg.fromPartial(e.finishedVoteInfo):void 0,o}},t.J5y={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.identifier.length&&t.uint32(10).bytes(e.identifier),void 0!==e.voteCount&&t.uint32(16).uint32(e.voteCount),void 0!==e.document&&t.uint32(26).bytes(e.document),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Y();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identifier=n.bytes();continue;case 2:if(16!==o)break;i.voteCount=n.uint32();continue;case 3:if(26!==o)break;i.document=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.J5y.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=Y();return i.identifier=null!==(t=e.identifier)&&void 0!==t?t:new Uint8Array(0),i.voteCount=null!==(n=e.voteCount)&&void 0!==n?n:void 0,i.document=null!==(r=e.document)&&void 0!==r?r:void 0,i}},t.pSr={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.yye.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.yye.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.pSr.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.yye.fromPartial(e.v0):void 0,n}},t.yye={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),0!==e.contractId.length&&n.uint32(10).bytes(e.contractId),""!==e.documentTypeName&&n.uint32(18).string(e.documentTypeName),""!==e.indexName&&n.uint32(26).string(e.indexName);for(var r=0,i=e.indexValues;r<i.length;r++){var o=i[r];n.uint32(34).bytes(o)}return 0!==e.contestantId.length&&n.uint32(42).bytes(e.contestantId),void 0!==e.startAtIdentifierInfo&&t.JqM.encode(e.startAtIdentifierInfo,n.uint32(50).fork()).join(),void 0!==e.count&&n.uint32(56).uint32(e.count),!1!==e.orderAscending&&n.uint32(64).bool(e.orderAscending),!1!==e.prove&&n.uint32(72).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=z();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contractId=r.bytes();continue;case 2:if(18!==a)break;o.documentTypeName=r.string();continue;case 3:if(26!==a)break;o.indexName=r.string();continue;case 4:if(34!==a)break;o.indexValues.push(r.bytes());continue;case 5:if(42!==a)break;o.contestantId=r.bytes();continue;case 6:if(50!==a)break;o.startAtIdentifierInfo=t.JqM.decode(r,r.uint32());continue;case 7:if(56!==a)break;o.count=r.uint32();continue;case 8:if(64!==a)break;o.orderAscending=r.bool();continue;case 9:if(72!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.yye.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a,u,s,c,d=z();return d.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),d.documentTypeName=null!==(r=e.documentTypeName)&&void 0!==r?r:"",d.indexName=null!==(i=e.indexName)&&void 0!==i?i:"",d.indexValues=(null===(o=e.indexValues)||void 0===o?void 0:o.map((function(e){return e})))||[],d.contestantId=null!==(a=e.contestantId)&&void 0!==a?a:new Uint8Array(0),d.startAtIdentifierInfo=void 0!==e.startAtIdentifierInfo&&null!==e.startAtIdentifierInfo?t.JqM.fromPartial(e.startAtIdentifierInfo):void 0,d.count=null!==(u=e.count)&&void 0!==u?u:void 0,d.orderAscending=null!==(s=e.orderAscending)&&void 0!==s&&s,d.prove=null!==(c=e.prove)&&void 0!==c&&c,d}},t.JqM={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.startIdentifier.length&&t.uint32(10).bytes(e.startIdentifier),!1!==e.startIdentifierIncluded&&t.uint32(16).bool(e.startIdentifierIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=X();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.startIdentifier=n.bytes();continue;case 2:if(16!==o)break;i.startIdentifierIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.JqM.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=X();return r.startIdentifier=null!==(t=e.startIdentifier)&&void 0!==t?t:new Uint8Array(0),r.startIdentifierIncluded=null!==(n=e.startIdentifierIncluded)&&void 0!==n&&n,r}},t.r0j={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mDO.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mDO.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.r0j.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mDO.fromPartial(e.v0):void 0,n}},t.mDO={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.contestedResourceVoters&&t.jE7.encode(e.contestedResourceVoters,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={contestedResourceVoters:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contestedResourceVoters=t.jE7.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.mDO.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={contestedResourceVoters:void 0,proof:void 0,metadata:void 0};return n.contestedResourceVoters=void 0!==e.contestedResourceVoters&&null!==e.contestedResourceVoters?t.jE7.fromPartial(e.contestedResourceVoters):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.jE7={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.voters;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return!1!==e.finishedResults&&t.uint32(16).bool(e.finishedResults),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={voters:[],finishedResults:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.voters.push(n.bytes());continue;case 2:if(16!==o)break;i.finishedResults=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.jE7.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={voters:[],finishedResults:!1};return r.voters=(null===(t=e.voters)||void 0===t?void 0:t.map((function(e){return e})))||[],r.finishedResults=null!==(n=e.finishedResults)&&void 0!==n&&n,r}},t.QPq={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Yuy.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Yuy.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.QPq.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Yuy.fromPartial(e.v0):void 0,n}},t.Yuy={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.identityId.length&&n.uint32(10).bytes(e.identityId),void 0!==e.limit&&p.UInt32Value.encode({value:e.limit},n.uint32(18).fork()).join(),void 0!==e.offset&&p.UInt32Value.encode({value:e.offset},n.uint32(26).fork()).join(),!1!==e.orderAscending&&n.uint32(32).bool(e.orderAscending),void 0!==e.startAtVotePollIdInfo&&t.eSZ.encode(e.startAtVotePollIdInfo,n.uint32(42).fork()).join(),!1!==e.prove&&n.uint32(48).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=Q();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identityId=r.bytes();continue;case 2:if(18!==a)break;o.limit=p.UInt32Value.decode(r,r.uint32()).value;continue;case 3:if(26!==a)break;o.offset=p.UInt32Value.decode(r,r.uint32()).value;continue;case 4:if(32!==a)break;o.orderAscending=r.bool();continue;case 5:if(42!==a)break;o.startAtVotePollIdInfo=t.eSZ.decode(r,r.uint32());continue;case 6:if(48!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Yuy.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a,u=Q();return u.identityId=null!==(n=e.identityId)&&void 0!==n?n:new Uint8Array(0),u.limit=null!==(r=e.limit)&&void 0!==r?r:void 0,u.offset=null!==(i=e.offset)&&void 0!==i?i:void 0,u.orderAscending=null!==(o=e.orderAscending)&&void 0!==o&&o,u.startAtVotePollIdInfo=void 0!==e.startAtVotePollIdInfo&&null!==e.startAtVotePollIdInfo?t.eSZ.fromPartial(e.startAtVotePollIdInfo):void 0,u.prove=null!==(a=e.prove)&&void 0!==a&&a,u}},t.eSZ={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.startAtPollIdentifier.length&&t.uint32(10).bytes(e.startAtPollIdentifier),!1!==e.startPollIdentifierIncluded&&t.uint32(16).bool(e.startPollIdentifierIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=J();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.startAtPollIdentifier=n.bytes();continue;case 2:if(16!==o)break;i.startPollIdentifierIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.eSZ.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=J();return r.startAtPollIdentifier=null!==(t=e.startAtPollIdentifier)&&void 0!==t?t:new Uint8Array(0),r.startPollIdentifierIncluded=null!==(n=e.startPollIdentifierIncluded)&&void 0!==n&&n,r}},t.ErQ={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.s4p.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.s4p.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ErQ.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.s4p.fromPartial(e.v0):void 0,n}},t.s4p={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.votes&&t.NlM.encode(e.votes,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={votes:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.votes=t.NlM.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.s4p.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={votes:void 0,proof:void 0,metadata:void 0};return n.votes=void 0!==e.votes&&null!==e.votes?t.NlM.fromPartial(e.votes):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.NlM={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.contestedResourceIdentityVotes;r<i.length;r++){var o=i[r];t.WrM.encode(o,n.uint32(10).fork()).join()}return!1!==e.finishedResults&&n.uint32(16).bool(e.finishedResults),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={contestedResourceIdentityVotes:[],finishedResults:!1};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contestedResourceIdentityVotes.push(t.WrM.decode(r,r.uint32()));continue;case 2:if(16!==a)break;o.finishedResults=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.NlM.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i={contestedResourceIdentityVotes:[],finishedResults:!1};return i.contestedResourceIdentityVotes=(null===(n=e.contestedResourceIdentityVotes)||void 0===n?void 0:n.map((function(e){return t.WrM.fromPartial(e)})))||[],i.finishedResults=null!==(r=e.finishedResults)&&void 0!==r&&r,i}},t.mCq={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.voteChoiceType&&t.uint32(8).int32(e.voteChoiceType),void 0!==e.identityId&&t.uint32(18).bytes(e.identityId),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={voteChoiceType:0,identityId:void 0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.voteChoiceType=n.int32();continue;case 2:if(18!==o)break;i.identityId=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.mCq.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={voteChoiceType:0,identityId:void 0};return r.voteChoiceType=null!==(t=e.voteChoiceType)&&void 0!==t?t:0,r.identityId=null!==(n=e.identityId)&&void 0!==n?n:void 0,r}},t.WrM={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),0!==e.contractId.length&&n.uint32(10).bytes(e.contractId),""!==e.documentTypeName&&n.uint32(18).string(e.documentTypeName);for(var r=0,i=e.serializedIndexStorageValues;r<i.length;r++){var o=i[r];n.uint32(26).bytes(o)}return void 0!==e.voteChoice&&t.mCq.encode(e.voteChoice,n.uint32(34).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=Z();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contractId=r.bytes();continue;case 2:if(18!==a)break;o.documentTypeName=r.string();continue;case 3:if(26!==a)break;o.serializedIndexStorageValues.push(r.bytes());continue;case 4:if(34!==a)break;o.voteChoice=t.mCq.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.WrM.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o=Z();return o.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),o.documentTypeName=null!==(r=e.documentTypeName)&&void 0!==r?r:"",o.serializedIndexStorageValues=(null===(i=e.serializedIndexStorageValues)||void 0===i?void 0:i.map((function(e){return e})))||[],o.voteChoice=void 0!==e.voteChoice&&null!==e.voteChoice?t.mCq.fromPartial(e.voteChoice):void 0,o}},t.UwI={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.ke4.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.ke4.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.UwI.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.ke4.fromPartial(e.v0):void 0,n}},t.ke4={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.id.length&&t.uint32(10).bytes(e.id),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=ee();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.id=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.ke4.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=ee();return r.id=null!==(t=e.id)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.GfB={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.S9_.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.S9_.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.GfB.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.S9_.fromPartial(e.v0):void 0,n}},t.S9_={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.balance&&n.uint32(8).uint64(e.balance),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={balance:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.balance=r.uint64().toString();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.S9_.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={balance:void 0,proof:void 0,metadata:void 0};return r.balance=null!==(n=e.balance)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.Gqp={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.ImF.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.ImF.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Gqp.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.ImF.fromPartial(e.v0):void 0,n}},t.ImF={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),!1!==e.prove&&t.uint32(8).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.ImF.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={prove:!1};return n.prove=null!==(t=e.prove)&&void 0!==t&&t,n}},t.UHf={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.GFp.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.GFp.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.UHf.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.GFp.fromPartial(e.v0):void 0,n}},t.GFp={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.credits&&n.uint32(8).uint64(e.credits),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={credits:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.credits=r.uint64().toString();continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.GFp.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={credits:void 0,proof:void 0,metadata:void 0};return r.credits=null!==(n=e.credits)&&void 0!==n?n:void 0,r.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,r.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,r}},t.CHe={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.uzJ.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.uzJ.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.CHe.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.uzJ.fromPartial(e.v0):void 0,n}},t.uzJ={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.path;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}for(var o=0,a=e.keys;o<a.length;o++)i=a[o],t.uint32(18).bytes(i);return!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={path:[],keys:[],prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.path.push(n.bytes());continue;case 2:if(18!==o)break;i.keys.push(n.bytes());continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.uzJ.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i={path:[],keys:[],prove:!1};return i.path=(null===(t=e.path)||void 0===t?void 0:t.map((function(e){return e})))||[],i.keys=(null===(n=e.keys)||void 0===n?void 0:n.map((function(e){return e})))||[],i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.eV4={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.G$$.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.G$$.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.eV4.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.G$$.fromPartial(e.v0):void 0,n}},t.G$$={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.elements&&t.M4C.encode(e.elements,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={elements:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.elements=t.M4C.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.G$$.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={elements:void 0,proof:void 0,metadata:void 0};return n.elements=void 0!==e.elements&&null!==e.elements?t.M4C.fromPartial(e.elements):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.M4C={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.elements;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={elements:[]};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.elements.push(n.bytes());continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.M4C.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={elements:[]};return n.elements=(null===(t=e.elements)||void 0===t?void 0:t.map((function(e){return e})))||[],n}},t.kCY={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mrT.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mrT.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kCY.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mrT.fromPartial(e.v0):void 0,n}},t.mrT={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t;n.pos<r;){var i=n.uint32();if(4==(7&i)||0===i)break;n.skip(7&i)}return{}},create:function(e){return t.mrT.fromPartial(null!=e?e:{})},fromPartial:function(e){return{}}},t.mZy={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Ym.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Ym.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.mZy.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Ym.fromPartial(e.v0):void 0,n}},t.Ym={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.version&&t.HHp.encode(e.version,n.uint32(10).fork()).join(),void 0!==e.node&&t.nss.encode(e.node,n.uint32(18).fork()).join(),void 0!==e.chain&&t.cze.encode(e.chain,n.uint32(26).fork()).join(),void 0!==e.network&&t.LAk.encode(e.network,n.uint32(34).fork()).join(),void 0!==e.stateSync&&t.XED.encode(e.stateSync,n.uint32(42).fork()).join(),void 0!==e.time&&t.ssn.encode(e.time,n.uint32(50).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={version:void 0,node:void 0,chain:void 0,network:void 0,stateSync:void 0,time:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.version=t.HHp.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.node=t.nss.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.chain=t.cze.decode(r,r.uint32());continue;case 4:if(34!==a)break;o.network=t.LAk.decode(r,r.uint32());continue;case 5:if(42!==a)break;o.stateSync=t.XED.decode(r,r.uint32());continue;case 6:if(50!==a)break;o.time=t.ssn.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Ym.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={version:void 0,node:void 0,chain:void 0,network:void 0,stateSync:void 0,time:void 0};return n.version=void 0!==e.version&&null!==e.version?t.HHp.fromPartial(e.version):void 0,n.node=void 0!==e.node&&null!==e.node?t.nss.fromPartial(e.node):void 0,n.chain=void 0!==e.chain&&null!==e.chain?t.cze.fromPartial(e.chain):void 0,n.network=void 0!==e.network&&null!==e.network?t.LAk.fromPartial(e.network):void 0,n.stateSync=void 0!==e.stateSync&&null!==e.stateSync?t.XED.fromPartial(e.stateSync):void 0,n.time=void 0!==e.time&&null!==e.time?t.ssn.fromPartial(e.time):void 0,n}},t.HHp={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.software&&t.nSQ.encode(e.software,n.uint32(10).fork()).join(),void 0!==e.protocol&&t.M2p.encode(e.protocol,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={software:void 0,protocol:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.software=t.nSQ.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.protocol=t.M2p.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.HHp.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={software:void 0,protocol:void 0};return n.software=void 0!==e.software&&null!==e.software?t.nSQ.fromPartial(e.software):void 0,n.protocol=void 0!==e.protocol&&null!==e.protocol?t.M2p.fromPartial(e.protocol):void 0,n}},t.nSQ={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),""!==e.dapi&&t.uint32(10).string(e.dapi),void 0!==e.drive&&t.uint32(18).string(e.drive),void 0!==e.tenderdash&&t.uint32(26).string(e.tenderdash),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={dapi:"",drive:void 0,tenderdash:void 0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.dapi=n.string();continue;case 2:if(18!==o)break;i.drive=n.string();continue;case 3:if(26!==o)break;i.tenderdash=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.nSQ.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i={dapi:"",drive:void 0,tenderdash:void 0};return i.dapi=null!==(t=e.dapi)&&void 0!==t?t:"",i.drive=null!==(n=e.drive)&&void 0!==n?n:void 0,i.tenderdash=null!==(r=e.tenderdash)&&void 0!==r?r:void 0,i}},t.M2p={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.tenderdash&&t.fld.encode(e.tenderdash,n.uint32(10).fork()).join(),void 0!==e.drive&&t.lO.encode(e.drive,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tenderdash:void 0,drive:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tenderdash=t.fld.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.drive=t.lO.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.M2p.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={tenderdash:void 0,drive:void 0};return n.tenderdash=void 0!==e.tenderdash&&null!==e.tenderdash?t.fld.fromPartial(e.tenderdash):void 0,n.drive=void 0!==e.drive&&null!==e.drive?t.lO.fromPartial(e.drive):void 0,n}},t.fld={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.p2p&&t.uint32(8).uint32(e.p2p),0!==e.block&&t.uint32(16).uint32(e.block),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={p2p:0,block:0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.p2p=n.uint32();continue;case 2:if(16!==o)break;i.block=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.fld.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={p2p:0,block:0};return r.p2p=null!==(t=e.p2p)&&void 0!==t?t:0,r.block=null!==(n=e.block)&&void 0!==n?n:0,r}},t.lO={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.latest&&t.uint32(24).uint32(e.latest),0!==e.current&&t.uint32(32).uint32(e.current),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={latest:0,current:0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 3:if(24!==o)break;i.latest=n.uint32();continue;case 4:if(32!==o)break;i.current=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.lO.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={latest:0,current:0};return r.latest=null!==(t=e.latest)&&void 0!==t?t:0,r.current=null!==(n=e.current)&&void 0!==n?n:0,r}},t.ssn={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.local&&t.uint32(8).uint64(e.local),void 0!==e.block&&t.uint32(16).uint64(e.block),void 0!==e.genesis&&t.uint32(24).uint64(e.genesis),void 0!==e.epoch&&t.uint32(32).uint32(e.epoch),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={local:"0",block:void 0,genesis:void 0,epoch:void 0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.local=n.uint64().toString();continue;case 2:if(16!==o)break;i.block=n.uint64().toString();continue;case 3:if(24!==o)break;i.genesis=n.uint64().toString();continue;case 4:if(32!==o)break;i.epoch=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.ssn.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o={local:"0",block:void 0,genesis:void 0,epoch:void 0};return o.local=null!==(t=e.local)&&void 0!==t?t:"0",o.block=null!==(n=e.block)&&void 0!==n?n:void 0,o.genesis=null!==(r=e.genesis)&&void 0!==r?r:void 0,o.epoch=null!==(i=e.epoch)&&void 0!==i?i:void 0,o}},t.nss={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.id.length&&t.uint32(10).bytes(e.id),void 0!==e.proTxHash&&t.uint32(18).bytes(e.proTxHash),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=te();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.id=n.bytes();continue;case 2:if(18!==o)break;i.proTxHash=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.nss.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=te();return r.id=null!==(t=e.id)&&void 0!==t?t:new Uint8Array(0),r.proTxHash=null!==(n=e.proTxHash)&&void 0!==n?n:void 0,r}},t.cze={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),!1!==e.catchingUp&&t.uint32(8).bool(e.catchingUp),0!==e.latestBlockHash.length&&t.uint32(18).bytes(e.latestBlockHash),0!==e.latestAppHash.length&&t.uint32(26).bytes(e.latestAppHash),"0"!==e.latestBlockHeight&&t.uint32(32).uint64(e.latestBlockHeight),0!==e.earliestBlockHash.length&&t.uint32(42).bytes(e.earliestBlockHash),0!==e.earliestAppHash.length&&t.uint32(50).bytes(e.earliestAppHash),"0"!==e.earliestBlockHeight&&t.uint32(56).uint64(e.earliestBlockHeight),"0"!==e.maxPeerBlockHeight&&t.uint32(72).uint64(e.maxPeerBlockHeight),void 0!==e.coreChainLockedHeight&&t.uint32(80).uint32(e.coreChainLockedHeight),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=ne();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.catchingUp=n.bool();continue;case 2:if(18!==o)break;i.latestBlockHash=n.bytes();continue;case 3:if(26!==o)break;i.latestAppHash=n.bytes();continue;case 4:if(32!==o)break;i.latestBlockHeight=n.uint64().toString();continue;case 5:if(42!==o)break;i.earliestBlockHash=n.bytes();continue;case 6:if(50!==o)break;i.earliestAppHash=n.bytes();continue;case 7:if(56!==o)break;i.earliestBlockHeight=n.uint64().toString();continue;case 9:if(72!==o)break;i.maxPeerBlockHeight=n.uint64().toString();continue;case 10:if(80!==o)break;i.coreChainLockedHeight=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.cze.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a,u,s,c,d=ne();return d.catchingUp=null!==(t=e.catchingUp)&&void 0!==t&&t,d.latestBlockHash=null!==(n=e.latestBlockHash)&&void 0!==n?n:new Uint8Array(0),d.latestAppHash=null!==(r=e.latestAppHash)&&void 0!==r?r:new Uint8Array(0),d.latestBlockHeight=null!==(i=e.latestBlockHeight)&&void 0!==i?i:"0",d.earliestBlockHash=null!==(o=e.earliestBlockHash)&&void 0!==o?o:new Uint8Array(0),d.earliestAppHash=null!==(a=e.earliestAppHash)&&void 0!==a?a:new Uint8Array(0),d.earliestBlockHeight=null!==(u=e.earliestBlockHeight)&&void 0!==u?u:"0",d.maxPeerBlockHeight=null!==(s=e.maxPeerBlockHeight)&&void 0!==s?s:"0",d.coreChainLockedHeight=null!==(c=e.coreChainLockedHeight)&&void 0!==c?c:void 0,d}},t.LAk={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),""!==e.chainId&&t.uint32(10).string(e.chainId),0!==e.peersCount&&t.uint32(16).uint32(e.peersCount),!1!==e.listening&&t.uint32(24).bool(e.listening),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={chainId:"",peersCount:0,listening:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.chainId=n.string();continue;case 2:if(16!==o)break;i.peersCount=n.uint32();continue;case 3:if(24!==o)break;i.listening=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.LAk.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i={chainId:"",peersCount:0,listening:!1};return i.chainId=null!==(t=e.chainId)&&void 0!==t?t:"",i.peersCount=null!==(n=e.peersCount)&&void 0!==n?n:0,i.listening=null!==(r=e.listening)&&void 0!==r&&r,i}},t.XED={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.totalSyncedTime&&t.uint32(8).uint64(e.totalSyncedTime),"0"!==e.remainingTime&&t.uint32(16).uint64(e.remainingTime),0!==e.totalSnapshots&&t.uint32(24).uint32(e.totalSnapshots),"0"!==e.chunkProcessAvgTime&&t.uint32(32).uint64(e.chunkProcessAvgTime),"0"!==e.snapshotHeight&&t.uint32(40).uint64(e.snapshotHeight),"0"!==e.snapshotChunksCount&&t.uint32(48).uint64(e.snapshotChunksCount),"0"!==e.backfilledBlocks&&t.uint32(56).uint64(e.backfilledBlocks),"0"!==e.backfillBlocksTotal&&t.uint32(64).uint64(e.backfillBlocksTotal),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={totalSyncedTime:"0",remainingTime:"0",totalSnapshots:0,chunkProcessAvgTime:"0",snapshotHeight:"0",snapshotChunksCount:"0",backfilledBlocks:"0",backfillBlocksTotal:"0"};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.totalSyncedTime=n.uint64().toString();continue;case 2:if(16!==o)break;i.remainingTime=n.uint64().toString();continue;case 3:if(24!==o)break;i.totalSnapshots=n.uint32();continue;case 4:if(32!==o)break;i.chunkProcessAvgTime=n.uint64().toString();continue;case 5:if(40!==o)break;i.snapshotHeight=n.uint64().toString();continue;case 6:if(48!==o)break;i.snapshotChunksCount=n.uint64().toString();continue;case 7:if(56!==o)break;i.backfilledBlocks=n.uint64().toString();continue;case 8:if(64!==o)break;i.backfillBlocksTotal=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.XED.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a,u,s,c={totalSyncedTime:"0",remainingTime:"0",totalSnapshots:0,chunkProcessAvgTime:"0",snapshotHeight:"0",snapshotChunksCount:"0",backfilledBlocks:"0",backfillBlocksTotal:"0"};return c.totalSyncedTime=null!==(t=e.totalSyncedTime)&&void 0!==t?t:"0",c.remainingTime=null!==(n=e.remainingTime)&&void 0!==n?n:"0",c.totalSnapshots=null!==(r=e.totalSnapshots)&&void 0!==r?r:0,c.chunkProcessAvgTime=null!==(i=e.chunkProcessAvgTime)&&void 0!==i?i:"0",c.snapshotHeight=null!==(o=e.snapshotHeight)&&void 0!==o?o:"0",c.snapshotChunksCount=null!==(a=e.snapshotChunksCount)&&void 0!==a?a:"0",c.backfilledBlocks=null!==(u=e.backfilledBlocks)&&void 0!==u?u:"0",c.backfillBlocksTotal=null!==(s=e.backfillBlocksTotal)&&void 0!==s?s:"0",c}},t.TwU={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.SYo.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.SYo.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.TwU.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.SYo.fromPartial(e.v0):void 0,n}},t.SYo={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t;n.pos<r;){var i=n.uint32();if(4==(7&i)||0===i)break;n.skip(7&i)}return{}},create:function(e){return t.SYo.fromPartial(null!=e?e:{})},fromPartial:function(e){return{}}},t.nDu={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.GD3.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.GD3.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.nDu.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.GD3.fromPartial(e.v0):void 0,n}},t.Cfi={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.proTxHash.length&&t.uint32(10).bytes(e.proTxHash),""!==e.nodeIp&&t.uint32(18).string(e.nodeIp),!1!==e.isBanned&&t.uint32(24).bool(e.isBanned),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=re();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.proTxHash=n.bytes();continue;case 2:if(18!==o)break;i.nodeIp=n.string();continue;case 3:if(24!==o)break;i.isBanned=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Cfi.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=re();return i.proTxHash=null!==(t=e.proTxHash)&&void 0!==t?t:new Uint8Array(0),i.nodeIp=null!==(n=e.nodeIp)&&void 0!==n?n:"",i.isBanned=null!==(r=e.isBanned)&&void 0!==r&&r,i}},t.m99={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),0!==e.quorumHash.length&&n.uint32(10).bytes(e.quorumHash),0!==e.coreHeight&&n.uint32(16).uint32(e.coreHeight);for(var r=0,i=e.members;r<i.length;r++){var o=i[r];t.Cfi.encode(o,n.uint32(26).fork()).join()}return 0!==e.thresholdPublicKey.length&&n.uint32(34).bytes(e.thresholdPublicKey),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=ie();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.quorumHash=r.bytes();continue;case 2:if(16!==a)break;o.coreHeight=r.uint32();continue;case 3:if(26!==a)break;o.members.push(t.Cfi.decode(r,r.uint32()));continue;case 4:if(34!==a)break;o.thresholdPublicKey=r.bytes();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.m99.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a=ie();return a.quorumHash=null!==(n=e.quorumHash)&&void 0!==n?n:new Uint8Array(0),a.coreHeight=null!==(r=e.coreHeight)&&void 0!==r?r:0,a.members=(null===(i=e.members)||void 0===i?void 0:i.map((function(e){return t.Cfi.fromPartial(e)})))||[],a.thresholdPublicKey=null!==(o=e.thresholdPublicKey)&&void 0!==o?o:new Uint8Array(0),a}},t.GD3={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.quorumHashes;r<i.length;r++){var o=i[r];n.uint32(10).bytes(o)}0!==e.currentQuorumHash.length&&n.uint32(18).bytes(e.currentQuorumHash);for(var a=0,u=e.validatorSets;a<u.length;a++)o=u[a],t.m99.encode(o,n.uint32(26).fork()).join();return 0!==e.lastBlockProposer.length&&n.uint32(34).bytes(e.lastBlockProposer),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(42).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=oe();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.quorumHashes.push(r.bytes());continue;case 2:if(18!==a)break;o.currentQuorumHash=r.bytes();continue;case 3:if(26!==a)break;o.validatorSets.push(t.m99.decode(r,r.uint32()));continue;case 4:if(34!==a)break;o.lastBlockProposer=r.bytes();continue;case 5:if(42!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.GD3.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a=oe();return a.quorumHashes=(null===(n=e.quorumHashes)||void 0===n?void 0:n.map((function(e){return e})))||[],a.currentQuorumHash=null!==(r=e.currentQuorumHash)&&void 0!==r?r:new Uint8Array(0),a.validatorSets=(null===(i=e.validatorSets)||void 0===i?void 0:i.map((function(e){return t.m99.fromPartial(e)})))||[],a.lastBlockProposer=null!==(o=e.lastBlockProposer)&&void 0!==o?o:new Uint8Array(0),a.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,a}},t.kFJ={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.uLU.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.uLU.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.kFJ.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.uLU.fromPartial(e.v0):void 0,n}},t.uLU={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),0!==e.identityId.length&&t.uint32(10).bytes(e.identityId);for(var n=0,r=e.tokenIds;n<r.length;n++){var i=r[n];t.uint32(18).bytes(i)}return!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=ae();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identityId=n.bytes();continue;case 2:if(18!==o)break;i.tokenIds.push(n.bytes());continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.uLU.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=ae();return i.identityId=null!==(t=e.identityId)&&void 0!==t?t:new Uint8Array(0),i.tokenIds=(null===(n=e.tokenIds)||void 0===n?void 0:n.map((function(e){return e})))||[],i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.CUW={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Ie4.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Ie4.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.CUW.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Ie4.fromPartial(e.v0):void 0,n}},t.Ie4={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.tokenBalances&&t.$$L.encode(e.tokenBalances,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenBalances:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenBalances=t.$$L.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Ie4.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={tokenBalances:void 0,proof:void 0,metadata:void 0};return n.tokenBalances=void 0!==e.tokenBalances&&null!==e.tokenBalances?t.$$L.fromPartial(e.tokenBalances):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.wR0={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId),void 0!==e.balance&&t.uint32(16).uint64(e.balance),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=ue();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(16!==o)break;i.balance=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.wR0.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=ue();return r.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),r.balance=null!==(n=e.balance)&&void 0!==n?n:void 0,r}},t.$$L={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.tokenBalances;r<i.length;r++){var o=i[r];t.wR0.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenBalances:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenBalances.push(t.wR0.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.$$L.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={tokenBalances:[]};return r.tokenBalances=(null===(n=e.tokenBalances)||void 0===n?void 0:n.map((function(e){return t.wR0.fromPartial(e)})))||[],r}},t.yuk={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.c8T.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.c8T.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.yuk.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.c8T.fromPartial(e.v0):void 0,n}},t.c8T={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId);for(var n=0,r=e.identityIds;n<r.length;n++){var i=r[n];t.uint32(18).bytes(i)}return!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=se();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(18!==o)break;i.identityIds.push(n.bytes());continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.c8T.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=se();return i.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),i.identityIds=(null===(n=e.identityIds)||void 0===n?void 0:n.map((function(e){return e})))||[],i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.yk={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.WJ6.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.WJ6.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.yk.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.WJ6.fromPartial(e.v0):void 0,n}},t.WJ6={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identityTokenBalances&&t.V9H.encode(e.identityTokenBalances,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identityTokenBalances:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identityTokenBalances=t.V9H.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.WJ6.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={identityTokenBalances:void 0,proof:void 0,metadata:void 0};return n.identityTokenBalances=void 0!==e.identityTokenBalances&&null!==e.identityTokenBalances?t.V9H.fromPartial(e.identityTokenBalances):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.AiO={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.identityId.length&&t.uint32(10).bytes(e.identityId),void 0!==e.balance&&t.uint32(16).uint64(e.balance),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=ce();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identityId=n.bytes();continue;case 2:if(16!==o)break;i.balance=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.AiO.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=ce();return r.identityId=null!==(t=e.identityId)&&void 0!==t?t:new Uint8Array(0),r.balance=null!==(n=e.balance)&&void 0!==n?n:void 0,r}},t.V9H={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.identityTokenBalances;r<i.length;r++){var o=i[r];t.AiO.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identityTokenBalances:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identityTokenBalances.push(t.AiO.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.V9H.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={identityTokenBalances:[]};return r.identityTokenBalances=(null===(n=e.identityTokenBalances)||void 0===n?void 0:n.map((function(e){return t.AiO.fromPartial(e)})))||[],r}},t.iGb={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.oYg.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.oYg.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.iGb.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.oYg.fromPartial(e.v0):void 0,n}},t.oYg={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),0!==e.identityId.length&&t.uint32(10).bytes(e.identityId);for(var n=0,r=e.tokenIds;n<r.length;n++){var i=r[n];t.uint32(18).bytes(i)}return!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=de();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.identityId=n.bytes();continue;case 2:if(18!==o)break;i.tokenIds.push(n.bytes());continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.oYg.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=de();return i.identityId=null!==(t=e.identityId)&&void 0!==t?t:new Uint8Array(0),i.tokenIds=(null===(n=e.tokenIds)||void 0===n?void 0:n.map((function(e){return e})))||[],i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.umN={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mzf.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mzf.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.umN.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mzf.fromPartial(e.v0):void 0,n}},t.mzf={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.tokenInfos&&t.lw_.encode(e.tokenInfos,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenInfos:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenInfos=t.lw_.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.mzf.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={tokenInfos:void 0,proof:void 0,metadata:void 0};return n.tokenInfos=void 0!==e.tokenInfos&&null!==e.tokenInfos?t.lw_.fromPartial(e.tokenInfos):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.yj9={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),!1!==e.frozen&&t.uint32(8).bool(e.frozen),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={frozen:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.frozen=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.yj9.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={frozen:!1};return n.frozen=null!==(t=e.frozen)&&void 0!==t&&t,n}},t.WCy={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.tokenId.length&&n.uint32(10).bytes(e.tokenId),void 0!==e.info&&t.yj9.encode(e.info,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=fe();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenId=r.bytes();continue;case 2:if(18!==a)break;o.info=t.yj9.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.WCy.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r=fe();return r.tokenId=null!==(n=e.tokenId)&&void 0!==n?n:new Uint8Array(0),r.info=void 0!==e.info&&null!==e.info?t.yj9.fromPartial(e.info):void 0,r}},t.lw_={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.tokenInfos;r<i.length;r++){var o=i[r];t.WCy.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenInfos:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenInfos.push(t.WCy.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.lw_.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={tokenInfos:[]};return r.tokenInfos=(null===(n=e.tokenInfos)||void 0===n?void 0:n.map((function(e){return t.WCy.fromPartial(e)})))||[],r}},t.cNK={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.a7Y.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.a7Y.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.cNK.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.a7Y.fromPartial(e.v0):void 0,n}},t.a7Y={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId);for(var n=0,r=e.identityIds;n<r.length;n++){var i=r[n];t.uint32(18).bytes(i)}return!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=le();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(18!==o)break;i.identityIds.push(n.bytes());continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.a7Y.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=le();return i.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),i.identityIds=(null===(n=e.identityIds)||void 0===n?void 0:n.map((function(e){return e})))||[],i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.OGr={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.gE1.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.gE1.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.OGr.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.gE1.fromPartial(e.v0):void 0,n}},t.gE1={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.identityTokenInfos&&t.f2Z.encode(e.identityTokenInfos,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={identityTokenInfos:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identityTokenInfos=t.f2Z.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.gE1.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={identityTokenInfos:void 0,proof:void 0,metadata:void 0};return n.identityTokenInfos=void 0!==e.identityTokenInfos&&null!==e.identityTokenInfos?t.f2Z.fromPartial(e.identityTokenInfos):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.Wb={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),!1!==e.frozen&&t.uint32(8).bool(e.frozen),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={frozen:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.frozen=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Wb.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n={frozen:!1};return n.frozen=null!==(t=e.frozen)&&void 0!==t&&t,n}},t.MNk={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.identityId.length&&n.uint32(10).bytes(e.identityId),void 0!==e.info&&t.Wb.encode(e.info,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=ve();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.identityId=r.bytes();continue;case 2:if(18!==a)break;o.info=t.Wb.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.MNk.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r=ve();return r.identityId=null!==(n=e.identityId)&&void 0!==n?n:new Uint8Array(0),r.info=void 0!==e.info&&null!==e.info?t.Wb.fromPartial(e.info):void 0,r}},t.f2Z={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.tokenInfos;r<i.length;r++){var o=i[r];t.MNk.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenInfos:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenInfos.push(t.MNk.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.f2Z.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={tokenInfos:[]};return r.tokenInfos=(null===(n=e.tokenInfos)||void 0===n?void 0:n.map((function(e){return t.MNk.fromPartial(e)})))||[],r}},t.xB5={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.mDi.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.mDi.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.xB5.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.mDi.fromPartial(e.v0):void 0,n}},t.mDi={encode:function(e,t){void 0===t&&(t=new v.BinaryWriter);for(var n=0,r=e.tokenIds;n<r.length;n++){var i=r[n];t.uint32(10).bytes(i)}return!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={tokenIds:[],prove:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenIds.push(n.bytes());continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.mDi.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={tokenIds:[],prove:!1};return r.tokenIds=(null===(t=e.tokenIds)||void 0===t?void 0:t.map((function(e){return e})))||[],r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.$97={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.SaJ.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.SaJ.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.$97.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.SaJ.fromPartial(e.v0):void 0,n}},t.SaJ={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.tokenStatuses&&t.YZt.encode(e.tokenStatuses,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenStatuses:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenStatuses=t.YZt.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.SaJ.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={tokenStatuses:void 0,proof:void 0,metadata:void 0};return n.tokenStatuses=void 0!==e.tokenStatuses&&null!==e.tokenStatuses?t.YZt.fromPartial(e.tokenStatuses):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.Uzd={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId),void 0!==e.paused&&t.uint32(16).bool(e.paused),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=pe();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(16!==o)break;i.paused=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Uzd.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=pe();return r.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),r.paused=null!==(n=e.paused)&&void 0!==n?n:void 0,r}},t.YZt={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.tokenStatuses;r<i.length;r++){var o=i[r];t.Uzd.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenStatuses:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenStatuses.push(t.Uzd.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.YZt.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={tokenStatuses:[]};return r.tokenStatuses=(null===(n=e.tokenStatuses)||void 0===n?void 0:n.map((function(e){return t.Uzd.fromPartial(e)})))||[],r}},t.PQ6={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.oUB.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.oUB.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.PQ6.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.oUB.fromPartial(e.v0):void 0,n}},t.oUB={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.tokenId.length&&n.uint32(10).bytes(e.tokenId),void 0!==e.startAtInfo&&t._oe.encode(e.startAtInfo,n.uint32(18).fork()).join(),void 0!==e.limit&&n.uint32(24).uint32(e.limit),!1!==e.prove&&n.uint32(32).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=he();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenId=r.bytes();continue;case 2:if(18!==a)break;o.startAtInfo=t._oe.decode(r,r.uint32());continue;case 3:if(24!==a)break;o.limit=r.uint32();continue;case 4:if(32!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.oUB.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o=he();return o.tokenId=null!==(n=e.tokenId)&&void 0!==n?n:new Uint8Array(0),o.startAtInfo=void 0!==e.startAtInfo&&null!==e.startAtInfo?t._oe.fromPartial(e.startAtInfo):void 0,o.limit=null!==(r=e.limit)&&void 0!==r?r:void 0,o.prove=null!==(i=e.prove)&&void 0!==i&&i,o}},t._oe={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.startTimeMs&&t.uint32(8).uint64(e.startTimeMs),void 0!==e.startRecipient&&t.uint32(18).bytes(e.startRecipient),void 0!==e.startRecipientIncluded&&t.uint32(24).bool(e.startRecipientIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={startTimeMs:"0",startRecipient:void 0,startRecipientIncluded:void 0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.startTimeMs=n.uint64().toString();continue;case 2:if(18!==o)break;i.startRecipient=n.bytes();continue;case 3:if(24!==o)break;i.startRecipientIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t._oe.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i={startTimeMs:"0",startRecipient:void 0,startRecipientIncluded:void 0};return i.startTimeMs=null!==(t=e.startTimeMs)&&void 0!==t?t:"0",i.startRecipient=null!==(n=e.startRecipient)&&void 0!==n?n:void 0,i.startRecipientIncluded=null!==(r=e.startRecipientIncluded)&&void 0!==r?r:void 0,i}},t.ftF={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Y7N.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Y7N.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ftF.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Y7N.fromPartial(e.v0):void 0,n}},t.Y7N={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.tokenDistributions&&t.JkI.encode(e.tokenDistributions,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenDistributions:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenDistributions=t.JkI.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Y7N.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={tokenDistributions:void 0,proof:void 0,metadata:void 0};return n.tokenDistributions=void 0!==e.tokenDistributions&&null!==e.tokenDistributions?t.JkI.fromPartial(e.tokenDistributions):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.cjl={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.recipientId.length&&t.uint32(10).bytes(e.recipientId),"0"!==e.amount&&t.uint32(16).uint64(e.amount),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=ye();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.recipientId=n.bytes();continue;case 2:if(16!==o)break;i.amount=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.cjl.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=ye();return r.recipientId=null!==(t=e.recipientId)&&void 0!==t?t:new Uint8Array(0),r.amount=null!==(n=e.amount)&&void 0!==n?n:"0",r}},t.NEI={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),"0"!==e.timestamp&&n.uint32(8).uint64(e.timestamp);for(var r=0,i=e.distributions;r<i.length;r++){var o=i[r];t.cjl.encode(o,n.uint32(18).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={timestamp:"0",distributions:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.timestamp=r.uint64().toString();continue;case 2:if(18!==a)break;o.distributions.push(t.cjl.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.NEI.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i={timestamp:"0",distributions:[]};return i.timestamp=null!==(n=e.timestamp)&&void 0!==n?n:"0",i.distributions=(null===(r=e.distributions)||void 0===r?void 0:r.map((function(e){return t.cjl.fromPartial(e)})))||[],i}},t.JkI={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.tokenDistributions;r<i.length;r++){var o=i[r];t.NEI.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenDistributions:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenDistributions.push(t.NEI.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.JkI.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={tokenDistributions:[]};return r.tokenDistributions=(null===(n=e.tokenDistributions)||void 0===n?void 0:n.map((function(e){return t.NEI.fromPartial(e)})))||[],r}},t.utu={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.wa5.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.wa5.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.utu.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.wa5.fromPartial(e.v0):void 0,n}},t.wa5={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId),!1!==e.prove&&t.uint32(16).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=me();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(16!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.wa5.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=me();return r.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),r.prove=null!==(n=e.prove)&&void 0!==n&&n,r}},t.osR={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.cw9.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.cw9.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.osR.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.cw9.fromPartial(e.v0):void 0,n}},t.cw9={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.tokenTotalSupply&&t.J5C.encode(e.tokenTotalSupply,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenTotalSupply:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenTotalSupply=t.J5C.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.cw9.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={tokenTotalSupply:void 0,proof:void 0,metadata:void 0};return n.tokenTotalSupply=void 0!==e.tokenTotalSupply&&null!==e.tokenTotalSupply?t.J5C.fromPartial(e.tokenTotalSupply):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.J5C={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenId.length&&t.uint32(10).bytes(e.tokenId),"0"!==e.totalAggregatedAmountInUserAccounts&&t.uint32(16).uint64(e.totalAggregatedAmountInUserAccounts),"0"!==e.totalSystemAmount&&t.uint32(24).uint64(e.totalSystemAmount),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=be();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenId=n.bytes();continue;case 2:if(16!==o)break;i.totalAggregatedAmountInUserAccounts=n.uint64().toString();continue;case 3:if(24!==o)break;i.totalSystemAmount=n.uint64().toString();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.J5C.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=be();return i.tokenId=null!==(t=e.tokenId)&&void 0!==t?t:new Uint8Array(0),i.totalAggregatedAmountInUserAccounts=null!==(n=e.totalAggregatedAmountInUserAccounts)&&void 0!==n?n:"0",i.totalSystemAmount=null!==(r=e.totalSystemAmount)&&void 0!==r?r:"0",i}},t.POn={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Y0y.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Y0y.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.POn.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Y0y.fromPartial(e.v0):void 0,n}},t.Y0y={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.contractId.length&&t.uint32(10).bytes(e.contractId),0!==e.groupContractPosition&&t.uint32(16).uint32(e.groupContractPosition),!1!==e.prove&&t.uint32(24).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=we();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.contractId=n.bytes();continue;case 2:if(16!==o)break;i.groupContractPosition=n.uint32();continue;case 3:if(24!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Y0y.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=we();return i.contractId=null!==(t=e.contractId)&&void 0!==t?t:new Uint8Array(0),i.groupContractPosition=null!==(n=e.groupContractPosition)&&void 0!==n?n:0,i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}},t.rly={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Mn6.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Mn6.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.rly.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Mn6.fromPartial(e.v0):void 0,n}},t.Mn6={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.groupInfo&&t.wnc.encode(e.groupInfo,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(34).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupInfo:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.groupInfo=t.wnc.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 4:if(34!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Mn6.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={groupInfo:void 0,proof:void 0,metadata:void 0};return n.groupInfo=void 0!==e.groupInfo&&null!==e.groupInfo?t.wnc.fromPartial(e.groupInfo):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.kMH={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.memberId.length&&t.uint32(10).bytes(e.memberId),0!==e.power&&t.uint32(16).uint32(e.power),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=ke();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.memberId=n.bytes();continue;case 2:if(16!==o)break;i.power=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.kMH.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=ke();return r.memberId=null!==(t=e.memberId)&&void 0!==t?t:new Uint8Array(0),r.power=null!==(n=e.power)&&void 0!==n?n:0,r}},t.UtY={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.members;r<i.length;r++){var o=i[r];t.kMH.encode(o,n.uint32(10).fork()).join()}return 0!==e.groupRequiredPower&&n.uint32(16).uint32(e.groupRequiredPower),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={members:[],groupRequiredPower:0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.members.push(t.kMH.decode(r,r.uint32()));continue;case 2:if(16!==a)break;o.groupRequiredPower=r.uint32();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.UtY.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i={members:[],groupRequiredPower:0};return i.members=(null===(n=e.members)||void 0===n?void 0:n.map((function(e){return t.kMH.fromPartial(e)})))||[],i.groupRequiredPower=null!==(r=e.groupRequiredPower)&&void 0!==r?r:0,i}},t.wnc={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.groupInfo&&t.UtY.encode(e.groupInfo,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupInfo:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.groupInfo=t.UtY.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.wnc.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={groupInfo:void 0};return n.groupInfo=void 0!==e.groupInfo&&null!==e.groupInfo?t.UtY.fromPartial(e.groupInfo):void 0,n}},t.yiw={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.sCC.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.sCC.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.yiw.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.sCC.fromPartial(e.v0):void 0,n}},t.K2g={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.startGroupContractPosition&&t.uint32(8).uint32(e.startGroupContractPosition),!1!==e.startGroupContractPositionIncluded&&t.uint32(16).bool(e.startGroupContractPositionIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={startGroupContractPosition:0,startGroupContractPositionIncluded:!1};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.startGroupContractPosition=n.uint32();continue;case 2:if(16!==o)break;i.startGroupContractPositionIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.K2g.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={startGroupContractPosition:0,startGroupContractPositionIncluded:!1};return r.startGroupContractPosition=null!==(t=e.startGroupContractPosition)&&void 0!==t?t:0,r.startGroupContractPositionIncluded=null!==(n=e.startGroupContractPositionIncluded)&&void 0!==n&&n,r}},t.sCC={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.contractId.length&&n.uint32(10).bytes(e.contractId),void 0!==e.startAtGroupContractPosition&&t.K2g.encode(e.startAtGroupContractPosition,n.uint32(18).fork()).join(),void 0!==e.count&&n.uint32(24).uint32(e.count),!1!==e.prove&&n.uint32(32).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=ge();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contractId=r.bytes();continue;case 2:if(18!==a)break;o.startAtGroupContractPosition=t.K2g.decode(r,r.uint32());continue;case 3:if(24!==a)break;o.count=r.uint32();continue;case 4:if(32!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.sCC.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o=ge();return o.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),o.startAtGroupContractPosition=void 0!==e.startAtGroupContractPosition&&null!==e.startAtGroupContractPosition?t.K2g.fromPartial(e.startAtGroupContractPosition):void 0,o.count=null!==(r=e.count)&&void 0!==r?r:void 0,o.prove=null!==(i=e.prove)&&void 0!==i&&i,o}},t.Ca7={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.Q8r.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.Q8r.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Ca7.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.Q8r.fromPartial(e.v0):void 0,n}},t.Q8r={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.groupInfos&&t.LAV.encode(e.groupInfos,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(34).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupInfos:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.groupInfos=t.LAV.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 4:if(34!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Q8r.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={groupInfos:void 0,proof:void 0,metadata:void 0};return n.groupInfos=void 0!==e.groupInfos&&null!==e.groupInfos?t.LAV.fromPartial(e.groupInfos):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.K6={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.memberId.length&&t.uint32(10).bytes(e.memberId),0!==e.power&&t.uint32(16).uint32(e.power),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Be();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.memberId=n.bytes();continue;case 2:if(16!==o)break;i.power=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.K6.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=Be();return r.memberId=null!==(t=e.memberId)&&void 0!==t?t:new Uint8Array(0),r.power=null!==(n=e.power)&&void 0!==n?n:0,r}},t.X40={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter),0!==e.groupContractPosition&&n.uint32(8).uint32(e.groupContractPosition);for(var r=0,i=e.members;r<i.length;r++){var o=i[r];t.K6.encode(o,n.uint32(18).fork()).join()}return 0!==e.groupRequiredPower&&n.uint32(24).uint32(e.groupRequiredPower),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupContractPosition:0,members:[],groupRequiredPower:0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(8!==a)break;o.groupContractPosition=r.uint32();continue;case 2:if(18!==a)break;o.members.push(t.K6.decode(r,r.uint32()));continue;case 3:if(24!==a)break;o.groupRequiredPower=r.uint32();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.X40.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o={groupContractPosition:0,members:[],groupRequiredPower:0};return o.groupContractPosition=null!==(n=e.groupContractPosition)&&void 0!==n?n:0,o.members=(null===(r=e.members)||void 0===r?void 0:r.map((function(e){return t.K6.fromPartial(e)})))||[],o.groupRequiredPower=null!==(i=e.groupRequiredPower)&&void 0!==i?i:0,o}},t.LAV={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.groupInfos;r<i.length;r++){var o=i[r];t.X40.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupInfos:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.groupInfos.push(t.X40.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.LAV.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={groupInfos:[]};return r.groupInfos=(null===(n=e.groupInfos)||void 0===n?void 0:n.map((function(e){return t.X40.fromPartial(e)})))||[],r}},t.Uu2={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.QwV.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.QwV.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Uu2.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.QwV.fromPartial(e.v0):void 0,n}},t.R3S={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.startActionId.length&&t.uint32(10).bytes(e.startActionId),!1!==e.startActionIdIncluded&&t.uint32(16).bool(e.startActionIdIncluded),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Ie();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.startActionId=n.bytes();continue;case 2:if(16!==o)break;i.startActionIdIncluded=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.R3S.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=Ie();return r.startActionId=null!==(t=e.startActionId)&&void 0!==t?t:new Uint8Array(0),r.startActionIdIncluded=null!==(n=e.startActionIdIncluded)&&void 0!==n&&n,r}},t.QwV={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.contractId.length&&n.uint32(10).bytes(e.contractId),0!==e.groupContractPosition&&n.uint32(16).uint32(e.groupContractPosition),0!==e.status&&n.uint32(24).int32(e.status),void 0!==e.startAtActionId&&t.R3S.encode(e.startAtActionId,n.uint32(34).fork()).join(),void 0!==e.count&&n.uint32(40).uint32(e.count),!1!==e.prove&&n.uint32(48).bool(e.prove),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=Pe();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.contractId=r.bytes();continue;case 2:if(16!==a)break;o.groupContractPosition=r.uint32();continue;case 3:if(24!==a)break;o.status=r.int32();continue;case 4:if(34!==a)break;o.startAtActionId=t.R3S.decode(r,r.uint32());continue;case 5:if(40!==a)break;o.count=r.uint32();continue;case 6:if(48!==a)break;o.prove=r.bool();continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.QwV.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r,i,o,a,u=Pe();return u.contractId=null!==(n=e.contractId)&&void 0!==n?n:new Uint8Array(0),u.groupContractPosition=null!==(r=e.groupContractPosition)&&void 0!==r?r:0,u.status=null!==(i=e.status)&&void 0!==i?i:0,u.startAtActionId=void 0!==e.startAtActionId&&null!==e.startAtActionId?t.R3S.fromPartial(e.startAtActionId):void 0,u.count=null!==(o=e.count)&&void 0!==o?o:void 0,u.prove=null!==(a=e.prove)&&void 0!==a&&a,u}},t.Kz6={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.UGg.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.UGg.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.Kz6.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.UGg.fromPartial(e.v0):void 0,n}},t.UGg={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.groupActions&&t.tMz.encode(e.groupActions,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupActions:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.groupActions=t.tMz.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.UGg.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={groupActions:void 0,proof:void 0,metadata:void 0};return n.groupActions=void 0!==e.groupActions&&null!==e.groupActions?t.tMz.fromPartial(e.groupActions):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.VW3={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.amount&&t.uint32(8).uint64(e.amount),0!==e.recipientId.length&&t.uint32(18).bytes(e.recipientId),void 0!==e.publicNote&&t.uint32(26).string(e.publicNote),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Re();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.amount=n.uint64().toString();continue;case 2:if(18!==o)break;i.recipientId=n.bytes();continue;case 3:if(26!==o)break;i.publicNote=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.VW3.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=Re();return i.amount=null!==(t=e.amount)&&void 0!==t?t:"0",i.recipientId=null!==(n=e.recipientId)&&void 0!==n?n:new Uint8Array(0),i.publicNote=null!==(r=e.publicNote)&&void 0!==r?r:void 0,i}},t.qP2={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),"0"!==e.amount&&t.uint32(8).uint64(e.amount),void 0!==e.publicNote&&t.uint32(18).string(e.publicNote),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={amount:"0",publicNote:void 0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.amount=n.uint64().toString();continue;case 2:if(18!==o)break;i.publicNote=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.qP2.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={amount:"0",publicNote:void 0};return r.amount=null!==(t=e.amount)&&void 0!==t?t:"0",r.publicNote=null!==(n=e.publicNote)&&void 0!==n?n:void 0,r}},t.yW7={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.frozenId.length&&t.uint32(10).bytes(e.frozenId),void 0!==e.publicNote&&t.uint32(18).string(e.publicNote),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Te();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.frozenId=n.bytes();continue;case 2:if(18!==o)break;i.publicNote=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.yW7.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=Te();return r.frozenId=null!==(t=e.frozenId)&&void 0!==t?t:new Uint8Array(0),r.publicNote=null!==(n=e.publicNote)&&void 0!==n?n:void 0,r}},t.LX0={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.frozenId.length&&t.uint32(10).bytes(e.frozenId),void 0!==e.publicNote&&t.uint32(18).string(e.publicNote),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Se();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.frozenId=n.bytes();continue;case 2:if(18!==o)break;i.publicNote=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.LX0.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=Se();return r.frozenId=null!==(t=e.frozenId)&&void 0!==t?t:new Uint8Array(0),r.publicNote=null!==(n=e.publicNote)&&void 0!==n?n:void 0,r}},t.duA={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.frozenId.length&&t.uint32(10).bytes(e.frozenId),"0"!==e.amount&&t.uint32(16).uint64(e.amount),void 0!==e.publicNote&&t.uint32(26).string(e.publicNote),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Ee();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.frozenId=n.bytes();continue;case 2:if(16!==o)break;i.amount=n.uint64().toString();continue;case 3:if(26!==o)break;i.publicNote=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.duA.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=Ee();return i.frozenId=null!==(t=e.frozenId)&&void 0!==t?t:new Uint8Array(0),i.amount=null!==(n=e.amount)&&void 0!==n?n:"0",i.publicNote=null!==(r=e.publicNote)&&void 0!==r?r:void 0,i}},t.M8C={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.senderKeyIndex&&t.uint32(8).uint32(e.senderKeyIndex),0!==e.recipientKeyIndex&&t.uint32(16).uint32(e.recipientKeyIndex),0!==e.encryptedData.length&&t.uint32(26).bytes(e.encryptedData),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Ae();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.senderKeyIndex=n.uint32();continue;case 2:if(16!==o)break;i.recipientKeyIndex=n.uint32();continue;case 3:if(26!==o)break;i.encryptedData=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.M8C.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=Ae();return i.senderKeyIndex=null!==(t=e.senderKeyIndex)&&void 0!==t?t:0,i.recipientKeyIndex=null!==(n=e.recipientKeyIndex)&&void 0!==n?n:0,i.encryptedData=null!==(r=e.encryptedData)&&void 0!==r?r:new Uint8Array(0),i}},t.LJO={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.rootEncryptionKeyIndex&&t.uint32(8).uint32(e.rootEncryptionKeyIndex),0!==e.derivationEncryptionKeyIndex&&t.uint32(16).uint32(e.derivationEncryptionKeyIndex),0!==e.encryptedData.length&&t.uint32(26).bytes(e.encryptedData),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=_e();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.rootEncryptionKeyIndex=n.uint32();continue;case 2:if(16!==o)break;i.derivationEncryptionKeyIndex=n.uint32();continue;case 3:if(26!==o)break;i.encryptedData=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.LJO.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i=_e();return i.rootEncryptionKeyIndex=null!==(t=e.rootEncryptionKeyIndex)&&void 0!==t?t:0,i.derivationEncryptionKeyIndex=null!==(n=e.derivationEncryptionKeyIndex)&&void 0!==n?n:0,i.encryptedData=null!==(r=e.encryptedData)&&void 0!==r?r:new Uint8Array(0),i}},t.gY7={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.actionType&&t.uint32(8).int32(e.actionType),void 0!==e.publicNote&&t.uint32(18).string(e.publicNote),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i={actionType:0,publicNote:void 0};n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(8!==o)break;i.actionType=n.int32();continue;case 2:if(18!==o)break;i.publicNote=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.gY7.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r={actionType:0,publicNote:void 0};return r.actionType=null!==(t=e.actionType)&&void 0!==t?t:0,r.publicNote=null!==(n=e.publicNote)&&void 0!==n?n:void 0,r}},t.Vc3={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.tokenConfigUpdateItem.length&&t.uint32(10).bytes(e.tokenConfigUpdateItem),void 0!==e.publicNote&&t.uint32(18).string(e.publicNote),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Ne();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.tokenConfigUpdateItem=n.bytes();continue;case 2:if(18!==o)break;i.publicNote=n.string();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Vc3.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=Ne();return r.tokenConfigUpdateItem=null!==(t=e.tokenConfigUpdateItem)&&void 0!==t?t:new Uint8Array(0),r.publicNote=null!==(n=e.publicNote)&&void 0!==n?n:void 0,r}},t.ue8={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.tokenEvent&&t.a2E.encode(e.tokenEvent,n.uint32(10).fork()).join(),void 0!==e.documentEvent&&t.ow1.encode(e.documentEvent,n.uint32(18).fork()).join(),void 0!==e.contractEvent&&t.f2B.encode(e.contractEvent,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={tokenEvent:void 0,documentEvent:void 0,contractEvent:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.tokenEvent=t.a2E.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.documentEvent=t.ow1.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.contractEvent=t.f2B.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ue8.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={tokenEvent:void 0,documentEvent:void 0,contractEvent:void 0};return n.tokenEvent=void 0!==e.tokenEvent&&null!==e.tokenEvent?t.a2E.fromPartial(e.tokenEvent):void 0,n.documentEvent=void 0!==e.documentEvent&&null!==e.documentEvent?t.ow1.fromPartial(e.documentEvent):void 0,n.contractEvent=void 0!==e.contractEvent&&null!==e.contractEvent?t.f2B.fromPartial(e.contractEvent):void 0,n}},t.ow1={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.create&&t.Obl.encode(e.create,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={create:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.create=t.Obl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.ow1.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={create:void 0};return n.create=void 0!==e.create&&null!==e.create?t.Obl.fromPartial(e.create):void 0,n}},t.Obl={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.createdDocument.length&&t.uint32(10).bytes(e.createdDocument),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Ue();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.createdDocument=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.Obl.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n=Ue();return n.createdDocument=null!==(t=e.createdDocument)&&void 0!==t?t:new Uint8Array(0),n}},t.q4s={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.updatedContract.length&&t.uint32(10).bytes(e.updatedContract),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Le();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.updatedContract=n.bytes();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.q4s.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n=Le();return n.updatedContract=null!==(t=e.updatedContract)&&void 0!==t?t:new Uint8Array(0),n}},t.f2B={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.update&&t.q4s.encode(e.update,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={update:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.update=t.q4s.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.f2B.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={update:void 0};return n.update=void 0!==e.update&&null!==e.update?t.q4s.fromPartial(e.update):void 0,n}},t.a2E={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.mint&&t.VW3.encode(e.mint,n.uint32(10).fork()).join(),void 0!==e.burn&&t.qP2.encode(e.burn,n.uint32(18).fork()).join(),void 0!==e.freeze&&t.yW7.encode(e.freeze,n.uint32(26).fork()).join(),void 0!==e.unfreeze&&t.LX0.encode(e.unfreeze,n.uint32(34).fork()).join(),void 0!==e.destroyFrozenFunds&&t.duA.encode(e.destroyFrozenFunds,n.uint32(42).fork()).join(),void 0!==e.emergencyAction&&t.gY7.encode(e.emergencyAction,n.uint32(50).fork()).join(),void 0!==e.tokenConfigUpdate&&t.Vc3.encode(e.tokenConfigUpdate,n.uint32(58).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={mint:void 0,burn:void 0,freeze:void 0,unfreeze:void 0,destroyFrozenFunds:void 0,emergencyAction:void 0,tokenConfigUpdate:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.mint=t.VW3.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.burn=t.qP2.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.freeze=t.yW7.decode(r,r.uint32());continue;case 4:if(34!==a)break;o.unfreeze=t.LX0.decode(r,r.uint32());continue;case 5:if(42!==a)break;o.destroyFrozenFunds=t.duA.decode(r,r.uint32());continue;case 6:if(50!==a)break;o.emergencyAction=t.gY7.decode(r,r.uint32());continue;case 7:if(58!==a)break;o.tokenConfigUpdate=t.Vc3.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.a2E.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={mint:void 0,burn:void 0,freeze:void 0,unfreeze:void 0,destroyFrozenFunds:void 0,emergencyAction:void 0,tokenConfigUpdate:void 0};return n.mint=void 0!==e.mint&&null!==e.mint?t.VW3.fromPartial(e.mint):void 0,n.burn=void 0!==e.burn&&null!==e.burn?t.qP2.fromPartial(e.burn):void 0,n.freeze=void 0!==e.freeze&&null!==e.freeze?t.yW7.fromPartial(e.freeze):void 0,n.unfreeze=void 0!==e.unfreeze&&null!==e.unfreeze?t.LX0.fromPartial(e.unfreeze):void 0,n.destroyFrozenFunds=void 0!==e.destroyFrozenFunds&&null!==e.destroyFrozenFunds?t.duA.fromPartial(e.destroyFrozenFunds):void 0,n.emergencyAction=void 0!==e.emergencyAction&&null!==e.emergencyAction?t.gY7.fromPartial(e.emergencyAction):void 0,n.tokenConfigUpdate=void 0!==e.tokenConfigUpdate&&null!==e.tokenConfigUpdate?t.Vc3.fromPartial(e.tokenConfigUpdate):void 0,n}},t.EdZ={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),0!==e.actionId.length&&n.uint32(10).bytes(e.actionId),void 0!==e.event&&t.ue8.encode(e.event,n.uint32(18).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o=je();r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.actionId=r.bytes();continue;case 2:if(18!==a)break;o.event=t.ue8.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.EdZ.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r=je();return r.actionId=null!==(n=e.actionId)&&void 0!==n?n:new Uint8Array(0),r.event=void 0!==e.event&&null!==e.event?t.ue8.fromPartial(e.event):void 0,r}},t.tMz={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.groupActions;r<i.length;r++){var o=i[r];t.EdZ.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupActions:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.groupActions.push(t.EdZ.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.tMz.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={groupActions:[]};return r.groupActions=(null===(n=e.groupActions)||void 0===n?void 0:n.map((function(e){return t.EdZ.fromPartial(e)})))||[],r}},t.wFb={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.G$0.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.G$0.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.wFb.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.G$0.fromPartial(e.v0):void 0,n}},t.G$0={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.contractId.length&&t.uint32(10).bytes(e.contractId),0!==e.groupContractPosition&&t.uint32(16).uint32(e.groupContractPosition),0!==e.status&&t.uint32(24).int32(e.status),0!==e.actionId.length&&t.uint32(34).bytes(e.actionId),!1!==e.prove&&t.uint32(40).bool(e.prove),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Ce();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.contractId=n.bytes();continue;case 2:if(16!==o)break;i.groupContractPosition=n.uint32();continue;case 3:if(24!==o)break;i.status=n.int32();continue;case 4:if(34!==o)break;i.actionId=n.bytes();continue;case 5:if(40!==o)break;i.prove=n.bool();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.G$0.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r,i,o,a=Ce();return a.contractId=null!==(t=e.contractId)&&void 0!==t?t:new Uint8Array(0),a.groupContractPosition=null!==(n=e.groupContractPosition)&&void 0!==n?n:0,a.status=null!==(r=e.status)&&void 0!==r?r:0,a.actionId=null!==(i=e.actionId)&&void 0!==i?i:new Uint8Array(0),a.prove=null!==(o=e.prove)&&void 0!==o&&o,a}},t.YRc={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.v0&&t.K5I.encode(e.v0,n.uint32(10).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={v0:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.v0=t.K5I.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.YRc.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={v0:void 0};return n.v0=void 0!==e.v0&&null!==e.v0?t.K5I.fromPartial(e.v0):void 0,n}},t.K5I={encode:function(e,n){return void 0===n&&(n=new v.BinaryWriter),void 0!==e.groupActionSigners&&t.TIL.encode(e.groupActionSigners,n.uint32(10).fork()).join(),void 0!==e.proof&&t.RiP.encode(e.proof,n.uint32(18).fork()).join(),void 0!==e.metadata&&t.tLl.encode(e.metadata,n.uint32(26).fork()).join(),n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={groupActionSigners:void 0,proof:void 0,metadata:void 0};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.groupActionSigners=t.TIL.decode(r,r.uint32());continue;case 2:if(18!==a)break;o.proof=t.RiP.decode(r,r.uint32());continue;case 3:if(26!==a)break;o.metadata=t.tLl.decode(r,r.uint32());continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.K5I.fromPartial(null!=e?e:{})},fromPartial:function(e){var n={groupActionSigners:void 0,proof:void 0,metadata:void 0};return n.groupActionSigners=void 0!==e.groupActionSigners&&null!==e.groupActionSigners?t.TIL.fromPartial(e.groupActionSigners):void 0,n.proof=void 0!==e.proof&&null!==e.proof?t.RiP.fromPartial(e.proof):void 0,n.metadata=void 0!==e.metadata&&null!==e.metadata?t.tLl.fromPartial(e.metadata):void 0,n}},t.kk={encode:function(e,t){return void 0===t&&(t=new v.BinaryWriter),0!==e.signerId.length&&t.uint32(10).bytes(e.signerId),0!==e.power&&t.uint32(16).uint32(e.power),t},decode:function(e,t){for(var n=e instanceof v.BinaryReader?e:new v.BinaryReader(e),r=void 0===t?n.len:n.pos+t,i=Oe();n.pos<r;){var o=n.uint32();switch(o>>>3){case 1:if(10!==o)break;i.signerId=n.bytes();continue;case 2:if(16!==o)break;i.power=n.uint32();continue}if(4==(7&o)||0===o)break;n.skip(7&o)}return i},create:function(e){return t.kk.fromPartial(null!=e?e:{})},fromPartial:function(e){var t,n,r=Oe();return r.signerId=null!==(t=e.signerId)&&void 0!==t?t:new Uint8Array(0),r.power=null!==(n=e.power)&&void 0!==n?n:0,r}},t.TIL={encode:function(e,n){void 0===n&&(n=new v.BinaryWriter);for(var r=0,i=e.signers;r<i.length;r++){var o=i[r];t.kk.encode(o,n.uint32(10).fork()).join()}return n},decode:function(e,n){for(var r=e instanceof v.BinaryReader?e:new v.BinaryReader(e),i=void 0===n?r.len:r.pos+n,o={signers:[]};r.pos<i;){var a=r.uint32();switch(a>>>3){case 1:if(10!==a)break;o.signers.push(t.kk.decode(r,r.uint32()));continue}if(4==(7&a)||0===a)break;r.skip(7&a)}return o},create:function(e){return t.TIL.fromPartial(null!=e?e:{})},fromPartial:function(e){var n,r={signers:[]};return r.signers=(null===(n=e.signers)||void 0===n?void 0:n.map((function(e){return t.kk.fromPartial(e)})))||[],r}},t.Xut={name:"Platform",fullName:"org.dash.platform.dapi.v0.Platform",methods:{broadcastStateTransition:{name:"broadcastStateTransition",requestType:t.HmR,requestStream:!1,responseType:t.RSA,responseStream:!1,options:{}},getIdentity:{name:"getIdentity",requestType:t.KHE,requestStream:!1,responseType:t.UKh,responseStream:!1,options:{}},getIdentityKeys:{name:"getIdentityKeys",requestType:t.ilO,requestStream:!1,responseType:t.SxR,responseStream:!1,options:{}},getIdentitiesContractKeys:{name:"getIdentitiesContractKeys",requestType:t.shr,requestStream:!1,responseType:t.eUP,responseStream:!1,options:{}},getIdentityNonce:{name:"getIdentityNonce",requestType:t.hiI,requestStream:!1,responseType:t.T6t,responseStream:!1,options:{}},getIdentityContractNonce:{name:"getIdentityContractNonce",requestType:t.tXX,requestStream:!1,responseType:t.jpi,responseStream:!1,options:{}},getIdentityBalance:{name:"getIdentityBalance",requestType:t.oBU,requestStream:!1,responseType:t.IZf,responseStream:!1,options:{}},getIdentitiesBalances:{name:"getIdentitiesBalances",requestType:t.pQ6,requestStream:!1,responseType:t.JlK,responseStream:!1,options:{}},getIdentityBalanceAndRevision:{name:"getIdentityBalanceAndRevision",requestType:t.MSi,requestStream:!1,responseType:t.GJ_,responseStream:!1,options:{}},getEvonodesProposedEpochBlocksByIds:{name:"getEvonodesProposedEpochBlocksByIds",requestType:t.ZkI,requestStream:!1,responseType:t.u4e,responseStream:!1,options:{}},getEvonodesProposedEpochBlocksByRange:{name:"getEvonodesProposedEpochBlocksByRange",requestType:t.EFo,requestStream:!1,responseType:t.u4e,responseStream:!1,options:{}},getProofs:{name:"getProofs",requestType:t.v7D,requestStream:!1,responseType:t.tjt,responseStream:!1,options:{}},getDataContract:{name:"getDataContract",requestType:t.cSQ,requestStream:!1,responseType:t.y9m,responseStream:!1,options:{}},getDataContractHistory:{name:"getDataContractHistory",requestType:t.q6T,requestStream:!1,responseType:t.YzH,responseStream:!1,options:{}},getDataContracts:{name:"getDataContracts",requestType:t.ZjH,requestStream:!1,responseType:t.bJb,responseStream:!1,options:{}},getDocuments:{name:"getDocuments",requestType:t._qG,requestStream:!1,responseType:t.cLn,responseStream:!1,options:{}},getIdentityByPublicKeyHash:{name:"getIdentityByPublicKeyHash",requestType:t.H76,requestStream:!1,responseType:t.dFH,responseStream:!1,options:{}},waitForStateTransitionResult:{name:"waitForStateTransitionResult",requestType:t.hvh,requestStream:!1,responseType:t.ZMb,responseStream:!1,options:{}},getConsensusParams:{name:"getConsensusParams",requestType:t.$l,requestStream:!1,responseType:t.zq$,responseStream:!1,options:{}},getProtocolVersionUpgradeState:{name:"getProtocolVersionUpgradeState",requestType:t.fDp,requestStream:!1,responseType:t.BZ8,responseStream:!1,options:{}},getProtocolVersionUpgradeVoteStatus:{name:"getProtocolVersionUpgradeVoteStatus",requestType:t.YiO,requestStream:!1,responseType:t.GDv,responseStream:!1,options:{}},getEpochsInfo:{name:"getEpochsInfo",requestType:t.GDk,requestStream:!1,responseType:t.iFu,responseStream:!1,options:{}},getContestedResources:{name:"getContestedResources",requestType:t.iJe,requestStream:!1,responseType:t.Qct,responseStream:!1,options:{}},getContestedResourceVoteState:{name:"getContestedResourceVoteState",requestType:t.ur$,requestStream:!1,responseType:t.sgL,responseStream:!1,options:{}},getContestedResourceVotersForIdentity:{name:"getContestedResourceVotersForIdentity",requestType:t.pSr,requestStream:!1,responseType:t.r0j,responseStream:!1,options:{}},getContestedResourceIdentityVotes:{name:"getContestedResourceIdentityVotes",requestType:t.QPq,requestStream:!1,responseType:t.ErQ,responseStream:!1,options:{}},getVotePollsByEndDate:{name:"getVotePollsByEndDate",requestType:t.A3R,requestStream:!1,responseType:t.qq9,responseStream:!1,options:{}},getPrefundedSpecializedBalance:{name:"getPrefundedSpecializedBalance",requestType:t.UwI,requestStream:!1,responseType:t.GfB,responseStream:!1,options:{}},getTotalCreditsInPlatform:{name:"getTotalCreditsInPlatform",requestType:t.Gqp,requestStream:!1,responseType:t.UHf,responseStream:!1,options:{}},getPathElements:{name:"getPathElements",requestType:t.CHe,requestStream:!1,responseType:t.eV4,responseStream:!1,options:{}},getStatus:{name:"getStatus",requestType:t.kCY,requestStream:!1,responseType:t.mZy,responseStream:!1,options:{}},getCurrentQuorumsInfo:{name:"getCurrentQuorumsInfo",requestType:t.TwU,requestStream:!1,responseType:t.nDu,responseStream:!1,options:{}},getIdentityTokenBalances:{name:"getIdentityTokenBalances",requestType:t.kFJ,requestStream:!1,responseType:t.CUW,responseStream:!1,options:{}},getIdentitiesTokenBalances:{name:"getIdentitiesTokenBalances",requestType:t.yuk,requestStream:!1,responseType:t.yk,responseStream:!1,options:{}},getIdentityTokenInfos:{name:"getIdentityTokenInfos",requestType:t.iGb,requestStream:!1,responseType:t.umN,responseStream:!1,options:{}},getIdentitiesTokenInfos:{name:"getIdentitiesTokenInfos",requestType:t.cNK,requestStream:!1,responseType:t.OGr,responseStream:!1,options:{}},getTokenStatuses:{name:"getTokenStatuses",requestType:t.xB5,requestStream:!1,responseType:t.$97,responseStream:!1,options:{}},getTokenPreProgrammedDistributions:{name:"getTokenPreProgrammedDistributions",requestType:t.PQ6,requestStream:!1,responseType:t.ftF,responseStream:!1,options:{}},getTokenTotalSupply:{name:"getTokenTotalSupply",requestType:t.utu,requestStream:!1,responseType:t.osR,responseStream:!1,options:{}},getGroupInfo:{name:"getGroupInfo",requestType:t.POn,requestStream:!1,responseType:t.rly,responseStream:!1,options:{}},getGroupInfos:{name:"getGroupInfos",requestType:t.yiw,requestStream:!1,responseType:t.Ca7,responseStream:!1,options:{}},getGroupActions:{name:"getGroupActions",requestType:t.Uu2,requestStream:!1,responseType:t.Kz6,responseStream:!1,options:{}},getGroupActionSigners:{name:"getGroupActionSigners",requestType:t.wFb,requestStream:!1,responseType:t.YRc,responseStream:!1,options:{}}}}},3737:(e,t,n)=>{"use strict";const r=n(4957),i=n(3557),o=n(5059),a=n(7328),u=n(5256),s=n(9452),{MT:c,NUMBYTES:d,SYMS:f,BI:l}=s,{Buffer:v}=n(8287),p=Symbol("count"),h=Symbol("major type"),y=Symbol("error"),m=Symbol("not found");function b(e,t,n){const r=[];return r[p]=n,r[f.PARENT]=e,r[h]=t,r}function w(e,t){const n=new u;return n[p]=-1,n[f.PARENT]=e,n[h]=t,n}class k extends Error{constructor(e,t){super(`Unexpected data: 0x${e.toString(16)}`),this.name="UnexpectedDataError",this.byte=e,this.value=t}}function g(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}class B extends r{constructor(e={}){const{tags:t={},max_depth:n=-1,preferMap:r=!1,preferWeb:i=!1,required:o=!1,encoding:a="hex",extendedResults:s=!1,preventDuplicateKeys:c=!1,...d}=e;super({defaultEncoding:a,...d}),this.running=!0,this.max_depth=n,this.tags=t,this.preferMap=r,this.preferWeb=i,this.extendedResults=s,this.required=o,this.preventDuplicateKeys=c,s&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new u)}static nullcheck(e){switch(e){case f.NULL:return null;case f.UNDEFINED:return;case m:throw new Error("Value not found");default:return e}}static decodeFirstSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=g(t));const{encoding:n="hex",...r}=t,i=new B(r),o=a.guessEncoding(e,n),u=i._parse();let s=u.next();for(;!s.done;){const e=o.read(s.value);if(null==e||e.length!==s.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(e),s=u.next(e)}let c=null;if(i.extendedResults)c=s.value,c.unused=o.read();else if(c=B.nullcheck(s.value),o.length>0){const e=o.read(1);throw o.unshift(e),new k(e[0],c)}return c}static decodeAllSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=g(t));const{encoding:n="hex",...r}=t,i=new B(r),o=a.guessEncoding(e,n),u=[];for(;o.length>0;){const e=i._parse();let t=e.next();for(;!t.done;){const n=o.read(t.value);if(null==n||n.length!==t.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(n),t=e.next(n)}u.push(B.nullcheck(t.value))}return u}static decodeFirst(e,t={},n=null){if(null==e)throw new TypeError("input required");({options:t,cb:n}=g(t,n));const{encoding:r="hex",required:i=!1,...o}=t,u=new B(o);let s=m;const c=a.guessEncoding(e,r),d=new Promise(((e,t)=>{u.on("data",(e=>{s=B.nullcheck(e),u.close()})),u.once("error",(n=>u.extendedResults&&n instanceof k?(s.unused=u.bs.slice(),e(s)):(s!==m&&(n.value=s),s=y,u.close(),t(n)))),u.once("end",(()=>{switch(s){case m:return i?t(new Error("No CBOR found")):e(s);case y:return;default:return e(s)}}))}));return"function"==typeof n&&d.then((e=>n(null,e)),n),c.pipe(u),d}static decodeAll(e,t={},n=null){if(null==e)throw new TypeError("input required");({options:t,cb:n}=g(t,n));const{encoding:r="hex",...i}=t,o=new B(i),u=[];o.on("data",(e=>u.push(B.nullcheck(e))));const s=new Promise(((e,t)=>{o.on("error",t),o.on("end",(()=>e(u)))}));return"function"==typeof n&&s.then((e=>n(void 0,e)),(e=>n(e,void 0))),a.guessEncoding(e,r).pipe(o),s}close(){this.running=!1,this.__fresh=!0}_onRead(e){this.valueBytes.write(e)}*_parse(){let e=null,t=0,n=null;for(;;){if(this.max_depth>=0&&t>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[r]=yield 1;if(!this.running)throw this.bs.unshift(v.from([r])),new k(r);const s=r>>5,y=31&r,m=null==e?void 0:e[h],g=null==e?void 0:e.length;switch(y){case d.ONE:this.emit("more-bytes",s,1,m,g),[n]=yield 1;break;case d.TWO:case d.FOUR:case d.EIGHT:{const e=1<<y-24;this.emit("more-bytes",s,e,m,g);const t=yield e;n=s===c.SIMPLE_FLOAT?t:a.parseCBORint(y,t);break}case 28:case 29:case 30:throw this.running=!1,new Error(`Additional info not implemented: ${y}`);case d.INDEFINITE:switch(s){case c.POS_INT:case c.NEG_INT:case c.TAG:throw new Error(`Invalid indefinite encoding for MT ${s}`)}n=-1;break;default:n=y}switch(s){case c.POS_INT:break;case c.NEG_INT:n=n===Number.MAX_SAFE_INTEGER?l.NEG_MAX:"bigint"==typeof n?l.MINUS_ONE-n:-1-n;break;case c.BYTE_STRING:case c.UTF8_STRING:switch(n){case 0:this.emit("start-string",s,n,m,g),n=s===c.UTF8_STRING?"":this.preferWeb?new Uint8Array(0):v.allocUnsafe(0);break;case-1:this.emit("start",s,f.STREAM,m,g),e=w(e,s),t++;continue;default:this.emit("start-string",s,n,m,g),n=yield n,s===c.UTF8_STRING?n=a.utf8(n):this.preferWeb&&(n=new Uint8Array(n.buffer,n.byteOffset,n.length))}break;case c.ARRAY:case c.MAP:switch(n){case 0:n=s===c.MAP?this.preferMap?new Map:{}:[];break;case-1:this.emit("start",s,f.STREAM,m,g),e=b(e,s,-1),t++;continue;default:this.emit("start",s,n,m,g),e=b(e,s,n*(s-3)),t++;continue}break;case c.TAG:this.emit("start",s,n,m,g),e=b(e,s,1),e.push(n),t++;continue;case c.SIMPLE_FLOAT:if("number"==typeof n){if(y===d.ONE&&n<32)throw new Error(`Invalid two-byte encoding of simple value ${n}`);const t=null!=e;n=o.decode(n,t,t&&e[p]<0)}else n=a.parseCBORfloat(n)}this.emit("value",n,m,g,y);let I=!1;for(;null!=e;){if(n===f.BREAK)e[p]=1;else if(Array.isArray(e))e.push(n);else{const t=e[h];if(null!=t&&t!==s)throw this.running=!1,new Error("Invalid major type in indefinite encoding");e.write(n)}if(0!=--e[p]){I=!0;break}if(--t,delete e[p],Array.isArray(e))switch(e[h]){case c.ARRAY:n=e;break;case c.MAP:{let t=!this.preferMap;if(e.length%2!=0)throw new Error(`Invalid map length: ${e.length}`);for(let n=0,r=e.length;t&&n<r;n+=2)if("string"!=typeof e[n]||"__proto__"===e[n]){t=!1;break}if(t){n={};for(let t=0,r=e.length;t<r;t+=2){if(this.preventDuplicateKeys&&Object.prototype.hasOwnProperty.call(n,e[t]))throw new Error("Duplicate keys in a map");n[e[t]]=e[t+1]}}else{n=new Map;for(let t=0,r=e.length;t<r;t+=2){if(this.preventDuplicateKeys&&n.has(e[t]))throw new Error("Duplicate keys in a map");n.set(e[t],e[t+1])}}break}case c.TAG:n=new i(e[0],e[1]).convert(this.tags)}else if(e instanceof u)switch(e[h]){case c.BYTE_STRING:n=e.slice(),this.preferWeb&&(n=new Uint8Array(n.buffer,n.byteOffset,n.length));break;case c.UTF8_STRING:n=e.toString("utf-8")}this.emit("stop",e[h]);const r=e;e=e[f.PARENT],delete r[f.PARENT],delete r[h]}if(!I){if(this.extendedResults){const e=this.valueBytes.slice(),t={value:B.nullcheck(n),bytes:e,length:e.length};return this.valueBytes=new u,t}return n}}}}B.NOT_FOUND=m,e.exports=B},4011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.protoInt64=void 0;const r=n(9119);function i(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function o(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}t.protoInt64=function(){const e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof process||"object"!=typeof process.env||"1"!==process.env.BUF_BIGINT_DISABLE)){const t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){const r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw new Error(`invalid int64: ${e}`);return r},uParse(e){const t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw new Error(`invalid uint64: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),i(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),o(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),i(e),(0,r.int64FromString)(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),o(e),(0,r.int64FromString)(e)),dec:(e,t)=>(0,r.int64ToString)(e,t),uDec:(e,t)=>(0,r.uInt64ToString)(e,t)}}()},4092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerError=void 0;const r=n(2721),i=n(2421);class o extends r.ExtendableError{constructor(e,t){super(`${i.Status[e]}: ${t}`),this.code=e,this.details=t,this.name="ServerError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ServerError",{value:!0})}static[Symbol.hasInstance](e){return this!==o?this.prototype.isPrototypeOf(e):"object"==typeof e&&null!==e&&(e.constructor===o||!0===e["@@nice-grpc:ServerError"]||"ServerError"===e.name&&!0===e["@@nice-grpc"])}}t.ServerError=o},4101:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatBuffers=function(e,t){if(1===e.length)return e[0];const n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}},4230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createServerStreamingMethod=function(e,t,n,a){const u={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(n,a){if((0,i.isAsyncIterable)(n))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");const u=(0,o.makeCall)(e,t,(0,r.asyncIterableOf)(n),a);yield*u}const c=null==n?s:(e,t)=>n({method:u,requestStream:!1,request:e,responseStream:!0,next:s},t);return(e,t)=>{const n=c(e,{...a,...t})[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({async next(){const e=await n.next();return e.done&&null!=e.value?await n.throw(new Error("A middleware returned a message, but expected to return void for server streaming method")):e},return:()=>n.return(),throw:e=>n.throw(e)})}}};const r=n(213),i=n(7768),o=n(2810)},4236:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientError=void 0;const r=n(2721),i=n(2421);class o extends r.ExtendableError{constructor(e,t,n){super(`${e} ${i.Status[t]}: ${n}`),this.path=e,this.code=t,this.details=n,this.name="ClientError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ClientError",{value:!0})}static[Symbol.hasInstance](e){return this!==o?this.prototype.isPrototypeOf(e):"object"==typeof e&&null!==e&&(e.constructor===o||!0===e["@@nice-grpc:ClientError"]||"ClientError"===e.name&&!0===e["@@nice-grpc"])}}t.ClientError=o},4489:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(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){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(3056),t),i(n(7662),t),i(n(898),t),i(n(9212),t),i(n(4966),t)},4610:(e,t,n)=>{"use strict";e.exports=d;var r=n(6048).F,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,u=r.ERR_TRANSFORM_WITH_LENGTH_0,s=n(5382);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function d(e){if(!(this instanceof d))return new d(e);s.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,n){l(e,t,n)}))}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new u;if(e._transformState.transforming)throw new a;return e.push(null)}n(6698)(d,s),d.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},d.prototype._transform=function(e,t,n){n(new i("_transform()"))},d.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},d.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},d.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,(function(e){t(e)}))}},4643:(e,t,n)=>{function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},4762:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTrailer=function(e){let t;const n=e.get("grpc-status");if(null==n)throw new Error("Received no status code from server");{const e=+n;if(!(e in r.Status))throw new Error(`Received invalid status code from server: ${n}`);t=e}let i=e.get("grpc-message");if(null!=i)try{i=decodeURIComponent(i)}catch(e){}const o=(0,r.Metadata)(e);return o.delete("grpc-status"),o.delete("grpc-message"),{status:t,message:i,trailer:o}};const r=n(91)},4957:(e,t,n)=>{"use strict";const r=n(8310),i=n(5256);class o extends r.Transform{constructor(e){super(e),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new i,this.__restart()}_transform(e,t,n){for(this.bs.write(e);this.bs.length>=this.__needed;){let e=null;const t=null===this.__needed?void 0:this.bs.read(this.__needed);try{e=this.__parser.next(t)}catch(e){return n(e)}this.__needed&&(this.__fresh=!1),e.done?(this.push(e.value),this.__restart()):this.__needed=e.value||1/0}return n()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(e){e(this.__fresh?null:new Error("unexpected end of input"))}}e.exports=o},4966:function(e,t,n){"use strict";var r=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",(function(e){return function(t){return Promise.resolve(t).then(e,d)}})),r[Symbol.asyncIterator]=function(){return this},r;function u(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof i?Promise.resolve(n.value.v).then(c,d):f(a[0][2],n)}catch(e){f(a[0][3],e)}var n}function c(e){s("next",e)}function d(e){s("throw",e)}function f(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.sizeDelimitedEncode=function(e,t,n){const r=new u.BinaryWriter;return r.bytes((0,a.toBinary)(e,t,n)),r.finish()},t.sizeDelimitedDecodeStream=function(e,t,n){return o(this,arguments,(function*(){var o,a,u,d;function f(e,t){const n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e),n.set(t,e.length),n}let l=new Uint8Array(0);try{for(var v,p=!0,h=r(t);!(o=(v=yield i(h.next())).done);p=!0)for(d=v.value,p=!1,l=f(l,d);;){const t=c(l);if(t.eof)break;if(t.offset+t.size>l.byteLength)break;yield yield i((0,s.fromBinary)(e,l.subarray(t.offset,t.offset+t.size),n)),l=l.subarray(t.offset+t.size)}}catch(e){a={error:e}}finally{try{p||o||!(u=h.return)||(yield i(u.call(h)))}finally{if(a)throw a.error}}if(l.byteLength>0)throw new Error("incomplete data")}))},t.sizeDelimitedPeek=c;const a=n(7110),u=n(3056),s=n(9201);function c(e){const t={eof:!0,size:null,offset:null};for(let n=0;n<10;n++){if(n>e.byteLength)return t;if(!(128&e[n])){const n=new u.BinaryReader(e);let r;try{r=n.uint32()}catch(e){if(e instanceof RangeError)return t;throw e}return{eof:!1,size:r,offset:n.pos}}}throw new Error("invalid varint")}},5059:(e,t,n)=>{"use strict";const{MT:r,SIMPLE:i,SYMS:o}=n(9452);class a{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error(`value must be a small positive integer: ${e}`);this.value=e}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return`simple(${this.value})`}encodeCBOR(e){return e._pushInt(this.value,r.SIMPLE_FLOAT)}static isSimple(e){return e instanceof a}static decode(e,t=!0,n=!1){switch(e){case i.FALSE:return!1;case i.TRUE:return!0;case i.NULL:return t?null:o.NULL;case i.UNDEFINED:if(t)return;return o.UNDEFINED;case-1:if(!t||!n)throw new Error("Invalid BREAK");return o.BREAK;default:return new a(e)}}}e.exports=a},5067:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldError=void 0,t.isFieldError=function(e){return e instanceof Error&&n.includes(e.name)&&"field"in e&&"function"==typeof e.field};const n=["FieldValueInvalidError","FieldListRangeError","ForeignFieldError"];class r extends Error{constructor(e,t,n="FieldValueInvalidError"){super(t),this.name=n,this.field=()=>e}}t.FieldError=r},5157:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},5256:(e,t,n)=>{"use strict";const r=n(8310),{Buffer:i}=n(8287),o=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class a extends r.Transform{constructor(e,t,n={}){let r=null,o=null;switch(typeof e){case"object":i.isBuffer(e)?r=e:e&&(n=e);break;case"string":r=e;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof t){case"object":t&&(n=t);break;case"string":o=t;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!n||"object"!=typeof n)throw new TypeError("Invalid options");null==r&&(r=n.input),null==o&&(o=n.inputEncoding),delete n.input,delete n.inputEncoding;const a=null==n.watchPipe||n.watchPipe;delete n.watchPipe;const u=Boolean(n.readError);delete n.readError,super(n),this.readError=u,a&&this.on("pipe",(e=>{const t=e._readableState.objectMode;if(this.length>0&&t!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=t,this._writableState.objectMode=t})),null!=r&&this.end(r,o)}static isNoFilter(e){return e instanceof this}static compare(e,t){if(!(e instanceof this))throw new TypeError("Arguments must be NoFilters");return e===t?0:e.compare(t)}static concat(e,t){if(!Array.isArray(e))throw new TypeError("list argument must be an Array of NoFilters");if(0===e.length||0===t)return i.alloc(0);null==t&&(t=e.reduce(((e,t)=>{if(!(t instanceof a))throw new TypeError("list argument must be an Array of NoFilters");return e+t.length}),0));let n=!0,r=!0;const o=e.map((e=>{if(!(e instanceof a))throw new TypeError("list argument must be an Array of NoFilters");const t=e.slice();return i.isBuffer(t)?r=!1:n=!1,t}));if(n)return i.concat(o,t);if(r)return[].concat(...o).slice(0,t);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(e,t,n){this._readableState.objectMode||i.isBuffer(e)||(e=i.from(e,t)),this.push(e),n()}_bufArray(){let e=this._readableState.buffer;if(!Array.isArray(e)){let t=e.head;for(e=[];null!=t;)e.push(t.data),t=t.next}return e}read(e){const t=super.read(e);if(null!=t){if(this.emit("read",t),this.readError&&t.length<e)throw new Error(`Read ${t.length}, wanted ${e}`)}else if(this.readError)throw new Error(`No data available, wanted ${e}`);return t}readFull(e){let t=null,n=null,r=null;return new Promise(((i,o)=>{this.length>=e?i(this.read(e)):this.writableFinished?o(new Error(`Stream finished before ${e} bytes were available`)):(t=t=>{this.length>=e&&i(this.read(e))},n=()=>{o(new Error(`Stream finished before ${e} bytes were available`))},r=o,this.on("readable",t),this.on("error",r),this.on("finish",n))})).finally((()=>{t&&(this.removeListener("readable",t),this.removeListener("error",r),this.removeListener("finish",n))}))}promise(e){let t=!1;return new Promise(((n,r)=>{this.on("finish",(()=>{const r=this.read();null==e||t||(t=!0,e(null,r)),n(r)})),this.on("error",(n=>{null==e||t||(t=!0,e(n)),r(n)}))}))}compare(e){if(!(e instanceof a))throw new TypeError("Arguments must be NoFilters");if(this===e)return 0;const t=this.slice(),n=e.slice();if(i.isBuffer(t)&&i.isBuffer(n))return t.compare(n);throw new Error("Cannot compare streams in object mode")}equals(e){return 0===this.compare(e)}slice(e,t){if(this._readableState.objectMode)return this._bufArray().slice(e,t);const n=this._bufArray();switch(n.length){case 0:return i.alloc(0);case 1:return n[0].slice(e,t);default:return i.concat(n).slice(e,t)}}get(e){return this.slice()[e]}toJSON(){const e=this.slice();return i.isBuffer(e)?e.toJSON():e}toString(e,t,n){const r=this.slice(t,n);return i.isBuffer(r)?e&&"utf8"!==e?r.toString(e):o.decode(r):JSON.stringify(r)}[Symbol.for("nodejs.util.inspect.custom")](e,t){const n=this._bufArray().map((e=>i.isBuffer(e)?t.stylize(e.toString("hex"),"string"):JSON.stringify(e))).join(", ");return`${this.constructor.name} [${n}]`}get length(){return this._readableState.length}writeBigInt(e){let t=e.toString(16);if(e<0){const n=BigInt(Math.floor(t.length/2));t=(e=(BigInt(1)<<n*BigInt(8))+e).toString(16)}return t.length%2&&(t=`0${t}`),this.push(i.from(t,"hex"))}readUBigInt(e){const t=this.read(e);return i.isBuffer(t)?BigInt(`0x${t.toString("hex")}`):null}readBigInt(e){const t=this.read(e);if(!i.isBuffer(t))return null;let n=BigInt(`0x${t.toString("hex")}`);return 128&t[0]&&(n-=BigInt(1)<<BigInt(t.length)*BigInt(8)),n}writeUInt8(e){const t=i.from([e]);return this.push(t)}writeUInt16LE(e){const t=i.alloc(2);return t.writeUInt16LE(e),this.push(t)}writeUInt16BE(e){const t=i.alloc(2);return t.writeUInt16BE(e),this.push(t)}writeUInt32LE(e){const t=i.alloc(4);return t.writeUInt32LE(e),this.push(t)}writeUInt32BE(e){const t=i.alloc(4);return t.writeUInt32BE(e),this.push(t)}writeInt8(e){const t=i.from([e]);return this.push(t)}writeInt16LE(e){const t=i.alloc(2);return t.writeUInt16LE(e),this.push(t)}writeInt16BE(e){const t=i.alloc(2);return t.writeUInt16BE(e),this.push(t)}writeInt32LE(e){const t=i.alloc(4);return t.writeUInt32LE(e),this.push(t)}writeInt32BE(e){const t=i.alloc(4);return t.writeUInt32BE(e),this.push(t)}writeFloatLE(e){const t=i.alloc(4);return t.writeFloatLE(e),this.push(t)}writeFloatBE(e){const t=i.alloc(4);return t.writeFloatBE(e),this.push(t)}writeDoubleLE(e){const t=i.alloc(8);return t.writeDoubleLE(e),this.push(t)}writeDoubleBE(e){const t=i.alloc(8);return t.writeDoubleBE(e),this.push(t)}writeBigInt64LE(e){const t=i.alloc(8);return t.writeBigInt64LE(e),this.push(t)}writeBigInt64BE(e){const t=i.alloc(8);return t.writeBigInt64BE(e),this.push(t)}writeBigUInt64LE(e){const t=i.alloc(8);return t.writeBigUInt64LE(e),this.push(t)}writeBigUInt64BE(e){const t=i.alloc(8);return t.writeBigUInt64BE(e),this.push(t)}readUInt8(){const e=this.read(1);return i.isBuffer(e)?e.readUInt8():null}readUInt16LE(){const e=this.read(2);return i.isBuffer(e)?e.readUInt16LE():null}readUInt16BE(){const e=this.read(2);return i.isBuffer(e)?e.readUInt16BE():null}readUInt32LE(){const e=this.read(4);return i.isBuffer(e)?e.readUInt32LE():null}readUInt32BE(){const e=this.read(4);return i.isBuffer(e)?e.readUInt32BE():null}readInt8(){const e=this.read(1);return i.isBuffer(e)?e.readInt8():null}readInt16LE(){const e=this.read(2);return i.isBuffer(e)?e.readInt16LE():null}readInt16BE(){const e=this.read(2);return i.isBuffer(e)?e.readInt16BE():null}readInt32LE(){const e=this.read(4);return i.isBuffer(e)?e.readInt32LE():null}readInt32BE(){const e=this.read(4);return i.isBuffer(e)?e.readInt32BE():null}readFloatLE(){const e=this.read(4);return i.isBuffer(e)?e.readFloatLE():null}readFloatBE(){const e=this.read(4);return i.isBuffer(e)?e.readFloatBE():null}readDoubleLE(){const e=this.read(8);return i.isBuffer(e)?e.readDoubleLE():null}readDoubleBE(){const e=this.read(8);return i.isBuffer(e)?e.readDoubleBE():null}readBigInt64LE(){const e=this.read(8);return i.isBuffer(e)?e.readBigInt64LE():null}readBigInt64BE(){const e=this.read(8);return i.isBuffer(e)?e.readBigInt64BE():null}readBigUInt64LE(){const e=this.read(8);return i.isBuffer(e)?e.readBigUInt64LE():null}readBigUInt64BE(){const e=this.read(8);return i.isBuffer(e)?e.readBigUInt64BE():null}}e.exports=a},5291:(e,t,n)=>{"use strict";var r=n(6048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},5340:()=>{},5382:(e,t,n)=>{"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(5412),o=n(6708);n(6698)(c,i);for(var a=r(o.prototype),u=0;u<a.length;u++){var s=a[u];c.prototype[s]||(c.prototype[s]=o.prototype[s])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||process.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},5412:(e,t,n)=>{"use strict";var r;e.exports=P,P.ReadableState=I,n(7007).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},a=n(345),u=n(8287).Buffer,s=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(9838);i=c&&c.debuglog?c.debuglog("stream"):function(){};var d,f,l,v=n(2726),p=n(5896),h=n(5291).getHighWaterMark,y=n(6048).F,m=y.ERR_INVALID_ARG_TYPE,b=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,k=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(6698)(P,a);var g=p.errorOrDestroy,B=["error","close","destroy","pause","resume"];function I(e,t,i){r=r||n(5382),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=h(this,e,"readableHighWaterMark",i),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=n(3141).I),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function P(e){if(r=r||n(5382),!(this instanceof P))return new P(e);var t=this instanceof r;this._readableState=new I(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function R(e,t,n,r,o){i("readableAddChunk",t);var a,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,_(e)))}}(e,c);else if(o||(a=function(e,t){var n,r;return r=t,u.isBuffer(r)||r instanceof s||"string"==typeof t||void 0===t||e.objectMode||(n=new m("chunk",["string","Buffer","Uint8Array"],t)),n}(c,t)),a)g(e,a);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r)c.endEmitted?g(e,new k):T(e,c,t,!0);else if(c.ended)g(e,new b);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!n?(t=c.decoder.write(t),c.objectMode||0!==t.length?T(e,c,t,!1):N(e,c)):T(e,c,t,!1)}else r||(c.reading=!1,N(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function T(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&A(e)),N(e,t)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),P.prototype.destroy=p.destroy,P.prototype._undestroy=p.undestroy,P.prototype._destroy=function(e,t){t(e)},P.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=u.from(e,t),t=""),n=!0),R(this,e,t,!1,n)},P.prototype.unshift=function(e){return R(this,e,null,!0,!1)},P.prototype.isPaused=function(){return!1===this._readableState.flowing},P.prototype.setEncoding=function(e){d||(d=n(3141).I);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(_,e))}function _(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,O(e)}function N(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(U,e,t))}function U(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(i("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function j(e){i("readable nexttick read 0"),e.read(0)}function C(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),O(e),t.flowing&&!t.reading&&e.read(0)}function O(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function x(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(D,t,e))}function D(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function W(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}P.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?x(this):A(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&x(this),null;var r,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&x(this)),null!==r&&this.emit("data",r),r},P.prototype._read=function(e){g(this,new w("_read()"))},P.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?p:u;function u(){i("onend"),e.end()}r.endEmitted?process.nextTick(a):n.once("end",a),e.on("unpipe",(function t(o,a){i("onunpipe"),o===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",l),e.removeListener("finish",v),e.removeListener("drain",s),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",u),n.removeListener("end",p),n.removeListener("data",d),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s())}));var s=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,O(e))}}(n);e.on("drain",s);var c=!1;function d(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==W(r.pipes,e))&&!c&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){i("onerror",t),p(),e.removeListener("error",f),0===o(e,"error")&&g(e,t)}function l(){e.removeListener("finish",v),p()}function v(){i("onfinish"),e.removeListener("close",l),p()}function p(){i("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",l),e.once("finish",v),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},P.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=W(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},P.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?A(this):r.reading||process.nextTick(j,this))),n},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(L,this),n},P.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(L,this),t},P.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(C,e,t))}(this,e)),e.paused=!1,this},P.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},P.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<B.length;a++)e.on(B[a],this.emit.bind(this,B[a]));return this._read=function(t){i("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(P.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=n(2955)),f(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),P._fromList=M,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(P.from=function(e,t){return void 0===l&&(l=n(5157)),l(P,e,t)})},5653:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromTsProtoServiceDefinition=function(e){const t={};for(const[n,r]of Object.entries(e.methods)){const i=r.requestType.encode,o=r.requestType.fromPartial,a=r.responseType.encode,u=r.responseType.fromPartial;t[n]={path:`/${e.fullName}/${r.name}`,requestStream:r.requestStream,responseStream:r.responseStream,requestDeserialize:r.requestType.decode,requestSerialize:null!=o?e=>i(o(e)).finish():e=>i(e).finish(),responseDeserialize:r.responseType.decode,responseSerialize:null!=u?e=>a(u(e)).finish():e=>a(e).finish(),options:r.options}}return t},t.isTsProtoServiceDefinition=function(e){return"name"in e&&"fullName"in e&&"methods"in e}},5896:e=>{"use strict";function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,e)):process.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(n,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(n,o),i(e)):process.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},5972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6048:e=>{"use strict";var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o,a,u,s;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var c=("number"!=typeof s&&(s=0),s+1>(u=e).length||-1===u.indexOf(".",s)?"argument":"property");a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},6238:(e,t,n)=>{"use strict";var r=n(6048).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,u=n.writable||!1!==n.writable&&t.writable,s=function(){t.writable||d()},c=t._writableState&&t._writableState.finished,d=function(){u=!1,c=!0,a||o.call(t)},f=t._readableState&&t._readableState.endEmitted,l=function(){a=!1,f=!0,u||o.call(t)},v=function(e){o.call(t,e)},p=function(){var e;return a&&!f?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):u&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},h=function(){t.req.on("finish",d)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",d),t.on("abort",p),t.req?h():t.on("request",h)):u&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",l),t.on("finish",d),!1!==n.error&&t.on("error",v),t.on("close",p),function(){t.removeListener("complete",d),t.removeListener("abort",p),t.removeListener("request",h),t.req&&t.req.removeListener("finish",d),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",d),t.removeListener("end",l),t.removeListener("error",v),t.removeListener("close",p)}}},6524:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6708:(e,t,n)=>{"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=P,P.WritableState=I;var o,a={deprecate:n(4643)},u=n(345),s=n(8287).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},d=n(5896),f=n(5291).getHighWaterMark,l=n(6048).F,v=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,h=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,m=l.ERR_STREAM_DESTROYED,b=l.ERR_STREAM_NULL_VALUES,w=l.ERR_STREAM_WRITE_AFTER_END,k=l.ERR_UNKNOWN_ENCODING,g=d.errorOrDestroy;function B(){}function I(e,t,o){i=i||n(5382),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new h;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(process.nextTick(i,r),process.nextTick(_,e,t),e._writableState.errorEmitted=!0,g(e,r)):(i(r),e._writableState.errorEmitted=!0,g(e,r),_(e,t))}(e,n,r,t,i);else{var o=E(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||S(e,n),r?process.nextTick(T,e,n,o,i):T(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function P(e){var t=this instanceof(i=i||n(5382));if(!t&&!o.call(P,this))return new P(e);this._writableState=new I(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function R(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function S(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=n;for(var u=0,s=!0;n;)o[u]=n,n.isBuf||(s=!1),n=n.next,u+=1;o.allBuffers=s,R(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,d=n.encoding,f=n.callback;if(R(e,t,!1,t.objectMode?1:c.length,c,d,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final((function(n){t.pendingcb--,n&&g(e,n),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(e,t){var n=E(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(A,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(6698)(P,u),I.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(I.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===P&&e&&e._writableState instanceof I}})):o=function(e){return e instanceof this},P.prototype.pipe=function(){g(this,new y)},P.prototype.write=function(e,t,n){var r,i=this._writableState,o=!1,a=!i.objectMode&&(r=e,s.isBuffer(r)||r instanceof c);return a&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=B),i.ending?function(e,t){var n=new w;g(e,n),process.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var i;return null===n?i=new b:"string"==typeof n||t.objectMode||(i=new v("chunk",["string","Buffer"],n)),!i||(g(e,i),process.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=s.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var u=t.objectMode?1:r.length;t.length+=u;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,u,r,i,o);return c}(this,i,a,e,t,n)),o},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||S(this,e))},P.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),P.prototype._write=function(e,t,n){n(new p("_write()"))},P.prototype._writev=null,P.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),P.prototype.destroy=d.destroy,P.prototype._undestroy=d.undestroy,P.prototype._destroy=function(e,t){t(e)}},6776:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.composeClientMiddleware=void 0,t.composeClientMiddleware=function(e,t){return(n,r)=>t(Object.assign(Object.assign({},n),{next:(t,r)=>e(Object.assign(Object.assign({},n),{request:t}),r)}),r)}},7005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchTransport=function(e){return async function*({url:t,body:n,metadata:i,signal:s,method:c}){let d;if(c.requestStream){let e;d=new ReadableStream({type:"bytes",start(){e=n[Symbol.asyncIterator]()},async pull(t){const{done:n,value:r}=await e.next();n?t.close():t.enqueue(r)},async cancel(){var t,n;await(null===(n=(t=e).return)||void 0===n?void 0:n.call(t))}})}else{let e;for await(const t of n){e=t;break}d=e}const f=await fetch(t,{method:"POST",body:d,headers:a(i),signal:s,cache:null==e?void 0:e.cache,duplex:"half",credentials:null==e?void 0:e.credentials});if(yield{type:"header",header:u(f.headers)},!f.ok){const e=await f.text();throw new o.ClientError(c.path,function(e){switch(e){case 400:return o.Status.INTERNAL;case 401:return o.Status.UNAUTHENTICATED;case 403:return o.Status.PERMISSION_DENIED;case 404:return o.Status.UNIMPLEMENTED;case 429:case 502:case 503:case 504:return o.Status.UNAVAILABLE;default:return o.Status.UNKNOWN}}(f.status),function(e,t){return`Received HTTP ${e} response: `+(t.length>1e3?t.slice(0,1e3)+"... (truncated)":t)}(f.status,e))}(0,r.throwIfAborted)(s);const l=f.body.getReader(),v=()=>{l.cancel().catch((()=>{}))};s.addEventListener("abort",v);try{for(;;){const{done:e,value:t}=await l.read();if(null!=t&&(yield{type:"data",data:t}),e)break}}finally{s.removeEventListener("abort",v),(0,r.throwIfAborted)(s)}}};const r=n(1475),i=n(8127),o=n(91);function a(e){const t=new Headers;for(const[n,r]of e)for(const e of r)t.append(n,"string"==typeof e?e:i.Base64.fromUint8Array(e));return t}function u(e){const t=new o.Metadata;for(const[n,r]of e)if(n.endsWith("-bin"))for(const e of r.split(/,\s?/))t.append(n,i.Base64.toUint8Array(e));else t.set(n,r);return t}},7007:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}h(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,a,c;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=s(e))>0&&a.length>i&&!a.warned){a.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=a.length,c=d,console&&console.warn&&console.warn(c)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function l(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function v(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return s(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var s=o[e];if(void 0===s)return!1;if("function"==typeof s)r(s,this,t);else{var c=s.length,d=p(s,c);for(n=0;n<c;++n)r(d[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return l(this,e,!0)},o.prototype.rawListeners=function(e){return l(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},o.prototype.listenerCount=v,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7110:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBinary=function(e,t,n){return s(new i.BinaryWriter,function(e){return e?Object.assign(Object.assign({},u),e):u}(n),(0,r.reflect)(e,t)).finish()},t.writeField=c;const r=n(9644),i=n(3056),o=n(2885),a=3,u={writeUnknownFields:!0};function s(e,t,n){var r;for(const r of n.sortedFields)if(n.isSet(r))c(e,t,n,r);else if(r.presence==a)throw new Error(`cannot encode field ${n.desc.typeName}.${r.name} to binary: required field not set`);if(t.writeUnknownFields)for(const{no:t,wireType:i,data:o}of null!==(r=n.getUnknown())&&void 0!==r?r:[])e.tag(t,i).raw(o);return e}function c(e,t,n,r){var a;switch(r.fieldKind){case"scalar":case"enum":d(e,null!==(a=r.scalar)&&void 0!==a?a:o.ScalarType.INT32,r.number,n.get(r));break;case"list":!function(e,t,n,r){var a;if("message"==n.listKind){for(const i of r)f(e,t,n,i);return}const u=null!==(a=n.scalar)&&void 0!==a?a:o.ScalarType.INT32;if(n.packed){if(!r.size)return;e.tag(n.number,i.WireType.LengthDelimited).fork();for(const t of r)v(e,u,t);e.join()}else for(const t of r)d(e,u,n.number,t)}(e,t,r,n.get(r));break;case"message":f(e,t,r,n.get(r));break;case"map":for(const[i,o]of n.get(r))l(e,t,r,i,o)}}function d(e,t,n,r){v(e.tag(n,function(e){switch(e){case o.ScalarType.BYTES:case o.ScalarType.STRING:return i.WireType.LengthDelimited;case o.ScalarType.DOUBLE:case o.ScalarType.FIXED64:case o.ScalarType.SFIXED64:return i.WireType.Bit64;case o.ScalarType.FIXED32:case o.ScalarType.SFIXED32:case o.ScalarType.FLOAT:return i.WireType.Bit32;default:return i.WireType.Varint}}(t)),t,r)}function f(e,t,n,r){n.delimitedEncoding?s(e.tag(n.number,i.WireType.StartGroup),t,r).tag(n.number,i.WireType.EndGroup):s(e.tag(n.number,i.WireType.LengthDelimited).fork(),t,r).join()}function l(e,t,n,r,a){var u;switch(e.tag(n.number,i.WireType.LengthDelimited).fork(),d(e,n.mapKey,1,r),n.mapKind){case"scalar":case"enum":d(e,null!==(u=n.scalar)&&void 0!==u?u:o.ScalarType.INT32,2,a);break;case"message":s(e.tag(2,i.WireType.LengthDelimited).fork(),t,a).join()}e.join()}function v(e,t,n){switch(t){case o.ScalarType.STRING:e.string(n);break;case o.ScalarType.BOOL:e.bool(n);break;case o.ScalarType.DOUBLE:e.double(n);break;case o.ScalarType.FLOAT:e.float(n);break;case o.ScalarType.INT32:e.int32(n);break;case o.ScalarType.INT64:e.int64(n);break;case o.ScalarType.UINT64:e.uint64(n);break;case o.ScalarType.FIXED64:e.fixed64(n);break;case o.ScalarType.BYTES:e.bytes(n);break;case o.ScalarType.FIXED32:e.fixed32(n);break;case o.ScalarType.SFIXED32:e.sfixed32(n);break;case o.ScalarType.SFIXED64:e.sfixed64(n);break;case o.ScalarType.SINT64:e.sint64(n);break;case o.ScalarType.UINT32:e.uint32(n);break;case o.ScalarType.SINT32:e.sint32(n)}}},7299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeLocal=void 0,t.unsafeOneofCase=function(e,t){const n=e[t.localName].case;return void 0===n?n:t.fields.find((e=>e.localName===n))},t.unsafeIsSet=function(e,t){const n=t.localName;if(t.oneof)return e[t.oneof.localName].case===n;if(t.presence!=i)return void 0!==e[n]&&Object.prototype.hasOwnProperty.call(e,n);switch(t.fieldKind){case"list":return e[n].length>0;case"map":return Object.keys(e[n]).length>0;case"scalar":return!(0,r.isScalarZeroValue)(t.scalar,e[n]);case"enum":return e[n]!==t.enum.values[0].number}throw new Error("message field with implicit presence")},t.unsafeIsSetExplicit=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]},t.unsafeGet=function(e,t){if(t.oneof){const n=e[t.oneof.localName];return n.case===t.localName?n.value:void 0}return e[t.localName]},t.unsafeSet=function(e,t,n){t.oneof?e[t.oneof.localName]={case:t.localName,value:n}:e[t.localName]=n},t.unsafeClear=function(e,t){const n=t.localName;if(t.oneof){const r=t.oneof.localName;e[r].case===n&&(e[r]={case:void 0})}else if(t.presence!=i)delete e[n];else switch(t.fieldKind){case"map":e[n]={};break;case"list":e[n]=[];break;case"enum":e[n]=t.enum.values[0].number;break;case"scalar":e[n]=(0,r.scalarZeroValue)(t.scalar,t.longAsString)}};const r=n(2949),i=2;t.unsafeLocal=Symbol.for("reflect unsafe local")},7328:(e,t,n)=>{"use strict";const{Buffer:r}=n(8287),i=n(5256),o=n(8310),a=n(9452),{NUMBYTES:u,SHIFT32:s,BI:c,SYMS:d}=a,f=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});t.utf8=e=>f.decode(e),t.utf8.checksUTF8=!0,t.isBufferish=function(e){return e&&"object"==typeof e&&(r.isBuffer(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof ArrayBuffer||e instanceof DataView)},t.bufferishToBuffer=function(e){return r.isBuffer(e)?e:ArrayBuffer.isView(e)?r.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?r.from(e):null},t.parseCBORint=function(e,t){switch(e){case u.ONE:return t.readUInt8(0);case u.TWO:return t.readUInt16BE(0);case u.FOUR:return t.readUInt32BE(0);case u.EIGHT:{const e=t.readUInt32BE(0),n=t.readUInt32BE(4);return e>2097151?BigInt(e)*c.SHIFT32+BigInt(n):e*s+n}default:throw new Error(`Invalid additional info for int: ${e}`)}},t.writeHalf=function(e,t){const n=r.allocUnsafe(4);n.writeFloatBE(t,0);const i=n.readUInt32BE(0);if(8191&i)return!1;let o=i>>16&32768;const a=i>>23&255,u=8388607&i;if(a>=113&&a<=142)o+=(a-112<<10)+(u>>13);else{if(!(a>=103&&a<113))return!1;if(u&(1<<126-a)-1)return!1;o+=u+8388608>>126-a}return e.writeUInt16BE(o),!0},t.parseHalf=function(e){const t=128&e[0]?-1:1,n=(124&e[0])>>2,r=(3&e[0])<<8|e[1];return n?31===n?t*(r?NaN:1/0):t*2**(n-25)*(1024+r):5.960464477539063e-8*t*r},t.parseCBORfloat=function(e){switch(e.length){case 2:return t.parseHalf(e);case 4:return e.readFloatBE(0);case 8:return e.readDoubleBE(0);default:throw new Error(`Invalid float size: ${e.length}`)}},t.hex=function(e){return r.from(e.replace(/^0x/,""),"hex")},t.bin=function(e){let t=0,n=(e=e.replace(/\s/g,"")).length%8||8;const i=[];for(;n<=e.length;)i.push(parseInt(e.slice(t,n),2)),t=n,n+=8;return r.from(i)},t.arrayEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,n)=>e===t[n]))},t.bufferToBigInt=function(e){return BigInt(`0x${e.toString("hex")}`)},t.cborValueToString=function(e,n=-1){switch(typeof e){case"symbol":{switch(e){case d.NULL:return"null";case d.UNDEFINED:return"undefined";case d.BREAK:return"BREAK"}if(e.description)return e.description;const t=e.toString().match(/^Symbol\((?<name>.*)\)/);return t&&t.groups.name?t.groups.name:"Symbol"}case"string":return JSON.stringify(e);case"bigint":return e.toString();case"number":{const t=Object.is(e,-0)?"-0":String(e);return n>0?`${t}_${n}`:t}case"object":{if(!e)return"null";const r=t.bufferishToBuffer(e);if(r){const e=r.toString("hex");return n===-1/0?e:`h'${e}'`}return e&&"function"==typeof e[Symbol.for("nodejs.util.inspect.custom")]?e[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(e)?"[]":"{}"}}return String(e)},t.guessEncoding=function(e,n){if("string"==typeof e)return new i(e,null==n?"hex":n);const r=t.bufferishToBuffer(e);if(r)return new i(r);if((a=e)instanceof o.Readable||["read","on","pipe"].every((e=>"function"==typeof a[e])))return e;var a;throw new Error("Unknown input type")};const l={"=":"","+":"-","/":"_"};t.base64url=function(e){return t.bufferishToBuffer(e).toString("base64").replace(/[=+/]/g,(e=>l[e]))},t.base64=function(e){return t.bufferishToBuffer(e).toString("base64")},t.isBigEndian=function(){const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])}},7395:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7522:(e,t)=>{"use strict";t.__esModule=void 0,t.__esModule=!0;var n="function"==typeof Object.setPrototypeOf,r="function"==typeof Object.getPrototypeOf,i="function"==typeof Object.defineProperty,o="function"==typeof Object.create,a="function"==typeof Object.prototype.hasOwnProperty;t.setPrototypeOf=function(e,t){n?Object.setPrototypeOf(e,t):e.__proto__=t},t.getPrototypeOf=function(e){return r?Object.getPrototypeOf(e):e.__proto__||e.prototype};var u=!1;t.defineProperty=function e(t,n,r){if(i&&!u)try{Object.defineProperty(t,n,r)}catch(i){u=!0,e(t,n,r)}else t[n]=r.value};var s=function(e,t){return a?e.hasOwnProperty(e,t):void 0===e[t]};t.hasOwnProperty=s,t.objectCreate=function(e,t){if(o)return Object.create(e,t);var n=function(){};n.prototype=e;var r=new n;if(void 0===t)return r;if("null"==typeof t)throw new Error("PropertyDescriptors must not be null.");if("object"==typeof t)for(var i in t)s(t,i)&&(r[i]=t[i].value);return r}},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=u(e),a=o[0],s=o[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),d=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[d++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,u=0,c=r-i;u<c;u+=a)o.push(s(e,u,u+a>c?c:u+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function s(e,t,r){for(var i,o,a=[],u=t;u<r;u+=3)i=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},7621:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRequest=async function*({request:e,encode:t}){for await(const n of e){const e=t(n);yield(0,r.encodeFrame)(e)}};const r=n(3564)},7640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.composeServerMiddleware=void 0,t.composeServerMiddleware=function(e,t){return(n,r)=>e(Object.assign(Object.assign({},n),{next:(e,r)=>t(Object.assign(Object.assign({},n),{request:e}),r)}),r)}},7662:(e,t)=>{"use strict";let n,r,i;function o(e){return n||(n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),r=n.slice(0,-2).concat("-","_")),"url"==e?r:n}Object.defineProperty(t,"__esModule",{value:!0}),t.base64Decode=function(e){const t=function(){if(!i){i=[];const e=o("std");for(let t=0;t<e.length;t++)i[e[t].charCodeAt(0)]=t;i["-".charCodeAt(0)]=e.indexOf("+"),i["_".charCodeAt(0)]=e.indexOf("/")}return i}();let n=3*e.length/4;"="==e[e.length-2]?n-=2:"="==e[e.length-1]&&(n-=1);let r,a=new Uint8Array(n),u=0,s=0,c=0;for(let n=0;n<e.length;n++){if(r=t[e.charCodeAt(n)],void 0===r)switch(e[n]){case"=":s=0;case"\n":case"\r":case"\t":case" ":continue;default:throw Error("invalid base64 string")}switch(s){case 0:c=r,s=1;break;case 1:a[u++]=c<<2|(48&r)>>4,c=r,s=2;break;case 2:a[u++]=(15&c)<<4|(60&r)>>2,c=r,s=3;break;case 3:a[u++]=(3&c)<<6|r,s=0}}if(1==s)throw Error("invalid base64 string");return a.subarray(0,u)},t.base64Encode=function(e,t="std"){const n=o(t),r="std"==t;let i,a="",u=0,s=0;for(let t=0;t<e.length;t++)switch(i=e[t],u){case 0:a+=n[i>>2],s=(3&i)<<4,u=1;break;case 1:a+=n[s|i>>4],s=(15&i)<<2,u=2;break;case 2:a+=n[s|i>>6],a+=n[63&i],u=0}return u&&(a+=n[s],r&&(a+="=",1==u&&(a+="="))),a}},7671:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeServiceDefinition=function(e){return(0,r.isGrpcWebServiceDefinition)(e)?(0,r.fromGrpcWebServiceDefinition)(e):(0,i.isTsProtoServiceDefinition)(e)?(0,i.fromTsProtoServiceDefinition)(e):e};const r=n(700),i=n(5653)},7758:(e,t,n)=>{"use strict";var r,i=n(6048).F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function u(e){if(e)throw e}function s(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var d,f=function(e){return e.length?"function"!=typeof e[e.length-1]?u:e.pop():u}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var l=t.map((function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var u=!1;e.on("close",(function(){u=!0})),void 0===r&&(r=n(6238)),r(e,{readable:t,writable:i},(function(e){if(e)return o(e);u=!0,o()}));var s=!1;return function(t){if(!u&&!s)return s=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}(e,o,i>0,(function(e){d||(d=e),e&&l.forEach(s),o||(l.forEach(s),f(d))}))}));return t.reduce(c)}},7768:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=function(e){return null!=e&&Symbol.asyncIterator in e}},8105:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8127:function(e,t,n){"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g&&n.g,e.exports=function(){"use strict";var e,t="3.7.7",n=t,r="function"==typeof Buffer,i="function"==typeof TextDecoder?new TextDecoder:void 0,o="function"==typeof TextEncoder?new TextEncoder:void 0,a=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),u=(e={},a.forEach((function(t,n){return e[t]=n})),e),s=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,c=String.fromCharCode.bind(String),d="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},f=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},l=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(e){for(var t,n,r,i,o="",u=e.length%3,s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=a[(t=n<<16|r<<8|i)>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}return u?o.slice(0,u-3)+"===".substring(u):o},p="function"==typeof btoa?function(e){return btoa(e)}:r?function(e){return Buffer.from(e,"binary").toString("base64")}:v,h=r?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(c.apply(null,e.subarray(n,n+4096)));return p(t.join(""))},y=function(e,t){return void 0===t&&(t=!1),t?f(h(e)):h(e)},m=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},b=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,w=function(e){return e.replace(b,m)},k=r?function(e){return Buffer.from(e,"utf8").toString("base64")}:o?function(e){return h(o.encode(e))}:function(e){return p(w(e))},g=function(e,t){return void 0===t&&(t=!1),t?f(k(e)):k(e)},B=function(e){return g(e,!0)},I=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,P=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},R=function(e){return e.replace(I,P)},T=function(e){if(e=e.replace(/\s+/g,""),!s.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,i="",o=0;o<e.length;)t=u[e.charAt(o++)]<<18|u[e.charAt(o++)]<<12|(n=u[e.charAt(o++)])<<6|(r=u[e.charAt(o++)]),i+=64===n?c(t>>16&255):64===r?c(t>>16&255,t>>8&255):c(t>>16&255,t>>8&255,255&t);return i},S="function"==typeof atob?function(e){return atob(l(e))}:r?function(e){return Buffer.from(e,"base64").toString("binary")}:T,E=r?function(e){return d(Buffer.from(e,"base64"))}:function(e){return d(S(e).split("").map((function(e){return e.charCodeAt(0)})))},A=function(e){return E(N(e))},_=r?function(e){return Buffer.from(e,"base64").toString("utf8")}:i?function(e){return i.decode(E(e))}:function(e){return R(S(e))},N=function(e){return l(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},U=function(e){return _(N(e))},L=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},j=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,L(t))};e("fromBase64",(function(){return U(this)})),e("toBase64",(function(e){return g(this,e)})),e("toBase64URI",(function(){return g(this,!0)})),e("toBase64URL",(function(){return g(this,!0)})),e("toUint8Array",(function(){return A(this)}))},C=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,L(t))};e("toBase64",(function(e){return y(this,e)})),e("toBase64URI",(function(){return y(this,!0)})),e("toBase64URL",(function(){return y(this,!0)}))},O={version:t,VERSION:n,atob:S,atobPolyfill:T,btoa:p,btoaPolyfill:v,fromBase64:U,toBase64:g,encode:g,encodeURI:B,encodeURL:B,utob:w,btou:R,decode:U,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:y,toUint8Array:A,extendString:j,extendUint8Array:C,extendBuiltins:function(){j(),C()},Base64:{}};return Object.keys(O).forEach((function(e){return O.Base64[e]=O[e]})),O}()},8198:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeInternalErrorMessage=function(e){return null==e||"object"!=typeof e?String(e):"string"==typeof e.message?e.message:JSON.stringify(e)}},8287:(e,t,n)=>{"use strict";const r=n(7526),i=n(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function u(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|h(e,t);let r=u(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){const t=new Uint8Array(e);return v(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return v(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return v(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);const i=function(e){if(s.isBuffer(e)){const t=0|p(e.length),n=u(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?u(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return d(e),u(e<0?0:0|p(e))}function l(e){const t=e.length<0?0:0|p(e.length),n=u(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function v(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,s.prototype),r}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){let o,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;o<u;o++)if(c(e,o)===c(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===s)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+s>u&&(n=u-s),o=n;o>=0;o--){let n=!0;for(let r=0;r<s;r++)if(c(e,o+r)!==c(t,r)){n=!1;break}if(n)return o}return-1}function k(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(X(r))return a;e[n+a]=r}return a}function g(e,t,n,r){return Y(K(t,e.length-n),e,n,r)}function B(e,t,n,r){return Y(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function I(e,t,n,r){return Y($(t),e,n,r)}function P(e,t,n,r){return Y(function(e,t){let n,r,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,u,s;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[i+1],r=e[i+2],u=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&u)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&u,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}t.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return function(e,t,n){return d(e),e<=0?u(e):void 0!==t?"string"==typeof n?u(e).fill(t,n):u(e).fill(t):u(e)}(e,t,n)},s.allocUnsafe=function(e){return f(e)},s.allocUnsafeSlow=function(e){return f(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=s.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(z(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},s.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},s.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},s.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):y.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const u=Math.min(o,a),c=this.slice(r,i),d=e.slice(t,n);for(let e=0;e<u;++e)if(c[e]!==d[e]){o=c[e],a=d[e];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return k(this,e,t,n);case"utf8":case"utf-8":return g(this,e,t,n);case"ascii":case"latin1":case"binary":return B(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function E(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function A(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function _(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=Q[e[r]];return i}function N(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function U(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function j(e,t,n,r,i){V(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function C(e,t,n,r,i){V(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function O(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,o){return t=+t,n>>>=0,o||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function x(e,t,n,r,o){return t=+t,n>>>=0,o||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||U(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||U(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),s.prototype.readBigInt64BE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=J((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=J((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=J((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=J((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return x(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return x(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=s.isBuffer(e)?e:s.from(e,r),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%a]}return this};const D={};function W(e,t,n){D[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function V(e,t,n,r,i,o){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new D.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||q(t,e.length-(n+1))}(r,i,o)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,n){if(Math.floor(e)!==e)throw H(e,n),new D.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),W("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=F(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function K(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function $(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function J(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},8310:(e,t,n)=>{e.exports=i;var r=n(7007).EventEmitter;function i(){r.call(this)}n(6698)(i,r),i.Readable=n(5412),i.Writable=n(6708),i.Duplex=n(5382),i.Transform=n(4610),i.PassThrough=n(3600),i.finished=n(6238),i.pipeline=n(7758),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",u),n.on("close",s));var a=!1;function u(){a||(a=!0,e.end())}function s(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(d(),0===r.listenerCount(this,"error"))throw e}function d(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",u),n.removeListener("close",s),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",d),n.removeListener("close",d),e.removeListener("close",d)}return n.on("error",c),e.on("error",c),n.on("end",d),n.on("close",d),e.on("close",d),e.emit("pipe",n),e}},8632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createUnaryMethod=function(e,t,n,u){const s={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*c(n,u){if((0,o.isAsyncIterable)(n))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");const s=(0,a.makeCall)(e,t,(0,i.asyncIterableOf)(n),u);let c;for await(const t of s){if(null!=c)throw new r.ClientError(e.path,r.Status.INTERNAL,"Received more than one message from server for unary method");c=t}if(null==c)throw new r.ClientError(e.path,r.Status.INTERNAL,"Server did not return a response");return c}const d=null==n?c:(e,t)=>n({method:s,requestStream:!1,request:e,responseStream:!1,next:c},t);return async(e,t)=>{const n=d(e,{...u,...t})[Symbol.asyncIterator]();let r=await n.next();for(;;)if(r.done){if(null!=r.value)return r.value;r=await n.throw(new Error("A middleware returned void, but expected to return a message for unary method"))}else r=await n.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"))}};const r=n(91),i=n(213),o=n(7768),a=n(2810)},8792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=i,t.isOneofADT=function(e){return null!==e&&"object"==typeof e&&"case"in e&&("string"==typeof e.case&&"value"in e&&null!=e.value||void 0===e.case&&(!("value"in e)||void 0===e.value))},t.isReflectList=function(e,t){var n,o,a,u;if(i(e)&&r.unsafeLocal in e&&"add"in e&&"field"in e&&"function"==typeof e.field){if(void 0!==t){const r=t,i=e.field();return r.listKind==i.listKind&&r.scalar===i.scalar&&(null===(n=r.message)||void 0===n?void 0:n.typeName)===(null===(o=i.message)||void 0===o?void 0:o.typeName)&&(null===(a=r.enum)||void 0===a?void 0:a.typeName)===(null===(u=i.enum)||void 0===u?void 0:u.typeName)}return!0}return!1},t.isReflectMap=function(e,t){var n,o,a,u;if(i(e)&&r.unsafeLocal in e&&"has"in e&&"field"in e&&"function"==typeof e.field){if(void 0!==t){const r=t,i=e.field();return r.mapKey===i.mapKey&&r.mapKind==i.mapKind&&r.scalar===i.scalar&&(null===(n=r.message)||void 0===n?void 0:n.typeName)===(null===(o=i.message)||void 0===o?void 0:o.typeName)&&(null===(a=r.enum)||void 0===a?void 0:a.typeName)===(null===(u=i.enum)||void 0===u?void 0:u.typeName)}return!0}return!1},t.isReflectMessage=function(e,t){return i(e)&&r.unsafeLocal in e&&"desc"in e&&i(e.desc)&&"message"===e.desc.kind&&(void 0===t||e.desc.typeName==t.typeName)};const r=n(7299);function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}},9119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.varint64read=function(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,!(128&r))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,!(128&n))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,!(128&r))return this.assertBounds(),[e,t]}throw new Error("invalid varint")},t.varint64write=function(e,t,n){for(let r=0;r<28;r+=7){const i=e>>>r,o=!(i>>>7==0&&0==t),a=255&(o?128|i:i);if(n.push(a),!o)return}const r=e>>>28&15|(7&t)<<4,i=!!(t>>3);if(n.push(255&(i?128|r:r)),i){for(let e=3;e<31;e+=7){const r=t>>>e,i=!(r>>>7==0),o=255&(i?128|r:r);if(n.push(o),!i)return}n.push(t>>>31&1)}},t.int64FromString=function(e){const t="-"===e[0];t&&(e=e.slice(1));const r=1e6;let a=0,u=0;function s(t,i){const o=Number(e.slice(t,i));u*=r,a=a*r+o,a>=n&&(u+=a/n|0,a%=n)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),t?o(a,u):i(a,u)},t.int64ToString=function(e,t){let n=i(e,t);const a=2147483648&n.hi;a&&(n=o(n.lo,n.hi));const u=r(n.lo,n.hi);return a?"-"+u:u},t.uInt64ToString=r,t.varint32write=function(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}},t.varint32read=function(){let e=this.buf[this.pos++],t=127&e;if(!(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<7,!(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<14,!(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<21,!(128&e))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(15&e)<<28;for(let t=5;128&e&&t<10;t++)e=this.buf[this.pos++];if(128&e)throw new Error("invalid varint");return this.assertBounds(),t>>>0};const n=4294967296;function r(e,t){if(({lo:e,hi:t}=function(e,t){return{lo:e>>>0,hi:t>>>0}}(e,t)),t<=2097151)return String(n*t+e);const r=16777215&(e>>>24|t<<8),i=t>>16&65535;let o=(16777215&e)+6777216*r+6710656*i,u=r+8147497*i,s=2*i;const c=1e7;return o>=c&&(u+=Math.floor(o/c),o%=c),u>=c&&(s+=Math.floor(u/c),u%=c),s.toString()+a(u)+a(o)}function i(e,t){return{lo:0|e,hi:0|t}}function o(e,t){return t=~t,e?e=1+~e:t+=1,i(e,t)}const a=e=>{const t=String(e);return"0000000".slice(t.length)+t}},9201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBinary=function(e,t,n){const r=(0,o.reflect)(e,void 0,!1);return c(r,new a.BinaryReader(t),s(n),!1,t.byteLength),r.message},t.mergeFromBinary=function(e,t,n,r){return c((0,o.reflect)(e,t,!1),new a.BinaryReader(n),s(r),!1,n.byteLength),t},t.readField=d;const r=n(2885),i=n(2949),o=n(9644),a=n(3056),u={readUnknownFields:!0};function s(e){return e?Object.assign(Object.assign({},u),e):u}function c(e,t,n,r,i){var o;const u=r?t.len:t.pos+i;let s,c;const f=null!==(o=e.getUnknown())&&void 0!==o?o:[];for(;t.pos<u&&([s,c]=t.tag(),!r||c!=a.WireType.EndGroup);){const r=e.findNumber(s);if(r)d(e,t,r,c,n);else{const e=t.skip(c,s);n.readUnknownFields&&f.push({no:s,wireType:c,data:e})}}if(r&&(c!=a.WireType.EndGroup||s!==i))throw new Error("invalid end group tag");f.length>0&&e.setUnknown(f)}function d(e,t,n,u,s){switch(n.fieldKind){case"scalar":e.set(n,l(t,n.scalar));break;case"enum":e.set(n,l(t,r.ScalarType.INT32));break;case"message":e.set(n,f(t,s,n,e.get(n)));break;case"list":!function(e,t,n,i){var o;const u=n.field();if("message"===u.listKind)return void n.add(f(e,i,u));const s=null!==(o=u.scalar)&&void 0!==o?o:r.ScalarType.INT32;if(!(t==a.WireType.LengthDelimited&&s!=r.ScalarType.STRING&&s!=r.ScalarType.BYTES))return void n.add(l(e,s));const c=e.uint32()+e.pos;for(;e.pos<c;)n.add(l(e,s))}(t,u,e.get(n),s);break;case"map":!function(e,t,n){const r=t.field();let a,u;const s=e.pos+e.uint32();for(;e.pos<s;){const[t]=e.tag();switch(t){case 1:a=l(e,r.mapKey);break;case 2:switch(r.mapKind){case"scalar":u=l(e,r.scalar);break;case"enum":u=e.int32();break;case"message":u=f(e,n,r)}}}if(void 0===a&&(a=(0,i.scalarZeroValue)(r.mapKey,!1)),void 0===u)switch(r.mapKind){case"scalar":u=(0,i.scalarZeroValue)(r.scalar,!1);break;case"enum":u=r.enum.values[0].number;break;case"message":u=(0,o.reflect)(r.message,void 0,!1)}t.set(a,u)}(t,e.get(n),s)}}function f(e,t,n,r){const i=n.delimitedEncoding,a=null!=r?r:(0,o.reflect)(n.message,void 0,!1);return c(a,e,t,i,i?n.number:e.uint32()),a}function l(e,t){switch(t){case r.ScalarType.STRING:return e.string();case r.ScalarType.BOOL:return e.bool();case r.ScalarType.DOUBLE:return e.double();case r.ScalarType.FLOAT:return e.float();case r.ScalarType.INT32:return e.int32();case r.ScalarType.INT64:return e.int64();case r.ScalarType.UINT64:return e.uint64();case r.ScalarType.FIXED64:return e.fixed64();case r.ScalarType.BYTES:return e.bytes();case r.ScalarType.FIXED32:return e.fixed32();case r.ScalarType.SFIXED32:return e.sfixed32();case r.ScalarType.SFIXED64:return e.sfixed64();case r.ScalarType.SINT64:return e.sint64();case r.ScalarType.UINT32:return e.uint32();case r.ScalarType.SINT32:return e.sint32()}}},9212:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTextFormatEnumValue=function(e,t){const n=e.values.find((e=>e.name===t));if(!n)throw new Error(`cannot parse ${e} default value: ${t}`);return n.number},t.parseTextFormatScalarValue=function(e,t){switch(e){case r.ScalarType.STRING:return t;case r.ScalarType.BYTES:{const n=function(e){const t=[],n={tail:e,c:"",next(){return 0!=this.tail.length&&(this.c=this.tail[0],this.tail=this.tail.substring(1),!0)},take(e){if(this.tail.length>=e){const t=this.tail.substring(0,e);return this.tail=this.tail.substring(e),t}return!1}};for(;n.next();)if("\\"===n.c){if(n.next())switch(n.c){case"\\":t.push(n.c.charCodeAt(0));break;case"b":t.push(8);break;case"f":t.push(12);break;case"n":t.push(10);break;case"r":t.push(13);break;case"t":t.push(9);break;case"v":t.push(11);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{const e=n.c,r=n.take(2);if(!1===r)return!1;const i=parseInt(e+r,8);if(isNaN(i))return!1;t.push(i);break}case"x":{const e=n.c,r=n.take(2);if(!1===r)return!1;const i=parseInt(e+r,16);if(isNaN(i))return!1;t.push(i);break}case"u":{const e=n.c,r=n.take(4);if(!1===r)return!1;const i=parseInt(e+r,16);if(isNaN(i))return!1;const o=new Uint8Array(4);new DataView(o.buffer).setInt32(0,i,!0),t.push(o[0],o[1],o[2],o[3]);break}case"U":{const e=n.c,r=n.take(8);if(!1===r)return!1;const o=i.protoInt64.uEnc(e+r),a=new Uint8Array(8),u=new DataView(a.buffer);u.setInt32(0,o.lo,!0),u.setInt32(4,o.hi,!0),t.push(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);break}}}else t.push(n.c.charCodeAt(0));return new Uint8Array(t)}(t);if(!1===n)throw new Error(`cannot parse ${r.ScalarType[e]} default value: ${t}`);return n}case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:return i.protoInt64.parse(t);case r.ScalarType.UINT64:case r.ScalarType.FIXED64:return i.protoInt64.uParse(t);case r.ScalarType.DOUBLE:case r.ScalarType.FLOAT:switch(t){case"inf":return Number.POSITIVE_INFINITY;case"-inf":return Number.NEGATIVE_INFINITY;case"nan":return Number.NaN;default:return parseFloat(t)}case r.ScalarType.BOOL:return"true"===t;case r.ScalarType.INT32:case r.ScalarType.UINT32:case r.ScalarType.SINT32:case r.ScalarType.FIXED32:case r.ScalarType.SFIXED32:return parseInt(t,10)}};const r=n(2885),i=n(4011)},9452:(e,t)=>{"use strict";t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},t.SHIFT32=4294967296,t.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(t.SHIFT32)}},9644:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reflect=function(e,t,n=!0){return new l(e,t,n)},t.reflectList=function(e,t,n=!0){return new p(e,null!=t?t:[],n)},t.reflectMap=function(e,t,n=!0){return new h(e,t,n)};const r=n(2885),i=n(1841),o=n(5067),a=n(7299),u=n(1583),s=n(2992),c=n(2949),d=n(4011),f=n(8792);class l{get sortedFields(){var e;return null!==(e=this._sortedFields)&&void 0!==e?e:this._sortedFields=this.desc.fields.concat().sort(((e,t)=>e.number-t.number))}constructor(e,t,n=!0){this.lists=new Map,this.maps=new Map,this.check=n,this.desc=e,this.message=this[a.unsafeLocal]=null!=t?t:(0,u.create)(e),this.fields=e.fields,this.oneofs=e.oneofs,this.members=e.members}findNumber(e){return this._fieldsByNumber||(this._fieldsByNumber=new Map(this.desc.fields.map((e=>[e.number,e])))),this._fieldsByNumber.get(e)}oneofCase(e){return v(this.message,e),(0,a.unsafeOneofCase)(this.message,e)}isSet(e){return v(this.message,e),(0,a.unsafeIsSet)(this.message,e)}clear(e){v(this.message,e),(0,a.unsafeClear)(this.message,e)}get(e){v(this.message,e);const t=(0,a.unsafeGet)(this.message,e);switch(e.fieldKind){case"list":let n=this.lists.get(e);return n&&n[a.unsafeLocal]===t||this.lists.set(e,n=new p(e,t,this.check)),n;case"map":let r=this.maps.get(e);return r&&r[a.unsafeLocal]===t||this.maps.set(e,r=new h(e,t,this.check)),r;case"message":return m(e,t,this.check);case"scalar":return void 0===t?(0,c.scalarZeroValue)(e.scalar,!1):I(e,t);case"enum":return null!=t?t:e.enum.values[0].number}}set(e,t){if(v(this.message,e),this.check){const n=(0,i.checkField)(e,t);if(n)throw n}let n;n="message"==e.fieldKind?y(e,t):(0,f.isReflectMap)(t)||(0,f.isReflectList)(t)?t[a.unsafeLocal]:P(e,t),(0,a.unsafeSet)(this.message,e,n)}getUnknown(){return this.message.$unknown}setUnknown(e){this.message.$unknown=e}}function v(e,t){if(t.parent.typeName!==e.$typeName)throw new o.FieldError(t,`cannot use ${t.toString()} with message ${e.$typeName}`,"ForeignFieldError")}class p{field(){return this._field}get size(){return this._arr.length}constructor(e,t,n){this._field=e,this._arr=this[a.unsafeLocal]=t,this.check=n}get(e){const t=this._arr[e];return void 0===t?void 0:w(this._field,t,this.check)}set(e,t){if(e<0||e>=this._arr.length)throw new o.FieldError(this._field,`list item #${e+1}: out of range`);if(this.check){const n=(0,i.checkListItem)(this._field,e,t);if(n)throw n}this._arr[e]=b(this._field,t)}add(e){if(this.check){const t=(0,i.checkListItem)(this._field,this._arr.length,e);if(t)throw t}this._arr.push(b(this._field,e))}clear(){this._arr.splice(0,this._arr.length)}[Symbol.iterator](){return this.values()}keys(){return this._arr.keys()}*values(){for(const e of this._arr)yield w(this._field,e,this.check)}*entries(){for(let e=0;e<this._arr.length;e++)yield[e,w(this._field,this._arr[e],this.check)]}}class h{constructor(e,t,n=!0){this.obj=this[a.unsafeLocal]=null!=t?t:{},this.check=n,this._field=e}field(){return this._field}set(e,t){if(this.check){const n=(0,i.checkMapEntry)(this._field,e,t);if(n)throw n}return this.obj[g(e)]=function(e,t){return"message"==e.mapKind?y(e,t):P(e,t)}(this._field,t),this}delete(e){const t=g(e),n=Object.prototype.hasOwnProperty.call(this.obj,t);return n&&delete this.obj[t],n}clear(){for(const e of Object.keys(this.obj))delete this.obj[e]}get(e){let t=this.obj[g(e)];return void 0!==t&&(t=k(this._field,t,this.check)),t}has(e){return Object.prototype.hasOwnProperty.call(this.obj,g(e))}*keys(){for(const e of Object.keys(this.obj))yield B(e,this._field.mapKey)}*entries(){for(const e of Object.entries(this.obj))yield[B(e[0],this._field.mapKey),k(this._field,e[1],this.check)]}[Symbol.iterator](){return this.entries()}get size(){return Object.keys(this.obj).length}*values(){for(const e of Object.values(this.obj))yield k(this._field,e,this.check)}forEach(e,t){for(const n of this.entries())e.call(t,n[1],n[0],this)}}function y(e,t){return(0,f.isReflectMessage)(t)?(0,s.isWrapper)(t.message)&&!e.oneof&&"message"==e.fieldKind?t.message.value:"google.protobuf.Struct"==t.desc.typeName&&"google.protobuf.Value"!=e.parent.typeName?T(t.message):t.message:t}function m(e,t,n){return void 0!==t&&((0,s.isWrapperDesc)(e.message)&&!e.oneof&&"message"==e.fieldKind?t={$typeName:e.message.typeName,value:I(e.message.fields[0],t)}:"google.protobuf.Struct"==e.message.typeName&&"google.protobuf.Value"!=e.parent.typeName&&(0,f.isObject)(t)&&(t=R(t))),new l(e.message,t,n)}function b(e,t){return"message"==e.listKind?y(e,t):P(e,t)}function w(e,t,n){return"message"==e.listKind?m(e,t,n):I(e,t)}function k(e,t,n){return"message"==e.mapKind?m(e,t,n):t}function g(e){return"string"==typeof e||"number"==typeof e?e:String(e)}function B(e,t){switch(t){case r.ScalarType.STRING:return e;case r.ScalarType.INT32:case r.ScalarType.FIXED32:case r.ScalarType.UINT32:case r.ScalarType.SFIXED32:case r.ScalarType.SINT32:{const t=Number.parseInt(e);if(Number.isFinite(t))return t;break}case r.ScalarType.BOOL:switch(e){case"true":return!0;case"false":return!1}break;case r.ScalarType.UINT64:case r.ScalarType.FIXED64:try{return d.protoInt64.uParse(e)}catch(e){}break;default:try{return d.protoInt64.parse(e)}catch(e){}}return e}function I(e,t){switch(e.scalar){case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:"longAsString"in e&&e.longAsString&&"string"==typeof t&&(t=d.protoInt64.parse(t));break;case r.ScalarType.FIXED64:case r.ScalarType.UINT64:"longAsString"in e&&e.longAsString&&"string"==typeof t&&(t=d.protoInt64.uParse(t))}return t}function P(e,t){switch(e.scalar){case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:"longAsString"in e&&e.longAsString?t=String(t):"string"!=typeof t&&"number"!=typeof t||(t=d.protoInt64.parse(t));break;case r.ScalarType.FIXED64:case r.ScalarType.UINT64:"longAsString"in e&&e.longAsString?t=String(t):"string"!=typeof t&&"number"!=typeof t||(t=d.protoInt64.uParse(t))}return t}function R(e){const t={$typeName:"google.protobuf.Struct",fields:{}};if((0,f.isObject)(e))for(const[n,r]of Object.entries(e))t.fields[n]=E(r);return t}function T(e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=S(r);return t}function S(e){switch(e.kind.case){case"structValue":return T(e.kind.value);case"listValue":return e.kind.value.values.map(S);case"nullValue":case void 0:return null;default:return e.kind.value}}function E(e){const t={$typeName:"google.protobuf.Value",kind:{case:void 0}};switch(typeof e){case"number":t.kind={case:"numberValue",value:e};break;case"string":t.kind={case:"stringValue",value:e};break;case"boolean":t.kind={case:"boolValue",value:e};break;case"object":if(null===e){const e=0;t.kind={case:"nullValue",value:e}}else if(Array.isArray(e)){const n={$typeName:"google.protobuf.ListValue",values:[]};if(Array.isArray(e))for(const t of e)n.values.push(E(t));t.kind={case:"listValue",value:n}}else t.kind={case:"structValue",value:R(e)}}return t}},9744:e=>{"use strict";class t{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(e){const n=this.map.get(e);if(n)return n.length>1?n[0]||this.recording?n[1]:(n[0]=!0,t.FIRST):this.recording?(n.push(this.count++),n[1]):t.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(e,[!1]),t.NEVER}}t.NEVER=-1,t.FIRST=-2,e.exports=t},9777:(e,t,n)=>{"use strict";const r=n(8310),i=n(3737),o=n(7328),a=n(5256),{MT:u,SYMS:s}=n(9452);class c extends r.Transform{constructor(e={}){const{separator:t="\n",stream_errors:n=!1,tags:r,max_depth:o,preferWeb:a,encoding:u,...s}=e;super({...s,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=t,this.stream_errors=n,this.parser=new i({tags:r,max_depth:o,preferWeb:a,encoding:u}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(e,t,n){this.parser.write(e,t,n)}_flush(e){this.parser._flush((t=>this.stream_errors?(t&&this._on_error(t),e()):e(t)))}static diagnose(e,t={},n=null){if(null==e)throw new TypeError("input required");({options:t,cb:n}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,n));const{encoding:r="hex",...i}=t,u=new a,s=new c(i);let d=null;return"function"==typeof n?(s.on("end",(()=>n(null,u.toString("utf8")))),s.on("error",n)):d=new Promise(((e,t)=>{s.on("end",(()=>e(u.toString("utf8")))),s.on("error",t)})),s.pipe(u),o.guessEncoding(e,r).pipe(s),d}_on_error(e){this.stream_errors?this.push(e.toString()):this.emit("error",e)}_on_more(e,t,n,r){e===u.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[t])}_fore(e,t){switch(e){case u.BYTE_STRING:case u.UTF8_STRING:case u.ARRAY:t>0&&this.push(", ");break;case u.MAP:t>0&&(t%2?this.push(": "):this.push(", "))}}_on_value(e,t,n){if(e===s.BREAK)return;this._fore(t,n);const r=this.float_bytes;this.float_bytes=-1,this.push(o.cborValueToString(e,r))}_on_start(e,t,n,r){switch(this._fore(n,r),e){case u.TAG:this.push(`${t}(`);break;case u.ARRAY:this.push("[");break;case u.MAP:this.push("{");break;case u.BYTE_STRING:case u.UTF8_STRING:this.push("(")}t===s.STREAM&&this.push("_ ")}_on_stop(e){switch(e){case u.TAG:this.push(")");break;case u.ARRAY:this.push("]");break;case u.MAP:this.push("}");break;case u.BYTE_STRING:case u.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}e.exports=c},9838:()=>{},9881:(e,t,n)=>{"use strict";const r=n(893),i=n(9777),o=n(3737),a=n(2893),u=n(5059),s=n(3557),c=n(2903),d=n(207);e.exports={Commented:r,Diagnose:i,Decoder:o,Encoder:a,Simple:u,Tagged:s,Map:c,SharedValueEncoder:d,comment:r.comment,decodeAll:o.decodeAll,decodeFirst:o.decodeFirst,decodeAllSync:o.decodeAllSync,decodeFirstSync:o.decodeFirstSync,diagnose:i.diagnose,encode:a.encode,encodeCanonical:a.encodeCanonical,encodeOne:a.encodeOne,encodeAsync:a.encodeAsync,decode:o.decodeFirstSync,leveldb:{decode:o.decodeFirstSync,encode:a.encode,buffer:!0,name:"cbor"},reset(){a.reset(),s.reset()}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{default:()=>O});var e=n(3691),t=n(2260);async function i(){const t=new e.kCY.fromPartial({v0:{}}),n=await this.client.getStatus(t),{v0:r}=n;return r.node.id=r.node.id.reduce(((e,t)=>t+e.toString(16)),""),r.node.proTxHash=r.node.proTxHash.reduce(((e,t)=>t+e.toString(16)),""),r.chain.latestBlockHash=r.chain.latestBlockHash.reduce(((e,t)=>t+e.toString(16)),""),r.chain.latestAppHash=r.chain.latestAppHash.reduce(((e,t)=>t+e.toString(16)),""),r.chain.earliestAppHash=r.chain.earliestAppHash.reduce(((e,t)=>t+e.toString(16)),""),r.chain.earliestBlockHash=r.chain.earliestBlockHash.reduce(((e,t)=>t+e.toString(16)),""),r}function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function a(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every((e=>"string"==typeof e)):t.every((e=>Number.isSafeInteger(e)))))}function u(e){if("function"!=typeof e)throw new Error("function expected");return!0}function s(e,t){if("string"!=typeof t)throw new Error(`${e}: string expected`);return!0}function c(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function d(e){if(!Array.isArray(e))throw new Error("array expected")}function f(e,t){if(!a(!0,t))throw new Error(`${e}: array of strings expected`)}function l(e,t){if(!a(!1,t))throw new Error(`${e}: array of numbers expected`)}function v(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function p(e){const t="string"==typeof e?e.split(""):e,n=t.length;f("alphabet",t);const r=new Map(t.map(((e,t)=>[e,t])));return{encode:r=>(d(r),r.map((r=>{if(!Number.isSafeInteger(r)||r<0||r>=n)throw new Error(`alphabet.encode: digit index outside alphabet "${r}". Allowed: ${e}`);return t[r]}))),decode:t=>(d(t),t.map((t=>{s("alphabet.decode",t);const n=r.get(t);if(void 0===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n})))}}function h(e=""){return s("join",e),{encode:t=>(f("join.decode",t),t.join(e)),decode:t=>(s("join.decode",t),t.split(e))}}function y(e,t="="){return c(e),s("padding",t),{encode(n){for(f("padding.encode",n);n.length*e%8;)n.push(t);return n},decode(n){f("padding.decode",n);let r=n.length;if(r*e%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8==0)throw new Error("padding: invalid, string has too much padding");return n.slice(0,r)}}}function m(e){return u(e),{encode:e=>e,decode:t=>e(t)}}function b(e,t,n){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(d(e),!e.length)return[];let r=0;const i=[],o=Array.from(e,(e=>{if(c(e),e<0||e>=t)throw new Error(`invalid integer: ${e}`);return e})),a=o.length;for(;;){let e=0,u=!0;for(let i=r;i<a;i++){const a=o[i],s=t*e,c=s+a;if(!Number.isSafeInteger(c)||s/t!==e||c-a!==s)throw new Error("convertRadix: carry overflow");const d=c/n;e=c%n;const f=Math.floor(d);if(o[i]=f,!Number.isSafeInteger(f)||f*n+e!==c)throw new Error("convertRadix: carry overflow");u&&(f?u=!1:r=i)}if(i.push(e),u)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}const w=(e,t)=>0===t?e:w(t,e%t),k=(e,t)=>e+(t-w(e,t)),g=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function B(e,t,n,r){if(d(e),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(k(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${k(t,n)}`);let i=0,o=0;const a=g[t],u=g[n]-1,s=[];for(const r of e){if(c(r),r>=a)throw new Error(`convertRadix2: invalid data word=${r} from=${t}`);if(i=i<<t|r,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)s.push((i>>o-n&u)>>>0);const e=g[o];if(void 0===e)throw new Error("invalid carry");i&=e-1}if(i=i<<n-o&u,!r&&o>=t)throw new Error("Excess padding");if(!r&&i>0)throw new Error(`Non-zero padding: ${i}`);return r&&o>0&&s.push(i>>>0),s}function I(e,t=!1){if(c(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(k(8,e)>32||k(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!o(n))throw new Error("radix2.encode input should be Uint8Array");return B(Array.from(n),8,e,!t)},decode:n=>(l("radix2.decode",n),Uint8Array.from(B(n,e,8,t)))}}function P(e){return u(e),function(...t){try{return e.apply(null,t)}catch(e){}}}v(I(4),p("0123456789ABCDEF"),h("")),v(I(5),p("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),y(5),h("")),v(I(5),p("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),h("")),v(I(5),p("0123456789ABCDEFGHIJKLMNOPQRSTUV"),y(5),h("")),v(I(5),p("0123456789ABCDEFGHIJKLMNOPQRSTUV"),h("")),v(I(5),p("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),h(""),m((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),v(I(6),p("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),y(6),h("")),v(I(6),p("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),h("")),v(I(6),p("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),y(6),h(""));const R=(v(I(6),p("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),h("")),e=>{return v((c(t=58),{encode:e=>{if(!o(e))throw new Error("radix.encode input should be Uint8Array");return b(Array.from(e),256,t)},decode:e=>(l("radix.decode",e),Uint8Array.from(b(e,t,256)))}),p(e),h(""));var t}),T=R("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),S=(R("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),R("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"),v(p("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),h(""))),E=[996825010,642813549,513874426,1027748829,705979059];function A(e){const t=e>>25;let n=(33554431&e)<<5;for(let e=0;e<E.length;e++)1==(t>>e&1)&&(n^=E[e]);return n}function _(e,t,n=1){const r=e.length;let i=1;for(let t=0;t<r;t++){const n=e.charCodeAt(t);if(n<33||n>126)throw new Error(`Invalid prefix (${e})`);i=A(i)^n>>5}i=A(i);for(let t=0;t<r;t++)i=A(i)^31&e.charCodeAt(t);for(let e of t)i=A(i)^e;for(let e=0;e<6;e++)i=A(i);return i^=n,S.encode(B([i%g[30]],30,5,!1))}function N(e){const t="bech32"===e?1:734539939,n=I(5),r=n.decode,i=n.encode,a=P(r);function u(e,n,r=90){s("bech32.encode prefix",e),o(n)&&(n=Array.from(n)),l("bech32.encode",n);const i=e.length;if(0===i)throw new TypeError(`Invalid prefix length ${i}`);const a=i+7+n.length;if(!1!==r&&a>r)throw new TypeError(`Length ${a} exceeds limit ${r}`);const u=e.toLowerCase(),c=_(u,n,t);return`${u}1${S.encode(n)}${c}`}function c(e,n=90){s("bech32.decode input",e);const r=e.length;if(r<8||!1!==n&&r>n)throw new TypeError(`invalid string length: ${r} (${e}). Expected (8..${n})`);const i=e.toLowerCase();if(e!==i&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const o=i.lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');const a=i.slice(0,o),u=i.slice(o+1);if(u.length<6)throw new Error("Data must be at least 6 characters long");const c=S.decode(u).slice(0,-6),d=_(a,c,t);if(!u.endsWith(d))throw new Error(`Invalid checksum in ${e}: expected "${d}"`);return{prefix:a,words:c}}return{encode:u,decode:c,encodeFromBytes:function(e,t){return u(e,i(t))},decodeToBytes:function(e){const{prefix:t,words:n}=c(e,!1);return{prefix:t,words:n,bytes:r(n)}},decodeUnsafe:P(c),fromWords:r,fromWordsUnsafe:a,toWords:i}}N("bech32"),N("bech32m");v(I(4),p("0123456789abcdef"),h(""),m((e=>{if("string"!=typeof e||e.length%2!=0)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));var U=n(9881),L=n.n(U);async function j(t,n,r,i,o=100,a,u,s=!1){const c=new e._qG.fromPartial({v0:{dataContractId:T.decode(t),documentType:n,where:r?L().encode(r):void 0,orderBy:i?L().encode(i):void 0,limit:o,startAt:a||void 0,startAfter:u||void 0,prove:s}}),{v0:d}=await this.client.getDocuments(c);return d.documents.documents}process.env.NODE_TLS_REJECT_UNAUTHORIZED=0;const C={network:"testnet",dapiUrls:["https://52.33.28.47:1443"]};class O{constructor(n=C){this.network=n.network,this.dapiUrls=n.dapiUrls;const[r]=this.dapiUrls,o=(0,t.createChannel)(r);this.client=(0,t.createClient)(e.Xut,o),this.documents={get:j.bind(this)},this.utils={getStatus:i.bind(this)}}}})(),r})()));
|